User manual
Toolbox 32 User Manual 1.47d www.cse-semaphore.com/mykingfisher
Page
159
The example shown below transmits a string of 10 characters from local registers starting at #R200 to the
external device assigned to RTU100. A maximum of 50 characters are expected as a reply and the reply is
stored in local registers starting at #R101. If any characters are received, success counter #YLSUCC100 is
incremented, otherwise fail counter #YLFAIL100 is incremented. Note: if more than 50 characters are in the
receive buffer, only the first 50 characters will be read.
Figure: Example Tx User block
Rx User
Rx User allows an incoming message string to be received and stored. When bytes are received, the
success counter corresponding to the device number is incremented (Note: this function cannot verify any
checksum or CRC bytes in the message). If no bytes are received after triggering an Rx User block, the fail
counter is incremented. Rx User will not work with other port protocols (always returns 0) because any
characters received are processed as the other protocol.
The port register #YPRXCnn can be used to determine if there are any received characters/bytes in the
buffer of port nn (nn=1 to 16). When #YPRXCnn is non zero, the RxUser function can then be used to
retrieve the message and store it in local registers.
Comment: A 12-character description.
Device Number: (1-249) The RTU address assigned to the external device. Note: the Device Number is
only used to access the communications parameters stored in the Network List (and Phone List for PSTN
devices); it does not have to correspond to the physical address of the external device. The network link
configured for this Device Number is used to control communications.
RxData destination: (#R1 to #R2048) First local register to begin storing the received string in.
Rx No. bytes (max): (#R1 to #R2048 or 0 to 250) Maximum number of bytes expected in the response. This
can be specified as a local register or a constant. The RTU will attempt to receive the specified number of
bytes. It will wait until the timeout specified in the Network List has expired. If a local register is specified, the
register will be updated after the function has completed to correspond to the actual number of bytes
received.