Rockwell Automation Logix5000 Controllers ASCII Strings Programming Manual User Manual

Page 16

Advertising
background image

Chapter 1 Communicating with an ASCII device

Example:

When the temperature reaches the low limit (temp_low is on), the AWT instruction sends nine

characters from the string[2] tag to a MessageView terminal. (The $14 counts as one character. The
hex code for the Ctrl-T character.)

In the following example, you send a different number of characters each time and

want to automatically append one or two characters to the end of the data:

Example:

When alarm is on, the AWA instruction sends the characters in alarm_msg and appends a

termination character.

Because the number of characters in alarm_msg varies, the rung first moves the length of

alarm_msg (alarm_msg.LEN) to the length of the AWA instruction (alarm_write.LEN).

In alarm_msg, the $14 counts as one character. The hex code for the Ctrl-T character.

Send a different number of characters each time:

Example:

When MV_update is on, the AWT instruction sends the characters in MV_msg.

Because the number of characters in MV_msg varies, the rung first moves the length of MV_msg

(MV_msg.LEN) to the length of the AWT instruction (MV_write.LEN).

In MV_msg, the $16 counts as one character. The hex code for the Ctrl-V character.

16

Rockwell Automation Publication 1756-PM013D-EN-P - October 2014

Advertising