NETWORK DRIVERS - EIA 422/485
Two or more RTES systems can be networked using the HOST network drivers. The HOST driver is used to make one RTES node initiate exchange of register values with other RTES nodes that do not initiate any communication (they are in SLAVE mode). Communication may use a serial port EIA 232C, if there is one slave only, or a multidropped EIA 422/485 network.
A variety of commercially available 232 to 422 converters are suitable for multidropped network applications.
Transmission of data is done by blocks. Each block within the network is identified by a unique ID number. A block defines a series of registers. The blocks are defined in the PORTn.CNF file. Each block in the host's configuration must have a corresponding block in only one of the slaves configuration.
SLAVES do not initiate any communication. They wait for a message, and execute it only if they recognizes the block id in the message as one that is defined in their own PORTn.CNF.
A block used to receive information is in the "I" or "G" category. A block used to send information is contained in the "O" or "S" category. "I" and "O" blocks exchange binary information. An even number is transmitted as a 0 and an odd number as a 1. When used as binary data, only the integer part of a number is considered. Negative numbers are changed to 0. "G" and "S" blocks exchange full floating point numbers.
Each output block (O or S) in the host must have a corresponding input block (I or G) with the same length and the same id in one and only one of the slaves. The general form of a block is :
Register, Quantity, Id, Alarm, Enable, Type
|
Register |
the index of the first register of the block to use. |
|
|
Quantity |
the number of registers to transfer, starting at and including the first register. The maximum number of register values that may be transferred is 16 per block. |
|
|
Id |
the identification number of the block. Valid id's are 0 to 255 for each block type |
|
|
Alarm |
the index of the register to be set in case a communication error or time-out occurs when this particular block is transferred |
|
|
Enable |
the index of the register that will control transmission, or 0 if transmission is continuous (host side only). See "C" parameter in Definitions |
|
|
Type |
the type of RTES registers to transfer data to or from according to the following chart
|
The 'alarm' and 'enable' parameters are only used by the HOST but are present - for consistency - in all configuration files. The assumption is that once the configuration files are built, and provided the interconnection wiring allows it, it would suffice to activate the 'enable' registers at one of the nodes to make it the HOST. The 'enable' parameter can only be 0 at one of the nodes, which would make that node the HOST.
You may define up to 255 blocks of each type.
Example
Say we want the host to receive 8 register values from a slave and place them at R0009
to R0016. The host communicates to the slave(s) via its COM2 at 9600 baud.
Communication errors will set R0001. There is no enable register. In PORT2.CNF, we will have:
B=9600
I=1 8,8,6,0,0,0
Note that the block id has been chosen arbitrarily as 6. In order for a slave to respond, it must have a block of the form :
O=1 32,8,6,0,20,0
In the above example, whenever the host requests the values of the registers in block 6, it will receive from this slave, the values of the 8 registers at R0033 (R0033 to R0040).
The host will then place those values at R0009 to R0016.
A host sends register values to a slave using a similar set up with the O block at the host and the corresponding I block at the slave.
This driver supports dial-up modems.