RSLogix 500 MSG statement

smiller

Member
Join Date
Aug 2003
Location
Arizona/Brazil
Posts
116
Hello all: I have a question on how the MSG block works for peer to peer communications over ethernet (SLC 5/05). I have gotten it to work but found that I had to put a contact referenced to a timer that pulses the block on and off to update the data sent to the target PLC. This works but seems clumsy and not the best for time critical communications. My background is mainly Modicon/Concept which handles peer to peer a little differently with an ethernet I/O scanner configurator. Is there a better way to get the MSG to update in a reliable manner?
Thanks,
Steve
 
As you may have guessed the MSG instruction is edge triggered and needs a rising edge to start the transfer sequence. The best way I know to trigger an MSG as fast as possible is to use an XIO of the done bit from the control word. If you do this you may need to handle the error case separately. If you use the done bit you will queue up messages with a one scan delay between when the logic detects the message is complete and the next time it is queued.
I would suggest you look at your application to make sure you need to send data that fast. Sending this data takes processor overhead during housekeeping. If you send enough messages you can impact scan time.

Keith
 
MSG Block

The best way I have found is to use 2 MSG blocks, one to write the data over and another to read it back. For example it you are writing 5 words from N21:0 to N13:0 on the remote computer then in your MSG read, read those 5 words from N13:0 into N21:100. After that use a CPT block and add the totals (N21:0 + N211 + etc + N21:100 + N21:101 + etc.). Move that value into F8:60. Add a NEQ F8:60 not equal to 0 in front on the MSG blocks.

What this does is insures that the data got sent over like a handshake.

It also only triggers the MSG block only when the data changes.

I am enclosing some sample logic from a PLC5 to a SLC504 but it will work on a 505.
 
MSG instructions aren't meant for time-critical communications; that's what I/O systems are for. ControlNet and EtherNet/IP allow you to schedule produced/consumed tags (it's especially easy in ControlLogix) that automatically update at a selected Requested Packet Interval (RPI). The implementation of Ethernet communications in the SLC-5/05 does not support I/O or produced/consumed tags.

With ordinary asynchronous MSG instructions, you're correct about triggering them repeatedly in the ladder logic. Many users choose to use the .DN and .ER bits to re-trigger the message, so that it occurs "just as fast as possible". That uses up the most processor CPU time and the most network bandwidth.

The other two popular methods for triggering MSG instructions have also been mentioned; a repeating Timer, and the routine that detects a change in the source data.

An SLC-5/05 can have up to 24 TCP connections simultaneously; if you have a lot of peer devices to talk to from the SLC that can become a limitation.
 

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
857
Is it possible to configure the MSG block (RSLogix 500 / Micrologix 1400) to have a dynamic destination IP adress?
Replies
1
Views
1,529
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,929
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,431
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,078
Back
Top Bottom