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,887
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
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
109
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
101
Hi All, I've been pulling my hair out trying to fix this for a few days and need some advice. I have V19.01, v20.05, V21, V24, V30, V31, V32...
Replies
5
Views
351
Back
Top Bottom