Professional Documents
Culture Documents
2019-08-06
Anders Nilsson, Forskningsingenjör
Ingenjörsvetenskap/Produktionssystem
0702-23 83 79
anders.nilsson@hv.se
Purpose
Use the engineering tool TwinCAT 3 (TC3) from Beckhoff Automation and create logical applications
according to the industrial standard IEC6-1131-3
• Crate PLC-application
• Develop your logical thinking
• Run application in a simulated environment
Equipment
TwinCAT 3 installed on a windows computer
Preparation
• Download the project ” TwinCAT Project IO Box FBD” from Canvas to your computer
• Click on the file ” TwinCAT Project IO Box.sln” to launch the project
• When TC3 started, check that it will run on your local computer, <Local> shall be visible
• Click on ”Activate Configuration” and then answer OK to download the configuration to
your runtime PLC. The configuration contains settings about I/O and cycle times etc.
2(5)
Lab 1a test run the project TwinCAT Project IO Box FBD simulated process
• Select ”PLCSim” and click on the green arrow to download the process simulation application to
the runtime PLC
• Click on the small green arrow to launch the application (if not already started)
• Do the same for ”PLCStudent” to download your application to the runtime PLC
• Click in the project tree and open up the application;
”PLCStudent/PLCStudentProject/POUs/ControlFBD”
• Open up the simulation of the I/O-box, click PLCSim/PLCSimProject/VISUs/Visualization”
• Check that the preprogramed OR function works. Finnish the table for the OR function:
Task 1c Inverting
• Run and complete the table for this AND function with an Inverted Input
• Reflect about this function above and compare with the NAND function. Complete the table
for the NAND function
• What is the name of the theorem that is used when you do this kind of conversions?
Task 1f Timers
• Add a timer (TON) that turns on qxLed2 after that qxlamp1 has been illuminated in 3 seconds
qxLed2 shall turn off as soon as qxLed1 is turned off
• You can find the function block TON under ”Function Blocks”
• Enter the time to t#3s
• Create a new Network by right click and select
• TON is a function and need a name (an instance) e.g. fbTimer, declare it as TON in the header
(Goes automatic if you answer the question you got when you drag in the function block
• Remove the output ET-??? From the TON function block
• Right click on the output Q on the TON function block and select ”Insert Assignment” to got
an assignment to the output qxLed2
• Test run the function
Task 1g Counter
• Add an ”Counter Up” (CTU), in a new network below the timer. The counter shall illuminate
the qxLed3 when you press the ixButton7 five times
• Reset the counter with ixButton8
• Rename the CTU function block to fbCounter and declare it as an CTU
• Test run
• Show the solution for the teacher