Structured Text - TONR

davesbs

Member
Join Date
Sep 2005
Location
San Diego
Posts
19
How do you make a user defined tag which has multiple attributes like the TONR timer? Can you make your own tag which has the same functionality as a TONR? Can anyone share how they used TONR in a fail to start/stop sequence.. Thank you in advance..
 
This is what I need to do. I want to control a fail to start/stop output with the TONR timer. when a local or remote start signal is generated and the pump is not running I need the TONR timer to start. If the pump starts before my TONR PRE, I need the ACC or accuulated time to reset to zero. If pump does not start I need the timer DN to go high. How do I acheive this in structured text using RSlogix5000? Any tips.. anything will be greatly appreciated..

This is what I have so far..

//Once start command is issued, start time delay for timer timing
if Pump.StrtCmd AND NOT Pump.Running then
Pump.FailToStrtTMR.TimerEnable := 1;
Pump.FailToStrtTMR.PRE := 50;
end_if;
//Generate fail to start alarm if pump start fails.
if Pump.FailToStrtTMR.DN then
Pump.FailToStrtALM := 1;
Pump.FailToStrtTMR.TimerEnable := 0;
end_if;
 
Last edited:
davesbs said:
//Once start command is issued, start time delay for timer timing
if Pump.StrtCmd AND NOT Pump.Running then
Pump.FailToStrtTMR.TimerEnable := 1;
Pump.FailToStrtTMR.PRE := 50;
end_if;
//Generate fail to start alarm if pump start fails.
if Pump.FailToStrtTMR.DN then
Pump.FailToStrtALM := 1;
Pump.FailToStrtTMR.TimerEnable := 0;
end_if;


Suggestion:

Pump.FailToStrtTMR.PRE := 50;

//Once start command is issued, start time delay for timer timing
Pump.FailToStrtTMR.TimerEnable := Pump.StrtCmd AND NOT Pump.Running;

//Generate fail to start alarm if pump start fails.
Pump.FailToStrtALM := Pump.FailToStrtTMR.DN;

Note, that I don't use ST. The syntax of this may be way off, but you should get the idea.
 
Anyone know of some documentation on the Rslogix5000 emulator?.. Not sure how to use it and I need to check some code out.
 

Similar Topics

Hello I'm trying to do some structured text for a timer that will illuminate a lamp for 2 seconds, then extinguish for 2 seconds. At the moment...
Replies
18
Views
4,379
Hi. could someone give me an example about TONR instruction in structured text? I need to build a sort of "clock" wich set a bit at each...
Replies
3
Views
8,582
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
374
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
113
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
67
Back
Top Bottom