ASCII array converted to string

Join Date
Apr 2004
Location
Bakersfield
Posts
7
Problem: The new panel view plus doesn't support character arrays.

The old Panel View program had them.

What I did was just set multiple string display objects next to each other on the screen. This doesn't always look correct.

Is there a nice and easy way to move ascii elements into the same string element to form a word.
 
Since you reference Panelview, an A-B processor is assumed. Check out the ACN and AEX instructions in the 'Instruction help' section.
 
whoops, sorry, yes I am using an slc 5/04.

The ACN and AEX instructions that you suggested only supports the "ST" data type.

What I need to do is to concatenate words of the "A" data type into a string.
 
I guess I could move each ASCII character into its own string and then concatenate the strings.

I just thought there might be a way to move the characters into the string at different positions using some position reference.
 
Mike Hendrickson said:
I just thought there might be a way to move the characters into the string at different positions using some position reference.
If you had a PLC 5 you could. Those processors allow access to individual string characters by the (undocumented) convention:

ST11:0.[DATA0]

where DATA0 is a fixed offset into the string. I'm told the SLC series allows this but, only at a word (read two character) level.
As in:

MOV
+-MOV--------------+
---------------| N7:0 ST11:0.[1] |
+------------------+

This would move the two 8-bit characters represented by the contents of N7:0 into the 3rd and 4th character positions respectively of ST11:0.

I believe you could still do it like this, you'd just need to 'poke' the string length in through program logic. The disadvantage of this is that the offset is static, you wouldn't be able to set up a loop to build the string for you. Your idea of building up the string one character at a time, on the other hand is amenable to a looping solution. I'm pretty sure though that you'll still have to 'manually' set the string length when the string is complete.
 

Similar Topics

hi, i try to capture barcode data using UDT with SINT ascii array. i have all the data i need but it in array format, how can i convert to 1...
Replies
5
Views
3,052
I have a SINT[500] array that is pulling data from a scale. The maximum number of characters that can be sent by the scale is 6, and there are two...
Replies
7
Views
1,594
Using a ControlLogix processor, with version 12 firmware. I have a an array of INTs, where each INT contains a single ASCII character. I am...
Replies
6
Views
2,010
Greetings, I am currently working on a bit of code reset a work cell after a specific fault. It will be the scanning of a supervisors barcode...
Replies
5
Views
3,336
Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
92
Back
Top Bottom