You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old May 21st, 2018, 10:05 PM   #1
Dani610
Member
Australia

Dani610 is offline
 
Join Date: May 2018
Location: Adelaide
Posts: 33
Rslogix 500 Msg Instruction

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 of times the alarm goes on for that i can use a counter but in counter i have to set a specified value upto which it can count so what is a better approach

2- below I have attached a pic of my output window i am using two ML 1400. Input is given at plc1 and output is at plc2. They are connected via ethernet switch now when i unplug the cable of plc1 the output goes off with error bit being enabled on message command but when I plug the cable in again the error bit stays on and i have to go offline and then online again to turn output on. what is the solution to that when i plug the cable in again the program starts working again.

thank youd.jpg
  Reply With Quote
Old May 21st, 2018, 11:20 PM   #2
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,983
The logic driving your messages is depending on the message either not being enabled or being in an error state in order to trigger it.

The error bit will go true after the timeout specified by the channel configuration. If you want the error to occur sooner, you can either change the channel configuration timeout setting or manipulate the MTO word for the messages. I have a couple of applications in which I wanted the error to occur if a remote node could not be reached in a maximum of 5 seconds, so for those nodes, I write (MOV) a constant of 5 to the MSG control element MTO words. This is done in a routine that runs once on startup for dozens of MSG elements. In your case, it would be MG10:0.MTO and MG10:1.MTO. If those values are set to a smaller value than what gets assigned based on the channel configuration, then the channel config can be left "normal" for other connections and the error will occur sooner.

I would take a different approach to triggering the messages and monitoring the status.

Some folks ignore the message error bits and simply use a self resetting timer to trigger them once per second or so. This can work in many situations but can also cause a situation where the channel buffers get filled up if there are many errors, so my preference is to always wait for a done bit or error bit before triggering the next message.

I have seen some programs that use separate timers to manipulate the TO bit (turn on the timeout bit through ladder logic) to speed up the normal error mechanism of the message. This works well, but if you have a program with dozens of messages, you can end up with a boatload of extra timers and associate logic to make this happen for all of them.

Another thing to consider is what happens not only when the ethernet connection "goes away" but what if the PLC on the other end is faulted but still responding to messages?

I will normally read a "hearbeat" value as part of the block of data. If the remote PLC is running, it constantly changes the heartbeat address (For example MOV S:4 "Free Running Clock" to N10:9 "Last word of data to master PLC"). The master PLC will compare that hearbeat value to a copy of it taken on the previous scan. If the values remain equal too long, the remote PLC has either stopped communicating or stopped running. If the data changes frequently enough to keep the timer from getting done, you have proof that not only are the messages working, but that the remote PLC is actually executing logic.

Tomorrow, when I am at work, I can post some code snippets of the way I set up MSGs in a Micrologix 1400.
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old May 21st, 2018, 11:34 PM   #3
Dani610
Member
Australia

Dani610 is offline
 
Join Date: May 2018
Location: Adelaide
Posts: 33
Quote:
Originally Posted by OkiePC View Post
The logic driving your messages is depending on the message either not being enabled or being in an error state in order to trigger it.

The error bit will go true after the timeout specified by the channel configuration. If you want the error to occur sooner, you can either change the channel configuration timeout setting or manipulate the MTO word for the messages. I have a couple of applications in which I wanted the error to occur if a remote node could not be reached in a maximum of 5 seconds, so for those nodes, I write (MOV) a constant of 5 to the MSG control element MTO words. This is done in a routine that runs once on startup for dozens of MSG elements. In your case, it would be MG10:0.MTO and MG10:1.MTO. If those values are set to a smaller value than what gets assigned based on the channel configuration, then the channel config can be left "normal" for other connections and the error will occur sooner.

I would take a different approach to triggering the messages and monitoring the status.

Some folks ignore the message error bits and simply use a self resetting timer to trigger them once per second or so. This can work in many situations but can also cause a situation where the channel buffers get filled up if there are many errors, so my preference is to always wait for a done bit or error bit before triggering the next message.

I have seen some programs that use separate timers to manipulate the TO bit (turn on the timeout bit through ladder logic) to speed up the normal error mechanism of the message. This works well, but if you have a program with dozens of messages, you can end up with a boatload of extra timers and associate logic to make this happen for all of them.

Another thing to consider is what happens not only when the ethernet connection "goes away" but what if the PLC on the other end is faulted but still responding to messages?

I will normally read a "hearbeat" value as part of the block of data. If the remote PLC is running, it constantly changes the heartbeat address (For example MOV S:4 "Free Running Clock" to N10:9 "Last word of data to master PLC"). The master PLC will compare that hearbeat value to a copy of it taken on the previous scan. If the values remain equal too long, the remote PLC has either stopped communicating or stopped running. If the data changes frequently enough to keep the timer from getting done, you have proof that not only are the messages working, but that the remote PLC is actually executing logic.

Tomorrow, when I am at work, I can post some code snippets of the way I set up MSGs in a Micrologix 1400.
Thank you for your reply and i will wait for the snips.

All I want to do for now is that when i plug the ethernet cable of plc1 back again the plc2 should start reading the message again rather than i have to go offline and then online again to start reading the msg again
  Reply With Quote
Old May 22nd, 2018, 09:32 AM   #4
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,983
Try something like this to keep your messages going:
Attached Images
File Type: jpg ml1400msgsimple.jpg (41.5 KB, 49 views)
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old May 23rd, 2018, 08:34 PM   #5
Dani610
Member
Australia

Dani610 is offline
 
Join Date: May 2018
Location: Adelaide
Posts: 33
Quote:
Originally Posted by OkiePC View Post
Try something like this to keep your messages going:
Thanks it helped alot
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
adding slc 500 to rs5000 for messaging Rippey574 LIVE PLC Questions And Answers 15 September 12th, 2017 06:24 AM
another rslogix 500 msg question stu LIVE PLC Questions And Answers 13 February 28th, 2013 09:15 PM
FIFO instruction in Melsoft Gx Developer to RsLogix 500 epicnote LIVE PLC Questions And Answers 4 August 26th, 2011 05:57 PM
RSLogix 500 Instruction Toolbar Speedup? wildcatherder LIVE PLC Questions And Answers 6 April 29th, 2010 08:30 PM
Instruction manuals for AB RSLogix 500 and Siemens S7 dbonniwell LIVE PLC Questions And Answers 5 May 14th, 2005 04:41 PM


All times are GMT -5. The time now is 02:49 AM.


.