initialize a string ML1100

ewiesmei

Member
Join Date
Oct 2010
Location
san diego, ca
Posts
4
anybody know how to programmatically initialize a string i.e use a string constant - i'd like to compare an incoming string and don't want to have to worry about the constant string being accidentally changed in the data table ...
controller = AB ML1100
 
I don't think RSLogix 500 has any instructions that will handle string constants (unless you're dealing with ASCII data files but they only handle 2 characters per element).

Your best option is to put the constant in a string data file and turn on data file protection as ianingram suggested.
 
found it :0)

hi guys - thanks for the quick responses
i found an old post from 'daba' that helped me find the solution:
fill the string 2 characters at a time using the following syntax -
MOV
18537 18537 = 72("H") * 256 + 105("i")
N7:0

MOV
N7:0
ST9:0.DATA[0]

MOV
2
ST9:0.LEN

now ST9:0 = "Hi" the next 2 characters would go into ST9:0.DATA[1]
 

Similar Topics

I have experience programming with languages like C++ but I am completely new to the world of PLCs. I have an existing application in Cscape and...
Replies
5
Views
1,598
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
142
"Failed to Initialize the service {3F883B87-2208-11D4-B0E7-001083022E04}" Along with "Failed to load HMI Server Service" Hello, I am getting...
Replies
2
Views
745
Hey all, I have a local STRING tag inside of an AOI. I want to initialize it with a value INSIDE of the AOI. For example, @ First scan...
Replies
9
Views
1,641
Hello Everyone! New guy here posting first time. I'm kind of lost with this, when I open my excel file I got this error message. Any one that can...
Replies
0
Views
1,338
Back
Top Bottom