Inline strings - can it be done locally?

arnk

Member
Join Date
Jun 2008
Location
Swindon
Posts
26
Hi

On an AB Micrologix 1100 or 1400 PLC

I am using inline data within strings in MSG instructions eg
ST9:0 "This is data in a string [N7:0] to send"

So if N7:0 contained 1234 the actual string sent out looks like this "This is data in a string 1234 to send"

This works great for messages sent out of the PLC via ethernet to another PLC or for ASCII text sent to a serial port.

Is there a way of doing it to create strings locally ie to create the same message as the MSG instrucrtion and store it locally on the PLC in a ST file? I tried writing a string to the PLCs own IP address with a MSG instruction, but I get invalid IP address - I also tried 127.0.0.1 I want to somehow fool the PLC into thinking its sending a MSG and do the inline conversion so I can keep an exact copy of what was sent.

Thanks
Al
 
I am not sure of that but a work-a-around would be to have the remote PLC send a copy back to you using another MSG write block. You could set up the logic so it only sends once when it gets a new message. That will keep your network traffic down.
 
Hello Bernie

I am using the MSG command to send emails - the inline indirection works on the strings that I send. An email has two strings, one is the subject and the other is the body. I use inline indirection to put a unique id in the email subject line and live data values in the email body. Instructions for sending emails are in the Micrologix manual but basically it's a MSG instruction sent to itself, ie IP address 127.0.0.1. It usually works well unless the mail smtp server fails, which is why I want to keep a rolling buffer of the strings generated on the fly so that I can send them again later if necessary.

Al
 
You would have to manually build the string to store it locally. You can make strings from integers using the AIC command, and you can connect strings together using the ACN instruction.

Note: In a micrologix, you cannot use indirection with string addresses.
 
Thanks Okie - I feared I would have to do that. I don't really have the memory left to make the strings the hard way. A MSG to itself would have been a neat trick. It would be great to show a decimal point too in inline strings - a bit like the C printf %2.2d.
Al
 
Another option might be to encode these messages and decode them with an external application (like excel via DDE/OPC). I have done this a couple of times so I could store a lot of information with just a few integer files.
 

Similar Topics

I have some logic that is way easier to understand if I put in when I don't want an output to turn on, but I can't seem to find a boolean NOT or...
Replies
10
Views
2,952
Hi Gents I am trying to understand what is the difference between a coplanar and an inline pressure transmitter? I have to choose one of the two...
Replies
3
Views
36,756
Hello all, As the title says I am looking for some information on some inline 110 VAC surge protectors. Something that is compact in size and can...
Replies
10
Views
5,483
Hey guys. Hate to ask another unrelated question but I am a little desperate. We have an Elsner rewinder. We have a customer that is looking for...
Replies
1
Views
1,666
Hey all, was wondering if it was possible to shift values in an array of strings? I have a database that I am loading up with "Users" in the...
Replies
2
Views
301
Back
Top Bottom