another rslogix 500 msg question

stu

Member
Join Date
Aug 2005
Location
England
Posts
786
Hi guy
I have a msg instruction which is already in the program, n37:0 if I wanted to add more bits. ( word) do I have to set up another msg instruction ?? Im sure
 
Just change the element size in the setup screen. 1 element = 1 word. Make sure you have room in the source or destination.
 
Please explain your question in more detail.

MSG instructions can be used to transport about 120 16-bit words in a single Message... the exact limit varies by protocol and I'd have to look it up.
 
Hi ken
I have a msg instruction which most of the bits are used , I need an extra 4 bits for alarms to the second plc , was wondering if there was a easy way to get the alarms to the second plc thanks
 
Hi guy
I have a msg instruction which is already in the program, n37:0 if I wanted to add more bits. ( word) do I have to set up another msg instruction ?? Im sure


There may well be unused bits available in the word that is already being transmitted to the other PLC. One would hope that the program documentation would make this obvious, although I wouldn't trust documentation alone.

I would carefully search both the source and destination PLCs to verify that the apparently unused bits are actually unused.
 
Without going any further, and regardless of the protocol the MSG's are communicating with, you cannot do it in the same message if the 4 new alarm bits are in word N37:0 in the source PLC. This word is the 1st word in Data File N37. So the 1st source word used in the exisitng MSG is either in a different Data File or further down in Data File N37. Only if the 1st source word was N37:1 would it work. The MSG instruction will only send/receive 2 consecutive words(elements) for 500CPU, 485CIF or PLC-5 communication commands. For CIP communications commands only consecutive bytes from within the same Data File can be sent.

You would have to use 2 consecutive word addresses in both the source and destination PLC's and then set both the write MSG and read MSG "Size in Elements" to "2".
 
You would have to use 2 consecutive word addresses in both the source and destination PLC's and then set both the write MSG and read MSG "Size in Elements" to "2".


You don't need a read and write, a read or write in one of the PLC's will do.

Or did I misunderstand your statement?
 
Hi guy
I have a msg instruction which is already in the program, n37:0 if I wanted to add more bits. ( word) do I have to set up another msg instruction ?? Im sure


I think that there is some confusion regarding whether N37:0 is the address of the register (or 1 of multiple registers) being transferred or is merely the first word of the MSG control block. You probably do need to provide some more detail for clarification.
 
Mickey, thanks for the correction, I worded it wrong!
I meant either or not both because which way the MSG is directed wasn't made clear either.
 
i was wrong about the data table its n7:50, i have attached a picture of the msg,
it has to elements so does that mean there is 0-9 bits in the n7:50/0-9
what if you need more bits from the target n39:20 how can i get around that ?? thanks stu
 
Because there appears to be data in N7:60 and higher, I think that you are "boxed in", unless you re-address the logic that is using those registers.

You cannot perform a "scattered read" with a single MSG instruction. In order to place the data into a different data table area, you would need to write another MSG instruction.

MSG_Data_Size.jpg
 
Just to clear up your question on how you're reading the addresses.

The Data File N7 that your looking at in the picture is displayed in Decimal(Radix). That means your viewing the addresses at the word level as a decimal value. The N7:0 in the Offset column on the left is merely a pointer telling you what the first address beside it under the 0 column is. Hover over the first address under the 0 column & it will display N7:0 - Data File N7, word 0. The next one is N7:1 and so on up to N7:9. Then it wraps around to the next line and starts at N7:10. These are all word addresses up to N7:100. There are 100 because the properties of this Data File are set to have 100 elements. An element is a word. The Data File displays words 0-9 left to right as this is the range for decimal.
Each of these words are made up of 16bits. If you change the Radix to Binary at the bottom of the Data File window, you will now be viewing each of those words at their bit level. Note N7:0 is still the first address in the Offset column. It's still pointing at the word N7:0 beside it, except the word is now displayed across 16 bits. Hover over the first address under the 0 coloumn and you will see N7:0/15. This is Data File N7, word 0, bit 15. The reason the 16 bits are displayed 15-0 from right to left is because this is the range of Binary.
The result of the all the Binary 0 and 1 values in N7:0/15 - N7:0/0 is what you see when your viewing N7:0 at the word level back in Decimal Radix view.

Where Ken has ringed the addresses 0-9 at N7:60, these represent words N7:60 - N7:69, not bits 0-9 as you thought.

So looking at your MSG settings, you are reading into PLC 2, 10 elements or words(or 160 bits), from PLC 1, starting from N39:20 - N39:29 and storing them in 10 words in PLC 2 starting at address N7:50 - N7:59.

Because the MSG source and destination addresses have to be consecutive for the MSG to read correctly, you would have to use N39:30 as the next source word in PLC 1 and N7:60 as the next destination word in PLC 2. As Ken has pointed out to you, you are "boxed-in" because word N7:60 does not appear to be free as it has a value of "5" in it.

Options/considerations:
Move addresses around to facilitate consecutive addressing. This could get messy if your not familiar enough with it. You may also have to move addresses in a HMI project?
The MSG you are trying to piggy-back is "Recipe Values From Proofer". So I would not be trying to add alarm bits to this.
How many MSG instructions are there in PLC 2? Why did you pick this MSG? Is it the only one?
You probably could just as easily setup a new MSG for these alarm bits?
There may already be alarm words being MSG'd to PLC 2 that have spare bits?
Just to be clear as well. You cannot read just 4 bits in a MSG using 500CPU Read. You will have to read at least 1 element(16 bit word).

Whatever you decide to do we can help you achieve it.

I hope I am not insulting you by explaining it to you in such detail, but I always try to be this thorough and it saves many questions if your not sure.

It's me, not you!
 
Last edited:
That's an insightful post, Geospark.

It didn't occur to me that Stu's reference to "bits 0-9" might be a misunderstanding of the Word radix in the RSLogix 500 data table display. You might have hit this nail directly on the head.

We are once again many nations divided by a common language.
 

Similar Topics

Hey guys I recently go a new PC and i need to transfer some stuff over to it i was wondering if anyone new how i could transfer my programs over...
Replies
1
Views
1,447
Is there a way to do a mass copy of comments and tag names from one program to another? They are 100% identical, one goes online (uploaded from...
Replies
1
Views
3,180
Hello. I am using RSLogix 5000 v24.00 I have two instances open and running, with two different programs. In one of my programs I have a large...
Replies
2
Views
6,222
Ya, I know. My search ability (google-fu) is lacking today. While downloading a bunch of updates from RA today I started to wonder about going...
Replies
4
Views
5,490
Help from you Rockwell gurus please. Got this nice trend created in RSLogix 5. Works fine in one PC but when I went to another PC the trend...
Replies
1
Views
7,469
Back
Top Bottom