Twincat (Balford Beckhoff) Frequently asked Questions (FAQ)-How to declare a timer, use the Timer ton module TC3

Source: Internet
Author: User

ton function block function:

When the input is high, the timer starts, the CV indicates the current value of the timer, and PV is the target of the timing, and when the value of the CV equals the value of PV, the output is set to 1.

?

?

Press F2 and add the ton function block where the main program continues.

?

?

I'm named T1 here.

?

Here T1_timer,t1_output is the bool amount, t1_current is the time amount

?

Click and view the program's operation, part of

You can see the current situation of T1, we change the value of T1_timer to true, and the result is

?

When t1_cunrrent=3s is visible, Q is set to 1.

?

?

F-trig function block

Function Block function: When the input produces a falling edge, the output will remain at 1 for the next cycle.

?

Press F2 and add the F-trig function block where the main program continues.

?

Here I am named TRIG1 here, Trig1_clk,trig1_output are bool quantities.

Because the function of the trigger is special, so set a breakpoint at the end of the program to see the program execution results, after the program, at the end of the program there is a return, here to set a breakpoint, method

?

Because the function of the trigger is special, so set a breakpoint at the end of the program to see the program execution results, after the program, at the end of the program there is a return, here to set a breakpoint, method

?

The word red means that the line where return is now is the breakpoint of the program, and when the program runs, it stops running when it encounters a breakpoint. When the program runs, it turns yellow and an arrow appears at the line number ahead. Indicates that the program is staying at the bank.

?

Observe the operation of the program, at this time trig1_clk to True by the keyboard F11 or in the PLC found step into can be implemented as a single step.

?

Always step into until appear: at this time TRIG1_CLK is just falling along, according to F-trig function next trig1_output will become true,

?

And after a PLC cycle turns false, so the function block test is complete.

?

?

For more instructional videos and downloads, please pay attention to the following information:

My Youku Space:

Http://i.youku.com/acetaohai123

?

My online forum:

http://csrobot.gz01.bdysite.com/

?

Problem Exchange:

qq:910358960

Email:[email protected]

?

?

Twincat (Balford Beckhoff) Frequently asked Questions (FAQ)-How to declare a timer, use the Timer ton module TC3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.