String data type

JeffB

Lifetime Supporting Member
Join Date
Apr 2002
Location
NW Arkansas
Posts
79
Hello all,

I need help creating a string. The PLC is an A/B L-55 logix controller. The controller receives data from a Sick bar code reader in a SINT array. I have been asked by our customer's SCADA people to format the 14 element bar code data into single string for their database.

I think I have to convert each SINT element into a string element, and then build the final string one element at a time until I have all 14 elements in their proper places. Is this right?

Any and all help is greatly appreciated.
 
Yes Jeff, you are correct.
What I have done in the past is simply create and call the string that you want to declare, then Concatenate each new SINT with the original string that you previously declared.

You can do it all in one rung, just provide branch outputs one below the next.

Depending on how many DINT that you are adding, you will have one branch with the Concatenate instruction.
 
Last edited:
I'll need to double-check, but I believe the .Data element of a ControlLogix STRING data-type is a SINT array also.

So I believe you can create a 14-character User-Defined String data-type (theres's a special folder for String data-types in the organiser).

Then your received data can simply be copied (I'd use the CPS instruction), from your received SINT array, into the .Data array of your new String tag.

eg.

CPS
Source = SickData[0] Data-type SINT[14]
Dest = NewStringTag.Data[0]
Length = 14
 
Last edited:

Similar Topics

I am needing to transfer some prod_cons tags where the data type is a string[10]. Can you move a String data type? Thanks in advance RM
Replies
18
Views
3,489
Hello guys, i want to use string data type in plc m221 by Schneider electric. to transmit data from software scada expert vijeo citect to plc...
Replies
0
Views
2,439
Good Morning , I'm trying to move a total for a dose into a dose history. I'm able to get my totals to move just fine. I would also like to...
Replies
6
Views
2,372
I am using a IO_LINK CALL FB for reading data from sensor and when I record the Vendor ID or Name in String datatype I get the first two...
Replies
5
Views
2,283
Hi is it possible to use strings as in/out parameters for an FC block in S7. i am trying to make an FC that searches for a specific code in a...
Replies
2
Views
3,666
Back
Top Bottom