RSLogix 5000 STL Timers

Rob.Hill

Member
Join Date
Dec 2009
Location
Yorkshire
Posts
47
I haven't used used timers and STL together, so thought I'd try them on my next project!


I have the following code example:


//#Region Alarm_Ack

SBR_Alarms_TIMERS[25].EN :=
HMI_CMDS_SS_Dint.18 or
(SBR_Alarms_TIMERS[25].EN and
not SBR_Alarms_TIMERS[25].DN);

//#End_Region
So basically I was hoping when someone presses the HMI cmd `HMI_CMDS_SS_Dint.18` (which is only active for 1 scan),

then
`SBR_Alarms_TIMERS[25].EN` would become `1` (which it does) and hence latch `SBR_Alarms_TIMERS[25].EN`
Until:
SBR_Alarms_TIMERS[25].DN becomes active 3 seconds later (3000 set to `.PRE` elsewhere).


Problem is:
.EN becomes a 1 as expected
.DN never does...?


Any help?


Thanks
Rob
 
Problem is:
.EN becomes a 1 as expected
.DN never does...?




Are you sure? Or could .DN become 1 for 1 scan but you never see it. Try adding this



Code:
IF TIMERS[25].DN THEN
  SomeFloat := SomeFloat + 1;
END_IF;


or feed the .DN into a counter, and see if either that float, or the counter, is incremented.


I think that replacing (.EN AND NOT .DN) with .TT will not change anything, because that is what .TT is.
 
Thanks for the responses.


I will get chance to get back online this afternoon for some testing.


I think the issue is: 'Do you call the timer anywhere'


- unfortunately no! I mistakenly believed only TONR timers needed to be called and that calling the '.EN' bit would suffice. Obviously this isnt the case.


Is it possible to work with only TON timers in ST or does it have to be TONR?


I'll get chance to google later after travelling, but if anyone feels like making it easy for me - how to call TON (if poss)/ TONR


Thanks for the support


Rob
 

Similar Topics

Hi, has anyone come across any good documentation on SFC and STL as used in RSLogix 5000 Version 11 pro. I have just loaded my new version and...
Replies
2
Views
5,897
I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
513
First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
502
Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
114
Back
Top Bottom