RSLogix 5000 Inserting Data Variable Into A String

AF52

Member
Join Date
Apr 2010
Location
Lancashire
Posts
8
Hello,
Please could someone assist me with putting three REAL variables into one STRING variable. I am using RSLogix 5000.
I want to print a pressure value (Press_Room01), a temperature value (Temp_Room01) & a humidity value (Hum_Room01) on one line of a serial printer using the AWT command. All three variables are REAL’s
I have converted all REALs using the RTOS command and can successfully print them on three lines individually.
Many Thanks.
 
I don't have RSLogix5000 available at the moment but there should be a command to concatenate a string. You may need another string to store the spaces or other characters needed between your value strings, and then several concatenate instructions to put them all together two pieces at a time.

EDIT: From manual:
String Concatenate
(CONCAT)
 
Last edited:
Thank you OkiePC for your quick response.
I have seen the CONCAT instruction but it seems a little ‘clumsy’.
In Logix 500 you simply used [insert_variable] . I wondered if there was something similar in 5000?
 
I have used the ACN (same as concatenate) in Logix500. I am not following your [insert_variable] statement.

If you use AWT for each of the first two strings and there is no LF or CR character, and then use AWA (with termination character set to LF or CR) for the last one this might work.

Also, you might be able to put the pieces of the string together by manipulating the length of the destination string and then copying the characters into the appropriate positions in that string. I think this would be just as clumsy as three or four CONCATs.
 
[insert_variable]

He's referring to "in-line indirection" available when using the AWA and AWT commands. The string can contain variable addresses and the command will fill in the current value at the time of transmission.

If RSLogix 5000 doesn't have the same option then you will just have to build the string using conversions and the concatenate commands before transmitting.
 
Thank you OkiePC for your quick response.
I have seen the CONCAT instruction but it seems a little ‘clumsy’.
In Logix 500 you simply used [insert_variable] . I wondered if there was something similar in 5000?

There is an Insert Instruction in Logix that does something similar. It looks like you would have to convert the Variables first, but it might do what you are looking for. Have a look in the Instruction Help, or the Instruction Reference Manual Chapter 18.

http://literature.rockwellautomation.com/idc/groups/literature/documents/um/20comm-um002_-en-p.pdf

Stu....
 
Hello,
Can anyone please tell me how to represent the variables in RSlogix 5000 (Function Block), supposing that these variables are adaptable through the running of the program?
With best regards
 

Similar Topics

Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
109
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
101
Hi All, I've been pulling my hair out trying to fix this for a few days and need some advice. I have V19.01, v20.05, V21, V24, V30, V31, V32...
Replies
5
Views
351
Hello Friends I have a installation with v16, v17, v18, v19, v20. When I tried to open a v20 file, the enable source protection was not enabled...
Replies
1
Views
214
Back
Top Bottom