Lab assignment: basics of Ladder Diagrams
완료 조건
- Open your project from previous exercises or create a new one (see the instructions for the previous lab assignment).
- Using ladder diagrams, create a program that changes the state of the green light (0 → 1 → 0 …) when the green button is pressed. Use positive edge detection
R_TRIGand anRSmemory cell. -
Familiarize yourself with the counter – try one that can count up or down, specifically use the
CTUDfunction block from theTc2_Standard→Counterlibrary. - Try using timers from the
Tc2_Standard→Timerlibrary: pulse generatorTP, on-delayTON, and off-delayTOF.- For the timer function block’s
INinput, use a button, and for theQoutput, connect a light. - The time at the
PTinput is of typeTIME; constants are defined in the following format:T#2ms,T#1min3s, etc.
- For the timer function block’s
- Using
FUNfunctions andFBfunction blocks:- Create a new function that performs a logical AND over two inputs,
x1andx2. The output should bey. Call this function in theMAINprogram, where you’ll define inputs and outputs – they can be buttons and a light. - Create the first version of a function block for motor control. You need to set two output bits: direction (0: forward, 1: backward) and movement (0: stationary, 1: moving). What will the inputs for the
FBbe?
- Create a new function that performs a logical AND over two inputs,
-
Choose a model for your project:
- Line with two devices (2x)
- Pneumatic system (2x)
- Robotic arm (3x)
- Open the electrical diagram of the teaching model (the links are provided in the previous point) and familiarize yourself with the inputs
%I*and outputs%Q*. In TwinCAT, create a new global variable list (GVL – global variable list) and enter the inputs and outputs into it. - Read the document "Manual control - requirements," which presents the requirements for manual control. Create a solution, which will be the subject of the first project progress check.
- Save the project and archive it for use in future exercises:
File→Save Project As Archive...