Moving Strings in Logix 500

joelolson

Member
Join Date
Dec 2017
Location
Wyoming
Posts
9
I am trying to move a string data type (ST12:0) to (ST12:9) and other strings (1-8) into (ST12:9) depending on the state of a device. When I try to do this it gives me an Error: Address must be specified to the word level!

Any thoughts on how I can move strings around.

Thanks
 
I don understand the error but this may help
A MOV only move 1 word to a word of the same type
A MOV also moves the original data / Bits to the new location
A COP move arrays to and array of the same type the limit is 256 words at time
A COP copies the data to the new to the new location leaving the original data in tact
the copy is a better way to copy data len of 1 will copy 1 word

the other thing AB treats all strings as arrays of values a string of 10 characters will be an array of 10 sint ( ASCII)
when I set you the simulation of what I think you are trying to do I could only copy 3 strings of the array at a time the error I got back said I exceeded the 256 word limit
Working with string is a little different and requires some thought
 
dmroeder-
Thanks for the answer. I did need to use a COP instead of a MOV and it solved my problem. Still a little confusing because the COP asks for a length but its not the length of the String register. I was able to copy a 7 character string only using a length of one.

Thanks for the help!!
 
That makes sense 1 word 7 characters
each word can be 82 characters long
the len of a COP is words you are only copying 1 word
It's the way AB handles strings
 

Similar Topics

Hi all, I am new here... I am hoping someone could help me figure out how to transfer strings from Allen Bradley to Mitsubishi using Red Lion...
Replies
15
Views
5,964
Hey there I am using rslogix5000 and I am trying to create a lookup table to convert decimal to hex. I am trying to copy a letter into a string...
Replies
1
Views
1,304
I'm a Siemens person, and this is one of my first AB programs. The customer wants everything programmed in Ladder. I have a lot of data (3...
Replies
14
Views
222
Hello, I have a compact Logix plc and I have been task with configuring alarms into our SCADA when an Analog signal stops moving. The analog...
Replies
6
Views
244
Hello, i am a beginner with a Siemens Logo 8 PLC. I would determine the direction of an object if it passes a whole cycle of 2 input sensors. See...
Replies
2
Views
189
Back
Top Bottom