RSlogix 500 MSG instruction problem

jdbjdb

Member
Join Date
Aug 2011
Location
London
Posts
12
I have written some code for a ML1100 that includes both a read and a write MSG instruction. I am communicating via Ethernet with a Compact Logix. The code in the Compact Logix has been written by an equipment supplier. My problem is that the Write MSG seems to work (in that I can send messages to the Compact Logix and can see that it is getting them) but the read instruction does not work (I can see that the CL is sending messages to the ML but the ML is not getting them). When on-line with the ML1100, if I open the Read MSG block I can see an error message "An error has been returned by an Expansion I/O communications module. Reference network". The error code is e0.
Can anyone tell me (based on the error message) if the error is likely to be in my code or the equipment suppliers.

Thanks.
 
here's one easy thing to check - which is a fairly common error ...

make sure that the CompactLogix is using INTs (and not DINTs) for the message data ...

in most cases, the RSLogix5000 has its options set up to automatically create 32-bit DINT tags ...

but ...

the SLC normally operates using 16-bit INTeger data ...

the discrepancy between the two formats often causes problems when messaging is concerned ...

suggestion: if this doesn't help, you might consider posting BOTH of your program files ... (you'll have to zip them first – forum rule) ...

and welcome to the forum ...
 
RSLogix 500 MSG

Hi Ron,

Thanks for getting back to me with your answer. I will have to contact my equipment supplier to ask for his code. I have attached my code. The MSG instructions can be found in LAD 4.

Any comments would be greatly appreciated.
 
I don't have a MicroLogix 1100 to try this out on - but I got an SLC-5/05 to work in the lab with a setup which is a lot like yours ...

try this:

in the MSG setup, instead of entering "N13:0" for the data table address of the Target device (CompactLogix) - try entering the actual name of the tag that you want to read the data from ... just be sure to spell the name EXACTLY the same way it's spelled in the CompactLogix (underscores, etc.) - and put the tag's name in "quotes" ...

see if that works - and of course, double-check that INT vs. DINT issue that I mentioned earlier ...
 
You won't be able to put the tag name in for the destination. It must be a slc 500 file type. You will have to use PLC/SLC mapping in the controllogix. Logic -> Map PLC/SLC messages, you need to map your N12 to your int tag.

A couple of tips, I try to avoid message "writes" if possible. If it's not documented well, you may never know where the data is coming from in the destination PLC. You may also want to put an xio MG20:0/EN in series with your S4 bit, no need to try to execute a msg if it's already enabled.
 
Greetings steveb1475 ...

we're probably just not understanding each other – but actually you CAN enter the tagname – at least in some cases (not sure about all situations) ... just remember to enclose the tagname in "double-quotes" or the message rung won't verify ...

the figure below is working fine using an SLC-5/05 doing a message read from a ControlLogix L55 processor – with absolutely ZERO "mapping" involved ...

I haven't worked with a MicroLogix 1100 yet – but the setup that jdbjdb has in the file he attached looks like all of the pieces of the puzzle are there ...

it would be very helpful to see the CompactLogix end of the rope ...

.


no_mapping_needed.JPG
 
I learned something new today! Thanks. I've always used the mapping, didn't know about the " "'s. Every example I've ever seen on the Knowledge Base uses mapping as well. I did come across KB 22198 after reading your reply and searching for "msg without mapping".

Need to see the clx program....
 
to be honest, awhile back I posted almost exactly the same "correction" that you did ... someone (I think it was Mickey or Bernie) taught me something new ...

I've searched for the old thread but haven't been able to find it so far ...

gotta love this forum ... thanks, Phil ...
 
RSLogix 500 MSG

Hi Guys,

I'm afraid I cannot post the clx program as it is just too big to attach(even zipped). My supplier has used DINT to map my file N12 and N13 as Ron suggested.
I've attached some screenshots of the program.

Thanks for your help guys it is much appreciated.

Jim.
 
My supplier has used DINT to map my file N12 and N13 as Ron suggested.

actually I suggested/recommended that these be set up as INTs - not as DINTs ... if they're currently set up as DINTs then that might be a big part of your problem ...

suggestion: open the file - and then do a "File - Save As" operation - but set the "Save As Type" for an "Import/Export" file (L5K extension) instead of the usual ACD format ... the resulting file is usually MUCH smaller - and has the advantage that it can (usually) be opened by people who don't have the same version of RSLogix5000 software that you're using ...

you should be able to zip and post that file ...

sorry, but I can't open the screen shot files that you posted ... you might want to try again using a JPG format ...
 
RSLogix MSG

Hi Ron,
What I meant to say was that you suggested my supplier had used DINT instead of INT. And he has. Please see attached program.
 
I'd bet money (slightly more than pocket change) that we've found your message problem ...

specifically, the older SLC-500 processor (bless its little heart) doesn't know how to handle a 32-bit DINT ... try INTs instead and see if that fixes things ...

.

use_ints_not_dints.JPG
 
Last edited:
going further (where I haven't been invited) there is another "POTENTIAL" problem that you might want to keep an eye on ...

notice in the screen shot below that your CompactLogix system is using two Periodic Tasks ... notice that both of the priorities are set for something HIGHER than a priority of SIX ... (lower number = higher priority) ...

here's the "POTENTIAL" problem that might show up as your program is further developed ...

the CompactLogix (unlike the larger ControlLogix) processor uses a "dedicated" (invisible) task to handle its Input and Output transactions ... that I/O task has a priority of SIX ... that means that each of your two periodic tasks OUTRANKS the I/O task ...

in most cases this won't amount to a hill of beans (it's nothing to lose sleep over) – especially since there is very little scan-time-consuming logic currently programmed in either of those periodic tasks ...

BUT ...

suppose that during further development, you (or another programmer) inserts more and more scan-time-consuming logic into either (or both) of those tasks ...

oops! ...

there is the "POTENTIAL" that your periodic tasks could interrupt and out-rank your I/O task ... in most cases, you'd never notice the problem – but if your system makes use of quick-acting, high-speed input and output signals, then you could start "skipping" or "missing" a signal here or there ... (that could fall squarely into the "bad" column of life's experiences) ...

the main reason I'm mentioning this is because of the (highlighted) Watchdog timer that has suspiciously been increased from its default setting of 500 ms – to a longer setting of 1000 ms ... now WHY (we might ask ourselves) has a programmer made that change? ... the obvious answer is that MAYBE he intends to insert more and more scan-time-consuming logic into that task as the program goes through additional development ...

SO ...

if he's intending to turn one (or both) of these periodic tasks into something of a "scan time hog" – then you need to keep an eye open for "POTENTIAL" problems down the road ...

consider that the types of problems that MIGHT develop will appear to be highly intermittent in nature – and most troubleshooters will attack the I/O modules and wiring before they ever come across the idea that a "task priority" issue might be the culprit ...

I've posted some more information along these lines at the following location ...

http://forums.mrplc.com/index.php?showtopic=21633&view=findpost&p=104275

like I said, don't lose any sleep over this – it very seldom causes a problem ... just be aware that it COULD become an issue since those priorities are set so high ...

party on ...

.

potential_priority_issues.JPG
 
Last edited:
RSLogix MSG Instruction

Just to let you know that the ML and CLX are now on speaking terms. Thanks for all your help.
 

Similar Topics

I'm getting an Error code on my MSG instruction that I can't clear. The Error Code Number is d0. Description "No IP configured for the Network"...
Replies
0
Views
868
Is it possible to configure the MSG block (RSLogix 500 / Micrologix 1400) to have a dynamic destination IP adress?
Replies
1
Views
1,544
Hi All, this forum has been of a great help for me in learning. i have two problems 1- I have setup an alarm so i want to calculate the number...
Replies
4
Views
2,984
Hi Everyone i have attached a file below kindly have a look. so the problem i am facing here whenever the binary bit B3 goes on it goes into...
Replies
7
Views
2,529
Hi All, I am new to plc programming. I have created a ladder logic in rslogix 500. Now I want to give input at one plc and get the output on the...
Replies
16
Views
11,122
Back
Top Bottom