mr_electrician

Timers and Structured Text

5 posts in this topic

Hello group.

I am practicing ST programming and am doing this by converting an existing Ladder Logic program into Structured Text.

I have created the following attachment and I can see my BOOL objects change state when I touch the respective buttons on my HMI.  The issue I am having is the Accumulating Timer will not start timing when the conditions are met.

Can someone with experience in ST advise me what I am missing or doing wrong.

Thanks

ST.jpg

Share this post


Link to post
Share on other sites

After a little massaging and more fiddling I was able to get the Timer to work.  Still not sure if this is the proper setup but it works!!!

I am posting my screenshot in case others run into the same issue.

ST2.jpg

Share this post


Link to post
Share on other sites

Hi!

In first picture the timer isn't called. If you take a this row to your program then the timer is started:

Password_RST_TTimer();

This timer is a funciton block, so must be call in the program. You only set the function block input parameter and not called.

In second picture the timer is called, so it is working.

 

Share this post


Link to post
Share on other sites

Also line 3-6 can simply be:

Sec_PW_RST_Seq_Latch_1:=Sec_Invisible_Button AND NOT Sec_PW_RST_Seq_Latch_2;

 

Share this post


Link to post
Share on other sites

This is the equivalent of your ST:

Sec_PW_RST_Seq_Latch_1:=Sec_Invisible_Button AND NOT Sec_PW_RST_Seq_Latch_2;
Password_RST_TTimer(IN:=(Sec_TextEntry_HMI_PB AND Sec_PW_RST_Seq_Latch_1),PT:=T#5s,Q=>Sec_PW_RST_Delay_Dn);

 

1 person likes this

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