MCR OTE non-retentive

Narlin

Lifetime Supporting Member
Join Date
Mar 2010
Location
phoenix
Posts
320
I am using some MCR pairs in RSLogix 500 as if they were subroutines. I could, for example, have used JMP & LBL instruction pairs instead. When an OTE is used, it being a non-retentive instruction, it executes and turns off the output even though the MCR group is not active. So says the manual and that's how it works.

My question is does anyone have a list of what the "non-retentive outputs" are? Manual says that false MCR groups will continue to scan and execute "non-retentive outputs", but other than OTE are there others?

narlin
 
Nothing comes to my mind either, but today I'm on cold medicine so my mind isn't working 100% :ROFLMAO: Anyway I'm not a big fan of using MCRs and JMPs in a program. I avoid them at all costs. They make the program hard to debug and maintain in the future. Just my opinion of course.
 
I'm not a fan of "man made subroutines" either, but the customer has a notion that too many subroutines that are called one time only are also to be avoided. We are building a machine for him that has many modes. Usually, i would make each mode its own subroutine, but that would result in about 30 subs just for the modes so i have resorted to MCRs. Just have to make sure that i don't get bit by the non-retentive bit.
 
If you are going to use MCR's i would program the outputs using internal bits and have the outputs outside the MCR areas. Multiple outputs makes the program hard to debug and i do not risk putting the outputs in an MCR.

if you use multiple outputs and place them in the MCR's, what happens when you switch from one mcr to another? those outputs that were off now turn on. what happens to the machine sequence, cylinders, positioners, sensors?

i was a contractor for a company that had installed a 25 station assembly machine and that's the way it was programmed - MCR's. one day the power to the plant was interrupted.
when the machine was powered back up - let's say it wasn't nice. over 100k in damages to the cylinders, sensors, dies.
the OEM got to rebuild the machine for free and lost their buts.

food for thought,
james
 
I could go into a lengthy discussion about the pros and cons of using MCR instructions the way you have described. It would be a totally imbalanced discussion though, as I can't think of any "pros". Here's just a few "cons", I'll keep the list short...

1. Your code becomes hard to debug - rungs that look like they are evaluating as true have their outputs false. You might be OK with this, but bubba at 3 am is gonna think the processor is screwed.

2. When you look at your code, how do you know whether you are inside an MCR zone or not, and whether the MCR is active or not. You might know the best way to determine this, think about bubba again.

3. Code between the MCR opening and closing rungs still gets executed. What a total waste of processing time.

4. Rung placement becomes critical. If you have to add rungs, you have to be careful where you put them, which means a lot of searching up and down the ladder for MCR instructions. At this point, bubba, who is used to making program edits, becomes a time-bomb !

Using MCRs to organise your code execution "modes" is not the way to go. It is marginally better to use JMPs and LBLs, since the code between the JMP & LBL does not get executed, but now you have the problem that outputs in the JMP's zone will be left on.

JSR/SBR/RET is by far the best way to handle the situation you describe. However, you still have the problem of outpts being left on when you stop calling a subroutine file. Most people don't make their subroutine calls conditional because of these sorts of problems, however, there are a few techniques you can use if you don't want the subroutines scanned all the time.

One possibility is an "initialisation" subroutine that turns off ALL outputs, internal memory bits, etc. You call this subroutine every scan, then call the subroutine for the "mode" you are running. Your outputs will reflect the states set by the code you have executed, rather than the states left behind by code you are no longer calling. Programming in SFC language (Logix5000) gets round this by having a "post-scan", which executes the SFC block one more time after it is made false, simply to reset any non-retentive outputs.

Just have to make sure that i don't get bit by the non-retentive bit.
You will....

As for the list of "non-retentive" instructions, it is simply a case of looking at what will happen to an "output" type instruction (sits on the right-hand end of the rung) that sees a false rung, which an active MCR does, it makes all the rungs false in the MCR zone....

OTEs will write a 0 to the address
TONs will reset
RTOs will feeze
TOFs will start timing !
CTU and CTD will count again the next time the rung is seen as true
FALs will reset (depends on the mode)
FSCs will reset (depends on the mode)

Also any ONS instructions will be reset.

but the customer has a notion that too many subroutines that are called one time only are also to be avoided
Get him to give you reasons why, IMHO it is not the case. It is considered good programming practice to limit code execution in this way, as it saves processor scan time, but you have to ensure you don't leave anything "on" or "true" when you stop calling a particular piece of code.

Whatever you decide to do, remember the golden rule "Thou shalt DOCUMENT thy code" - but of course that won't help bubba if he hasn't got the offline file.
 
Last edited:
I don't know if there is an authoritative list of non-retentive output instructions. But think this way ...

Let's say this rung's state at the end is TRUE. Look at this output command. Now look at the state of the output if the rung's state is FALSE. Does the state change in a way I don't want? That, for all intents, is a non-retentive output instruction.
 
You have convinced me to abandon the 20+ MCRs. I will make the shortest ones into JMP/LBL, and just use SBRs and argue the others.

THANKS
 
You have convinced me to abandon the 20+ MCRs. I will make the shortest ones into JMP/LBL, and just use SBRs and argue the others.

THANKS

JMP/LBL? Yuck. Just my opinion. They have their use for sorting loops and such, as long as there are no real outputs involved...
 

Similar Topics

Am I right in saying that if you have an MCR OTE on one rung and then have another one about 20 rungs down, is it right in saying that if the...
Replies
6
Views
2,105
Hello, I need some help to convert PMCR instruction from Omron CQM1H that using CQM1H-SCB41 to CJ2M using CJ1W-SCU4, The problem is on the old...
Replies
1
Views
843
I have an MCR0 function and ENDMCR0 tab in the main block of a 90-30 program I'm upgrading to Rx3i. When I attempt to download the program, it...
Replies
5
Views
1,649
I have been fighting with a series of GE MDS orbit MCR radios and DF1 Hdx comms (PLC5's) over low bandwidth (220mhz). This battle has been going...
Replies
27
Views
8,922
What instruction does CCW use for the MCR instruction from RSLogix500? I read in numerous places that CCW does not have an instruction like the MCR
Replies
10
Views
2,736
Back
Top Bottom