RSBatch Controllogix Strings

D

Thread Starter

Dave Sutton

Controllogix does not support string data. Strings must be stored as arrays of integers. Has anybody successfully passed strings from RSBatch to Controllogix for passing to SCADA (RSView)?
I feel I must be missing something. Batch cannot write to the arrays that I have set up. When I try to pass strings to padded arrays I get a failure in Batch. It may just be a syntax issue???
Is this possible at all ? It seems that it is batch that is looking for confirmation from a string tag.
 
This is an example used with Rockwell's RSSQL transaction manager. Maybe it might help if you add the appropriate field type and length when you specify the Unit Based PLC Tag in RSBatch.

++++++++++++++++++++++++++++++++++=
RSSql data point definition:

Even though the RSSql data point is defined as string data, RSLinx queries the data type from the processor. To allow RSSql and RSLinx to write string data to integer storage - add the ,SSxx (string space pad) or the ,SCxx (string C null pad) to the item address/string, where xx indicates the number of elements to pad. The number of elements depends on how the data is stored. The following table gives some examples for 80 character strings. If the SCxx or SSxx syntax is omitted, only the first element in the array will be accessed, and it will be treated as an integer.
CL5550 Data type Description String Address Syntax Example 1 String Address Syntax Example 2
SINT 8 bit integer SINTArray[0],SC80 SINTArray[0],m,SC80
INT 16 bit integer INTArray[0],SC40 INTArray[0],m,SC40
DINT 32 bit integer DINTArray[0],SC20 DINTArray[0],m,SC20
PLC5 emulation 16 bit integer N7:0,SC40 N7:0,m,SC40

PLC5 emulation mode may be required to read/write string data if the CL5550 firmware or RSLinx is at an earlier revision.

In the RSSql data point definition, define the item address as in Example 1 above.
Then set the Data Type to "String", and the Elements to "1".


Controller Memory:

The controller stores string data in the integer array as the HEX equivalent of the character. For example, if a 12 is entered into a string input field, the data is converted to the hex equivalent (in this case 3132h) and is stored the processor tag name INTArray[0]. Since INTArray[0] actually stores 2 characters, examination of the individual bytes will show the 1 (31h) is stored in the high order byte, and the 2 (32h) is stored in the low order byte.

Consider the same example writing string data to the SINTArray: If a 12 is entered into a string input field, the SINTArray[0] = 2 (32h), SINTArray[1] = 1 (32h). Applying the ,m byte swap modifier to the address line does not alter the way the string data is written to the processor, it only swaps the way the data is viewed. A future release of RSLinx will correct this byte swapping for SINT arrays.

When RSSql is performing both the string read and write, use the syntax in Example 1.
When the CL5550 processor is storing the string data, the high and low order byte may need to be swapped. Use the syntax in Example 2 to accomplish this on the read only.
 
Top