RSLogix 5000 MSG Blocks

Sushiholic11

Member
Join Date
Nov 2007
Location
Vancouver
Posts
7
I have a question regarding MSG blocks and transferring information over ControlNet between Processors on a ControlNet Network.

First off this is what I have:

3 Controllers on a ControlNet network that I need to pass information between.

What is the easiest way to do this? With a MSG command?

I have the following parameters for Writing from one PLC to another.

MSG Block
Configuration:
Message Type: Block Transfer Write
Source Element : K101B_Write[10] (10 words)
Number of elements: 10

Communication:
Path: I chose the CNB itself
Module Address: ControlNet and the slot the CNB resides in

My question is where is the destination? I can see the source but where do I tell it where to go? Or is this done by the read in the other Processor? But in the Read all I have is a destination, telling where to put the data.

I am obviously missing something, any help would be appreciated.

Bob
 
The path parameter of the message instruction is explained in the RSLogix5000 - General Instructions online book that was probably installed with RSLogix5000. On my version 16 copy, page 3-28 has a helpful table.

Basically, what you need to do is describe a path from a processor to another processor. Here is an example:

Processor A is in slot 1 and it's CNB module is node 4 and is in slot 2.
Processor B is in slot 3 and it's CNB module is node 7 and is in slot 4.

The path from Processor A to B would be:

1,2,2,7,1,3

1 backplane
2 slot 2

2 control net port (the network port on most modules is 2)
7 node 7

1 backplane
3 slot 3

The path from Processor B to A would be:

1,4,2,4,1,1

If when you type this in, the first pair of numbers disappears and is replaced with the name of your CNB module, that's OK. That happens if the module is in the I/O tree.

Something else in your message setup looks a little odd.

Source Element : K101B_Write[10] (10 words)
Number of elements: 10

This indicates that the data you are sending is K101B_Write[10] through K101B_Write[19]. If you intended to send the first 10 words, you would change the source element to K101B_Write[0].
 
Sushiholic11 said:
MSG Block
Configuration:
Message Type: Block Transfer Write
Source Element : K101B_Write[10] (10 words)
Number of elements: 10

Communication:
Path: I chose the CNB itself
Module Address: ControlNet and the slot the CNB resides in

First off, if you are communicating between ControlLogix processors, use the CIP Message Typed Read (or Write)
What you identified, your Source Element is starting at word 10 and writing 10 words (10 through 19).
You also need a Destination Element (tells the controller where to put these 10 words - must be defined in the target controller and must be of the same type as your source element).

Sushiholic11 said:
My question is where is the destination? I can see the source but where do I tell it where to go? Or is this done by the read in the other Processor? But in the Read all I have is a destination, telling where to put the data.

If you are WRITING data to a controller, then you need to decide where to place that information. Probably in an array that is similar in nature to the one that you are sending. You do not need a matching pair of Write and Read instructions. All the information that is necessary is in the message instruction.

The path is in two pair sets ...
Example:
1, 1 (from the processor to the backplane, to the card in slot 1)
2, 20 (say the card in slot 1 is a CNB, then 2 is out the 'A' port, 20 is the ControlNet node number that you are trying to reach).
1, 0 (now that we are in the node 20 card, go to the backplane (1) and to the card in slot 0 (in this example the destination controller).

So in the example, the communication path would be 1, 1, 2, 20, 1, 0.

I typically like to limit my communciations to READ messaging. That way you are pulling the information, not pushing it.
 
Thanks-you for your help!! Can you take another looks to see if I followed along correctly?

MSG Configuration:

Message Type: CIP Data Table Read
Source Element (from other processor): K101B_INT_TO_COMP
Number of elements: 10
Destination Element (in this plc): K101B_INT_FROM_MAIN


Communication:

Path: 1,12,2,4,1,0 (CNB in slot 12 of this plc, talking via ControlNet to PLC on Node 4, in Slot 0)

So....this should read data from K101B_INT_TO_COMP, which is in the PLC at slot 0 on Node 4, and place it in K101B_INT_MAIN. Both arrays are set as INT[10].

Look ok?

Thanks.

Bob
 
MSG Configuration:

Message Type: CIP Data Table Read
Source Element (from other processor): K101B_INT_TO_COMP[0]
Number of elements: 10
Destination Element (in this plc): K101B_INT_FROM_MAIN[0]


Communication:

Path: 1,12,2,4,1,0 (CNB in slot 12 of this plc, talking via ControlNet to PLC on Node 4, in Slot 0)


Another method to define the path is to set it up in your I/O Configuration tree. Then the MSG path is just the name of the remote processor as defined in your I/O Configuration tree. This is much easier to troubleshoot in the future.

I would stay away from Produced/Consumed for something as small as this. It opens a whole can of worms with scheduling the network using RSNetworx for ControlNet and it cannot be modified in the future without taking the whole network down, placing PLCs in program mode, and rescheduling.

With a MSG instruction, I would make the arrays larger to allow for future expansion. You can leave the "Number of Elements" set at 10 for now and that's as much data as will be transferred. To send more, you simply increase this number on the fly to a maximum equal to the array size. I would make the array size 50.
 
Another thing to consider - conditionalizing your communications. I tend to do some overhead programming to determine when to send messages - basically only send data when the data has changed. This takes some scripting to do, but is worth it if you have a lot of data to send on a busy network.
 
Thanks for all of the help!! I cant put it to the test for a little while as we only have one processor available at this time.

Thanks again!

Bob
 
MSG BLOCK Freeze

hi there, Need some ideas from you guys. we have 4 the same machine with 1 plc each. Our vendor created a software(RSLOGIX 5000) which can be used for all machines. These four is communicating to each other through a remote DATA PLC which is used as an interface through wireles access point. we know that we are having a communication loss sometimes, but the problem is we are encountering MSG BLOCK FROZEN in our four machines. Logic is still working but completely blind from other machines. What we did was turning OFF/ON the plc and it goes back to normal... any comments will be ver much apprciated. Thanks...
 
Why a MSG? why not produced and consumed tags?
If you don't need a real time messaging, use MSG instruction. Otherwise, for example, if you want to control an I/O, you must use produced and consumed tags.
greetings
 
hi there, Need some ideas from you guys. we have 4 the same machine with 1 plc each. Our vendor created a software(RSLOGIX 5000) which can be used for all machines. These four is communicating to each other through a remote DATA PLC which is used as an interface through wireles access point. we know that we are having a communication loss sometimes, but the problem is we are encountering MSG BLOCK FROZEN in our four machines. Logic is still working but completely blind from other machines. What we did was turning OFF/ON the plc and it goes back to normal... any comments will be ver much apprciated. Thanks...

Could be a problem with the logic used to execute the MSG or using up connections. Can you post your program or at least a screen shot of the MSG logic?
 

Similar Topics

I'm trying get information from another same PLC PLC1: CompactLogix 1769-L16ER-BB1B (192.168.0.133) PLC1: CompactLogix 1769-L16ER-BB1B...
Replies
17
Views
1,585
Hello everyone, it is the first time that I need to exchange messages between 2 PLCs, a L16ER-BB1B and an L61. The first has 192.168.1.1 as its...
Replies
15
Views
4,456
Hello, I was curious if any one could shed some light on setting up a MSG statement between two PLC's on different networks. I'm trying to read...
Replies
1
Views
1,329
If you click help and then click Vendor Sample Projects while in RSLogix 5000, a PDF will pop up with some neat examples. One example shows how to...
Replies
5
Views
3,854
Hello Guys, I'm trying to set up a message instruction between two Compact Logix processors that are on the same ethernet network. All I'm...
Replies
9
Views
2,441
Back
Top Bottom