![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Nov 2007
Location: BC
Posts: 7
|
Hi folks,
Pretty new to this stuff and here is the problem I am looking for an answer too. I have a main program that calls my subroutine which is working perfectly, however when I press a reset pushbutton in my main program, it should unlatch my binary bit B3:0/1. It does, but for some reason the timers in my subroutine fail to de-energize (they stay enabled and the DN flags don't de-energize). Here is my subroutine: ![]() Thanks! Jason |
|
|
|
#2 |
|
Lifetime Supporting Member + Moderator
|
Can you post your code ? (zipped rss file)
__________________
Regards Dave "When you are courting a nice girl an hour seems like a second. When you sit on a red-hot cinder a second seems like an hour. That's relativity." Albert Einstein (1879-1955) |
|
|
|
#3 |
|
Member
|
jasonc,
We need to see the rung where the push button turns B3;0/1 on & off before we can help. B3:0/1 may be alternating off/on every other scan, which is so fast that you won't see it on your PC screen. BD |
|
|
|
#4 |
|
Member
|
Removed as PeterW noted an error in my statement thanks Peter
PeterW you are dead right, I missed that my excuse is I need a larger screen so I dont need to scroll across Last edited by Gil47; March 30th, 2008 at 05:49 AM. |
|
|
|
#5 | |
|
Member
![]() Join Date: Jun 2006
Location: Edmonton
Posts: 2,431
|
Quote:
The code in the sub-routine looks fine if T4:0 exists externally. As others have mentioned, we would need to see the external code. |
|
|
|
|
#6 |
|
Member
![]() Join Date: Nov 2007
Location: BC
Posts: 7
|
Here is my main program:
![]() I am using the RSLogix500 PLC Simulator form theLearningPit.com. I mainly am just wondering if there was something I misunderstood in the way subroutines work. If not, this could be a bug in the Simulator software. The T4:0 and T4:4 Timers reset perfectly when I hit the STOP button in the main program; it is just the T4:1 to T4:3 timers that the EN and DN flags stay stuck on. I don't have access to the PLC till Monday, I can try it on the real-world one and see if this problem goes away. Thanks for all the responses!! |
|
|
|
#7 |
|
Lifetime Supporting Member + Moderator
|
It's your understanding.
When B3:0/1 is turned off because of the stop the logic leading to T4:0 and T4:4 is still scanned - it's just evalueated as FALSE letting the timer commands perform the appropriate 'turning off' functions like turning off the EN and DN flags. But the timers in the subroutine ARE NOT SCANNED AT ALL. They don't get the opportunity to process the turning off of the enable. Try this as a test - remove the B3:0/1 and T4:0/DN in rung #3 of your main program.
__________________
Controlling outputs is the PLC's way of getting its inputs to change. www.thePLCguy.com |
|
|
|
#8 |
|
Member
![]() Join Date: Nov 2007
Location: BC
Posts: 7
|
Ahhhh, yes, I get it now. That did the trick. Thank-you bernie.
Best Regards, Jason |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| about AB's timer | qikuidg | LIVE PLC Questions And Answers | 16 | March 13th, 2007 09:01 AM |
| Another newbie question of the day :) | EmesiS | LIVE PLC Questions And Answers | 11 | October 24th, 2006 08:11 PM |
| s7 - 200, subroutines and timers | adfox | LIVE PLC Questions And Answers | 13 | July 20th, 2006 03:03 AM |
| How AB Timers work. | PhilipW | LIVE PLC Questions And Answers | 0 | January 28th, 2005 02:47 PM |
| SLC 5/02,03, 04, 05 - VS Siemens S-?? Similar Logic / workings??????? | soop7667 | LIVE PLC Questions And Answers | 11 | September 14th, 2004 07:27 AM |