Tom Wisniowski

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Tom Wisniowski

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. Can not use correctely the function block in Twincat

    There are a couple of things wrong with this code. Keep in mind that ladder diagram is nice because it allows you the capability to do some of the function block diagram programming but it is limited. First, the rung is always tied to the first/top input of a FB. If the first/top input of a FB is not of type BOOL (i.e. the first input of NT_GetTime is NETID, I am assuming it is not a BOOL) something different needs to be done. Right click on the rung and click on "BOX with EN." Second, to connect something to other inputs of a FB in ladder diagram, right-click on the short little line before the input, then "Insert at Block...", then "BOX". That box comes up as an AND box by default, but you can type in (or use the Input Assistant - F2 key) TON, or any other FB. So in your case your rung would probably look something like the attached jpg. Note: the last FB in the rung is added as a "BOX with EN" and then everything else is added to the front of that, so you have to work backwards sometimes when you are doing this. In this case the F_TRIG function block was added as the "BOX with EN" and then the rest. Let me know if you need any more help. Tom