Sign in to follow this  
Followers 0
davesbs

TONR

4 posts in this topic

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;

Share this post


Link to post
Share on other sites
You'll need to add the line: TONR(Pump.FailToStrtTMR); somewhere where it will be passed over in the scan. Also make sure that you have the line: Pump.FailToStrtTMR.Reset := 0; in the first if-then block, and Pump.FailToStrtTMR.Reset := 1; in the second if-then block. Matt

Share this post


Link to post
Share on other sites
Just curious why structured text? The logic you are trying to implement seems so simple to do in ladder logic and easier to troubleshoot. Wht not just do it in Ladder logic?

Share this post


Link to post
Share on other sites
I've found myself in similar situations where the overall process the routine is handling is much better suited to structured text (or any language besides ladder), but there's a couple of things that are a pain in that chosen language. Kind of a "lesser of two evils" thing. Matt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0