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 June 15th, 2017, 05:21 AM   #46
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,318
I'm teaching non-stop this week (twelve-hour days) so I haven't had time to follow this thread at all ... but here's a tip that might help you guys along the way ...

Rockwell actually does a pretty good (I'm tempted to say "excellent") job in RSLogix5000 of describing how each instruction operates during PRESCAN ...

for a couple of quick examples: just put your cursor on an OTE – OTU – OTL – CTU – ONS – etc. and hit the F1 key for the online help feature ... scroll down to the "Execution" section and see how the instruction is intended to work during the PRESCAN operation ...

party on ...
.
Attached Images
File Type: png prescan_ote.PNG (6.8 KB, 112 views)
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.


Last edited by Ron Beaufort; June 15th, 2017 at 05:24 AM.
  Reply With Quote
Old June 15th, 2017, 05:39 AM   #47
AustralIan
Member
United Kingdom

AustralIan is online now
 
Join Date: Jan 2013
Location: UK
Posts: 484
Quote:
Originally Posted by Ron Beaufort View Post
... but here's a tip that might help you guys along the way ...
Excellent example of teaching someone how to find the information themselves in addition to just providing the information one needs for this specific circumstance.
  Reply With Quote
Old June 15th, 2017, 07:21 AM   #48
LoganB
Lifetime Supporting Member
United States

LoganB is offline
 
Join Date: Apr 2017
Location: Michigan
Posts: 352
ASF thanks for pinning that down. That's a useful distinction to understand!
  Reply With Quote
Old June 15th, 2017, 08:45 AM   #49
dmargineau
Lifetime Supporting Member
United States

dmargineau is offline
 
dmargineau's Avatar
 
Join Date: Dec 2011
Location: Midwest
Posts: 2,255
Quote:
Originally Posted by ASF View Post
No. It's a common misconception that OTE's only hold "on" while they're actively being scanned. It's not the case. Try not to think of an OTE as a relay coil - as much as that's how all of us probably learned, that's not actually the case.
There is no misconception within this choir...Been there done that...If I only had a dime for each time I forgot the Main JSR...

Again:

If a functional system goes down when running, upon power-up the prescan will reset all relevant (functional) state dependent instructions such as OTEs, TONs, ONSRs, etc.; this will provide a 'safe' state for the operation commencement....

The code which does not get scanned does not matter...It didn't do anything prior to power-down hence will not do anything after the power-up...

Someone here was not aware of this fact...Now he is and probably understands why...

Quote:
Originally Posted by ASF View Post
Do you think we've derailed the OP's thread enough yet...
Yes, we have derailed this thread..Mea Culpa......
  Reply With Quote
Old June 15th, 2017, 05:42 PM   #50
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,259
Quote:
Originally Posted by dmargineau View Post
There is no misconception within this choir...Been there done that...If I only had a dime for each time I forgot the Main JSR...

Again:

If a functional system goes down when running, upon power-up the prescan will reset all relevant (functional) state dependent instructions such as OTEs, TONs, ONSRs, etc.; this will provide a 'safe' state for the operation commencement....

The code which does not get scanned does not matter...It didn't do anything prior to power-down hence will not do anything after the power-up...

Someone here was not aware of this fact...Now he is and probably understands why...


Yes, we have derailed this thread..Mea Culpa......
Okay, gotcha (I think) - you're saying that the OTE's in uncalled routines will not reset their associated BOOL tags, but that's irrelevant because if the routine isn't called, that logic isn't doing anything anyways. Have I read you right?

Although I have once seen a motor that would just never stop running - the only way they could get it to stop was the e/stop. Turns out that someone had accidentally deleted the OTE to that output online while the motor was running, so the output just stayed on permanently and whenever the e/stop circuit was healthy, the motor ran. The same thing could in theory happen if you delete the JSR to your subroutine, or copy the rung with the OTE into an uncalled subroutine. Then you have an unsafe state that prescan won't fix.

But then, at that point, you can probably safely blame the programmer rather than the PLC and it's prescan philosophy. A careless programmer could just as easily create a similar "unsafe" situation by using OTL and OTU instructions to control the motor starter instead of an OTE. As someone's signature here says, "that's the beauty of PLC's. They don't have emotions, they just run code."
  Reply With Quote
Old June 15th, 2017, 05:58 PM   #51
dmargineau
Lifetime Supporting Member
United States

dmargineau is offline
 
dmargineau's Avatar
 
Join Date: Dec 2011
Location: Midwest
Posts: 2,255
Quote:
Originally Posted by ASF View Post
Okay, gotcha (I think) - you're saying that the OTE's in uncalled routines will not reset their associated BOOL tags, but that's irrelevant because if the routine isn't called, that logic isn't doing anything anyways. Have I read you right?
Yep... 4 X 4...
  Reply With Quote
Old June 15th, 2017, 06:53 PM   #52
DSMR
Member
United States

DSMR is offline
 
Join Date: Aug 2014
Location: North Carolina
Posts: 14
This is a retentive flip flop. I use this almost exact code structure a lot.

I like to keep the HMI as dumb as possible (especially with FTViewME as it is quite possible the devil).

This flip flop is very dependable and is battle proven.
  Reply With Quote
Old June 16th, 2017, 07:57 AM   #53
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 5,065
Quote:
Originally Posted by dmargineau View Post
Yep... 4 X 4...
No. Logic called, say, in a setup, or recipe subroutine by an operator is scanned once. Outputs are set. They are NOT reset on power up.

If you want things in a default state on power up, do it yourself. Don't rely on the processor to fix it for you.

That said, I never use OTE's for persistent states anyway, that is what latches are for.
__________________
------------------------------------
How to ask questions the SMART Way!

Look First, Ask Second!

  Reply With Quote
Old June 16th, 2017, 08:07 AM   #54
dmargineau
Lifetime Supporting Member
United States

dmargineau is offline
 
dmargineau's Avatar
 
Join Date: Dec 2011
Location: Midwest
Posts: 2,255
Quote:
Originally Posted by rdrast View Post

If you want things in a default state on power up, do it yourself. Don't rely on the processor to fix it for you.
I agree since I always use the S:FS extensively throughout my applications.

That being said, I am still comforted by the fact that the Logix CPUs reset all 'to be scanned continuously' OTEs, TONs, ONSRs, etc. upon a power-up prescan...
  Reply With Quote
Old June 17th, 2017, 02:13 AM   #55
spaderkung
Member
Sweden

spaderkung is offline
 
Join Date: Aug 2007
Location: A flat type "4"
Posts: 231
The ONS seems they are not needed. The pb hmi tag is reset when pressed.
__________________
Jon Bolmstedt, Automation Engineer (for hire)
  Reply With Quote
Old June 17th, 2017, 04:15 AM   #56
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 3,953
Quote:
Originally Posted by rdrast View Post
No. Logic called, say, in a setup, or recipe subroutine by an operator is scanned once. Outputs are set. They are NOT reset on power up.

If you want things in a default state on power up, do it yourself. Don't rely on the processor to fix it for you.

That said, I never use OTE's for persistent states anyway, that is what latches are for.
That highlighted statement is incorrect....

Let's put this discussion to bed. I have written, and tested, aa application to test whether OTE bits are, or not reset on power-up.

The application consists of 4 identical tasks -

Continuous Task
Periodic Task
Event Task triggered by an EVENT Instruction (which incidentally does not exist)
Event Task triggered by a Consumed Tag data-change

In each task I have one program with the following Routines -

MainRoutine (assigned as the Main Routine)
FaultRoutine (assigned as the Program Fault Routine
CalledByJSR_True (a subroutine whose calling JSR is unconditional)
CalledByJSR_False (a subroutine whose calling JSR follows an AFI)
No_JSR m(a subroutine that has no JSR or FOR to call it) *EDIT
CalledByFOR (a subroutine called by a FOR Instruction)

Each Routine has an unconditional OTE which would, if executed, turn ON an appropriately named TestBit in a UDT I created.

Now I'm only testing what the Pre-Scan does, so I don't want any "OTE" code executed. To achieve this, I deliberately fault the processor on Rung 0 of the MainTask, MainProgram, MainRoutine by MOVing a negative number into a timer's preset, then executing a TON instruction.

This will immediately Fault the processor, the FaultRoutine will be executed, which has a TND as the first rung.

To test what the pre-scan does to all my OTE's, I first put the processor into Program mode, then set all the "TestBits" on in my UDT tags. (Picture 1).

I then put the processor into Run mode, which you can see from picture 2 faults the processor. Now no code has executed, except for my MOV and the bad Timer, we can see from picture 2 which of my OTE's have been turned OFF by the Pre-Scan.

Lo and behold, everything has been reset, except for the OTE in a routine that has no calling mechanism.
Attached Images
File Type: jpg Picture_1.jpg (108.2 KB, 7 views)
File Type: jpg Picture_2.jpg (106.5 KB, 6 views)
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old June 17th, 2017, 04:36 AM   #57
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 3,953
I had forgotten to include "Inhibited" Programs, and "Unscheduled" Programs...

My subsequent tests on those categories reveal that the Pre-Scan does not reset the OTE's at all...

So there's a warning here for when you are working on live equipment...

I feel I ought to emphasize thefollowing statements...

If you un-inhibit a program, it will not have been pre-scanned, so its outputs may be left on from before it was inhibited.


If you re-schedule a program, it will not have been pre-scanned, so its outputs may be left on from before it was unscheduled.

*EDIT* Also - If you add a JSR to a subroutine that you had previously removed, any pre-scans on that routine will not reset OTE's,
so its outputs may be left on from before the JSR was deleted.

ALL of those operations can be done while the processor is operating in RUN mode !!
Attached Images
File Type: jpg Picture3.jpg (75.3 KB, 8 views)
File Type: jpg Picture4.jpg (82.0 KB, 7 views)
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem



Last edited by daba; June 17th, 2017 at 04:54 AM. Reason: Added Pictures
  Reply With Quote
Old June 17th, 2017, 04:15 PM   #58
Sparkyman1
Member
United States

Sparkyman1 is offline
 
Join Date: Apr 2017
Location: Minnesota
Posts: 32
I'm glad that I opened up a discussion here, that's you guys for all your thoughts on this
  Reply With Quote
Old June 17th, 2017, 07:27 PM   #59
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 3,953
Quote:
Originally Posted by Sparkyman1 View Post
I'm glad that I opened up a discussion here, that's you guys for all your thoughts on this
The definitive conclusion is that the "pre-scan" will be effective (i.e. turning off OTE bits, resetting TONs etc.), on any logic that the controller could possibly execute with the current configuration.

My previous (loud) post highlights how that pre-scan can be circumnavigated, and is intended to be a safety warning....
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old June 18th, 2017, 05:46 PM   #60
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,259
Thanks daba. An extremely thorough and informative experiment. Think I'll save this post for the next time this discussion comes up
  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
InOut Tags and Duplicate Destructive Bit warnings ASF LIVE PLC Questions And Answers 0 August 18th, 2015 01:10 AM
Sequencers randy LIVE PLC Questions And Answers 43 December 20th, 2014 03:10 PM
can you specify bits in omron PLC's maintenance@seta LIVE PLC Questions And Answers 5 January 6th, 2011 03:54 AM
Bits and more bits, chess, bit boards and tidbits. Peter Nachtwey LIVE PLC Questions And Answers 3 May 3rd, 2007 03:21 PM
Please Explain blackslipper LIVE PLC Questions And Answers 7 December 27th, 2005 01:14 AM


All times are GMT -5. The time now is 04:21 AM.


.