SETSYSTEM n, data
Purpose Allow changing of certain default system’s parameters. Currently only the following data are defined. More parameters may be defined in future. Some commands are specific to a PLC model and these will be mentioned in the relevant section of the hardware manual.

n

data

1

# of wait states (multiple of 0.15s) while waiting for a response from a slave controller after executing a NETCMD$ or a READMODBUS/ WRITEMODBUS command. Default number of wait state = 1.

e.g. SETSYSTEM 1, 3

The PLC will wait 3 x 150ms = 450ms for a valid response from the slave controller.

 

2

# of retry if NETCMD$ or READMODBUS/ WRITEMODBUS failed to get a valid response from slave controller. Default = 2. (a total of 3 tries)

e.g. SETSYSTEM 2,5

The PLC will retry up to 5 times if it failed to communicate with the slave. Note longer waiting time when failure occur if you increase the number of retries.

 

 

3

0 - Respond as fast as possible to hostlink commands received   from the host computer or another PLC.

1 - (default)  at least a 0.01s (10ms) must lapse before responding to host link commands received from the host computer or another PLC. This delay is needed for auto-switch type RS485 converter to allow time for the hardware transceiver to switch direction.

4

Set Enhanced Quadrature Encoding for HSC channels (see the PLC's User manual on High Speed Counter hardware for details)

5

0  - All DM cleared when PLC is reset.
n  -  DM #1 to #n will not be cleared when is reset.

6

3  -  READMODBUS and READMB2 use Modbus Function 03
4  -  READMODBUS and READMB2 use Modbus Function 04

7

Reserved

8

Allow PLC to change its own ID from within TBASIC temporarily. The new ID may be volatile.

backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual