Structure of the buffer for string communication, Sending a string, Receiving a string – BECKHOFF C1220 User Manual
Page 24: Slave to slave string communication, Register communication

Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
Software description of functions
24
Beckhoff Lightbus - PC interface card C1220
Structure of the buffer for string communication
Transmit / receive buffer
Description
0x00.0
Active flag
0x00.1 - 0x00.7
Error field
0x00: String transmitted without error.
0x04: Optical fibre error.
0x08: String slave not initialised.
0x10: String slave not yet ready for
communication.
0x20: Timeout during string transmission.
0x40: String length error.
0x01
Empty
0x02
Address of the sender (TX)
0x03
Address of the receiver (RX)
0x04
Channel / priority
0x05
String length
0x06 - 0xFF
String data
Sending a string
To send a string to a string slave, the string data (header and user data)
are placed in the C1220’s transmit buffer. If the active flag is now set, the
master card is induced to send the string. Once this has occurred, the
master card now resets the active flag. If any error has occurred during the
string transmission, this is indicated in the error field.
Receiving a string
If a string is received from a string slave, it is placed in the C1220’s receive
buffer, and the active flag is set. As long as a string that has been received
has not been acknowledged by resetting the active flag, no further string
will be fetched from a string slave.
Slave to slave string communication
Slave to slave communication (received string has RX not equal to “0”) is
processed entirely by the master card.
Register communication
String communication can be used to access the register interface of a bus
coupler or of a terminal in a simple manner.
To trigger register communication, channel 8 must simply be entered into
the string header. In the string data area an additional header, 6 bytes
large, is necessary.
High Byte
Low Byte
I/O
Address
127
Register data
--
5
User data
Number of words
Register (base)
4
R/W
Table
Terminal number
3
Header for register communication
Message Ident
2
Size
Priority
8
1
RX_address
TX_address
0
Header for string communication