DTOS Command Question

BPyles

Member
Join Date
Apr 2014
Location
Canton Ohio
Posts
15
OK, So I have a problem where I have SINT[450] array (Data[x]). I created an index that runs through and does 450 itterations of DTOS instruction. My problem is that for instance the letter T is in the SINT as 84 displayed in ascii so my string comes back '84'. I have a string[450] array String[x] that I am converting the data into. Has anyone come across this problem before?
 
When I work with SINT[x] arrays which are actually strings, I normally use the COP instruction to copy the SINT(s) I need to the .DATA[x] SINT(s) of a string tag. Additionally I set the .LEN of the string tag to whatever the length it is supposed to be. For example 1. The string tag being filled will then display the actual textual representation of the original SINT[x] array, so the SINT as 84, will be a T within the string tag.

That way I managed to make a real string tag out of BYTE arrays which contained ASCII chars in SINTs.

Had to use this with socket communications (MSG) between a ControlLogix and a Laser unit. :geek:
 
Last edited:
more problems.

I am still having a small issue:

The String.Data[x] holds ascii characters now but the String doesn't show that it has any value. (see screen capture)

When I try to do something like Middle String it shows up as a blank string.

Capture.JPG
 
I am still having a small issue:

The String.Data[x] holds ascii characters now but the String doesn't show that it has any value. (see screen capture)

When I try to do something like Middle String it shows up as a blank string.

Are you setting the .LEN member of your string tag? If that is 0 then the string will display no characters.
 

Similar Topics

So what I thought would be simple has turned out not to be, or at least it hasn't become obvious enough to me yet. I have a DINT coming into a...
Replies
6
Views
4,024
I'm writing a new program for a CompactLogix 5069-L310ER. I used a GSV to grab the date and time from the processor. Then several DTOS and...
Replies
5
Views
2,017
Hey guys. As the title suggests, I need to configure a Danfoss Aquadrive FC202 inverter, so that its logic inhibits the local command when the...
Replies
2
Views
45
Kindly, we have the following configuration fault on a Kinetix 5700 axis. It only appears when we go online on the Plc. We are just starting the...
Replies
2
Views
87
Sigh, DeviceNet noob... I have a 1756-L55, with a DeviceNet module, and 10 PF700 all commanded with DeviceNet. One of the PF700's blew up...
Replies
3
Views
133
Back
Top Bottom