Convert from SINT to ASCII

Krone

Member
Join Date
Oct 2020
Location
Denmark
Posts
8
Hi guys

I have a barcode scannes which gives me some numbers (SINT) that I want to convert into ASCII, so that I can see that ASCII char insted of the decimal.

I've tried to convert the decimal into a string, but i dont know what to do with it.
I've seen some tropics on this, but to be hornest, data conversion is not my strong side.

I'm using studio 5000.

I hope someone can help me.

BR
Anders
 
Hi Krone

Just a few questions :)

What PLC are you using and how do you connect the barcode scanner to the PLC ?
 
Last edited:
If your input string ends up in a array of SINT

Copy the length you want from the array into a string

The screen shot is a copy from a int array to a string and then converts the string to DINT

Copy string.png
 
Thanks Holmux!

Didnt have the Dest as a string.

It is possible to read the length of my data in the array?
I know that i can read the size of it by using the SIZE function, but i need to only know the polulated values.
 
Last edited:
In the example I showed you I get the length from my module,

I have a feeling you will get the same info from your barcode scanner.

Do you get different lengths of barcodes into the system ?
 

Similar Topics

This pertains to RSLOGIX 5000. I have a machine that sends me back a single ASCII character in a SINT and I need to convert it into its decimal...
Replies
2
Views
2,365
Hi all! looking for help converting an 8 bit word SINT tag into decimal. I have an IFM SBN246 flow sensor wired in my controller (L310ER) and it...
Replies
4
Views
2,163
Hey guys, I'm trying to get a number out of a INT and move it to a SINT. Source: 2#0000_0001_1100_0010 Dest.: 2#0000_0000 Tried to...
Replies
5
Views
1,907
Happy Monday Everyone, I am trying to read the Assembly Number from a Flow Meter via Hart. It is coming back to me as 3 USINT values. I have...
Replies
3
Views
8,043
Hello all, I'm currently working on a servo motor linear positioning system (ball screw). I'm all set up regarding communication between my HMI...
Replies
1
Views
87
Back
Top Bottom