Beginner string question, RSLogix 5000

Join Date
Mar 2014
Location
USA
Posts
16
Hi,

I am reading on strings and having a hard time finding an instruction on making a string to display on the HMI. What I want to do is move a word into a string tag so that I can add it to a variable using concat. What instruction do I use to move the word "TEMP" into a tag "tmp"? thanks much
 
So I'm understanding that you have a STRING data type, and you'd like to put it into a temporary string so that you can CONCAT an integer to it.

If you want to "move" strings to another tag, you use the COP command.

In order to CONCAT an integer onto a string, I think you need to convert the integer to a string using the DTOS (DINT to STRING).
 
Not sure if this is want you want, but...

Just create the string tag, and on the monitor/edit tags, write 'TEMP' (or whatever you want) on the string value...
 
thanks for the reply,

COP would work if the text "TEMP" was already stored in a tag. What I want to do is store the text in a tag. For example, if I want to store the number 32 in a DINT tag I would use the MOV instruction. The MOV instruction does not work with strings because the source is alpha, so the instruction thinks "TEMP" is a tag, not raw text.
 
you're welcome

There's other ways, like moving the ascii code of each character to each
string position, and this way the MOV instruction works, but if you need a constant string I think it's easier just to write it like I said above...
 

Similar Topics

Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
249
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
115
Dear all, First of all thanks for letting me join this forum. I just need some help in one of my programming exercises. Being a beginner...
Replies
6
Views
610
I am trying to connect to SLC5/03 using an FTDI usb to rs232 with female to female converter at 1 end... however I can not connect to it ... the...
Replies
8
Views
1,270
First time poster here so long story short i built my own trainer at work so i could toy around with various things and test things and learn...
Replies
25
Views
2,151
Back
Top Bottom