How to convert DINT array to STRING

A common barcode is the Code128, which contains 128 "characters".

This doesn't mean a returned barcode has 128 characters. It just means that it CAN ENCODE all 128 ASCII characters. The returned length is dependent oa the particular symbol and 128 characters seems like an awful lot.
 
This doesn't mean a returned barcode has 128 characters. It just means that it CAN ENCODE all 128 ASCII characters. The returned length is dependent oa the particular symbol and 128 characters seems like an awful lot.

Agreed - I merely quoted as an example - trying to get the point across that the String UDT should be matched to the data length from the scanner being used - 100 DINTs (398 characters) is grossly OTT.

Seems like 100 DINTs was chosen to be OTT certain of being able to hold all the scanner data....

Once hiroT determines the data format from his scanner, he can create his array and String UDT sizes accordingly.
 
I appriciate for your kindness, daba and barnie.

I misunderstood.
I have thought that STRING data type is useful when data size is less than 82 byte.

As daba explanation,
Always it is good to use STRING data type regardless of data size.
Is it right?

And I have one question.
What is OTT?
 
Last edited:
OTT = "Over the Top"

"Over-Engineered"
"Wasteful"
"A sledgehammer used to crack a Walnut"

Create your own String data-type to meet the needs of the string data it has to hold.
 
Thank you.
I understand the meaning of OTT.

STRING data type that is pre-defined by AB is DINT LEN and SINT[82] DATA.

MY_STRING data type that is I defined for matching my needs data size, is INT LEN and SINT[300] DATA
( for example , this situation , barcode data is less than 300 bytes)

data1 is pre-defined
data2 is MY_STRING

Thank you.

udt_sample.JPG
 
You will likely get better response if you start a new thread, then supply all of the information that you have. Like:

- which PLC you are using
- what the DINTs look like. Are the letters mixed up?
- are the contents of the DINTs representing letters, one per 8 bits, or numbers, where you take 8 bits and make 3 characters for the number?
 

Similar Topics

I have a Structure in my project which has a few nested UDTs. They are ultimately of type DINT. What I would like to do is copy the values out of...
Replies
5
Views
2,240
Thank you so much for your help! I am trying to use an INT or DINT as a setpoint for my remote device using Modbus TCP/IP. My code is...
Replies
2
Views
2,365
Greetings fellow PLC programmers, I know there is a simple way to get the system date time of the RSLogix system. But, is there then a way to...
Replies
12
Views
8,503
I need to iterate though the bits in a DINT, but it seems you can't indirectly address a DINT at the bit level..... So my next thought was...
Replies
9
Views
3,415
I'm not a ladder or AB guy and the people asking me are using both, so this has me stumped. Long story short, they have several arrays of...
Replies
11
Views
5,293
Back
Top Bottom