Sign in to follow this  
Followers 0
David Nelson

Msg Ins Help

22 posts in this topic

hello fellow plc guru's i have been playing with the MSG instruction and think i have got the communication down but my question is this how do adress the interger file. say if i have 1 slc with an input true and i want to tell the other plc that the input is true how do i do this? i have two slc 5/04 processors communicating via dh+

Share this post


Link to post
Share on other sites
Just going off of you screen capture your setup looks correct. You destination SLC address is node 3 and you are sending N10:0 to N10:0 As far as physical inputs and outputs, I usually copy these to an integer (N) file first and then do a message instruction. Your destination can't be an Input or an Output Is you message instruction working from N10:0 to N10:0. I notice in your screen capture it has not been enabled but can't see the conditions to fire the message instruction

Share this post


Link to post
Share on other sites
Your control block needs to be different then the data your writing or reading. (Control Block N10:0? Write Data N10:0?)

Share this post


Link to post
Share on other sites
Good call Mickey. I missed that. You need to have 14 words for your control block. I would suggest making another data file (N11) just for messages so you don't end up addressing it

Share this post


Link to post
Share on other sites
O.K. i think am am starting to get a fuzzy picture of how this works. do i need a MSG instruction for each input? and what would be the norm to put in front of the instruction to fire it? question 2 is when does the message ins. need to be enabled? all the time or just when the I/O changes state i changed my interger files so they are all different now. it would be great if one of you guys could show in a few rungs how you would send the message of true/false I/O and i think i might be better able to grasp the whole ball of wax. just to let you know what i am up against i have never seen a MSG instruction used in a program but on the other hand i am under no pressure to use this just yet thanks a million David

Share this post


Link to post
Share on other sites
Could you specify what you mean by an inputs. Your screen capure specifies N10:0 so I am going to say that is what you mean. You would not need a msg instruction for each element. If you want to send N10:0 through N10:19 set your "Size in Elements" at 20 When and how you fire you message depends on how often you need to send the information. If you want to send your message continuously make the condition for firing the message that the message is not enabled. I will post a picture tommorrow if you need me to or no one else does. Working on getting a new computer setup and still downloading programming software.

Share this post


Link to post
Share on other sites
thanks for the info guys, i think i have it but my question now is can i communicate over the DH+ on channel 1 because channel 0 is the one i use for up/download thanks david

Share this post


Link to post
Share on other sites
I didn't even notice that you had selected Channel 0. I do not believe it is capable of DH+ anyway. It is only for DF1 or DH-485. Just put a 1 in the Channel of your message instruction to send it over Channel 1

Share this post


Link to post
Share on other sites
greetings all, twcontrols, i changed my channels to 1 and tried it and i do not know if it is working or not. this is why i say i do not know if its working. the incoming cmd pending s:2/5 and msg reply pending s:2/6 under processor status>channel 1 on both slc's blinks a 1 every few seconds. does this mean it is indeed communicating but i still have something else wrong. i am moving b15:0 to n13:0 to be sent to the other plc i have 1's in the n13 which leads me to believe that i am close but the n11 in the other plc is not showing any ones. thanks for your time twcontrols

Share this post


Link to post
Share on other sites
Not quite following what you are saying. Can you do a screen capture of you messages like you did before and label which processor they are coming from Just thought about it. Why don't you copy you seconds of the clock or some changing value to what you are sending. Then you can see if it is changing on the target processor

Share this post


Link to post
Share on other sites
Hi, I guess the confusion arise because you set your control block address the same as your "Data table address" N10:0. The control block N10:0 is the start address of a series of 14 words ie N10:0 ~ N10:13 used by the MSG instruction to do the messaging function. Do not use these addresses for your communication component. Say in your MSG setup screen, under this 'controller section', Data table address you set as N7:0 and in the target device section Data table address you set as N7:20. What ever data is in N7:0 is transmitted to N7:20 in your target PLC. The size in elements in the "This controller section" determines how many words of data you transmit. For eg if you set it 5, then you are transmitting N7:0 ~ N7:4 to the target of N7:20 ~ N7:24 A sample image is attached.

Share this post


Link to post
Share on other sites
Yes, Mickey already caught that. Need to make sure he is truly communicating now by continuously changing he values he is sending so he can monitor from the target Plc

Share this post


Link to post
Share on other sites
first let me thank you all for not giving up on me. I AM NOW COMMUNICATING wooohoooo (sorry kinda excited) i had everything right except for my interger files for read and write instructions were reversed i think............ i deleted the other msg ins. and got down to the bare minimum to make just oneway comms and it worked. once i figured out how it worked it seemed kinda simple thank you guys

Share this post


Link to post
Share on other sites
One thing I thought I would mention is that it is better to read with a message than write with a message. I used to have one controller do both the read and write (master/slave). By moving the read of the master controller to a write message in the slave controller I reduced my message time (one read and write) by up to 50 percent According to BobLfoot on another forum

Share this post


Link to post
Share on other sites
I didn't post the details of the message. It was using multiple messages to cram a lot of information through. My particular setup required 80 messages. In single message setups you probably would never notice but thought he may what to know about that

Share this post


Link to post
Share on other sites
Well now.... that is quite interesting. i think i may try this out once i get a little more comfy with the way it all works.i need to study up on my instuction set a little more but it gets boring to quick setting behind the screen . does any one know if you can still get the paper back version of the slc instruction set? but any way back to the point at hand, the thing that will probably will mess it up for me is if you are just reading how do you make the states of a a bit actually change with out writing the info to some type of file? but i will study a little more on this before i start asking to many stupid questions, i am not sure that i understand the whole thing fully just yet Edited by David Nelson

Share this post


Link to post
Share on other sites
Lost me in your last post. Can you explain what you are asking?

Share this post


Link to post
Share on other sites
well i aint to shure that i am asking the right questions. if i understand this correctly "By moving the read of the master controller to a write message in the slave controller I reduced my message time (one read and write) by up to 50 percent" ...was it that you have 2 read and 2 write ins and now you are eliminating 1 read and 1 write ins or am i just totally confused and have no hope...lol

Share this post


Link to post
Share on other sites
Read this part of the earlier quote. Writing a message requires more communications than reading. I had the same amount of messages. Before I used one read and one write message from Controller A to Controller B. Now I use on Read message from Controller A and one Read message from Controller B to Controller A It does exactly the same thing but a Read message is faster than a Write message so your response time is quicker. Pretty much steps 2, 4, and 5 are not done with a Read Message which makes it quicker.

Share this post


Link to post
Share on other sites
O.K. now i see how it works. thanks for the tidbit. i will try this out. sometimes after a long day at work you just have to put stuff in simple kindergarden terms for me to catch on.lol thanks again

Share this post


Link to post
Share on other sites
I know you are just learning but one other thing to think about is if you are going to have more than 16 (really 10) messages you need to start learning about Backplane Buffers Edit - Forget this post, for some reason I was thinking your were using Controllogix Edited by TWControls

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0