Chapter 10
- What is a function block?
A digital blueprint that is equivalent to a class in a general-purpose programming language.
- Can a function live in a function block?
Technically, no. Methods which are equivalent to functions live in function blocks.
- Do all PLC programming systems support function blocks?
Generally, yes.
- Name three common function blocks in CODESYS.
TON
TOF
CTU
- Do all function blocks have the same inputs and outputs?
No.
- What is the main difference between a TON and a TOF timer?
TON on hold a bit off for a given amount of time while a TOF will be on for a given amount of time.
- What is the main difference between a timer and a counter?
A counter will increment with a rising edge while a timer will toggle a bit after a give period of time.