Lab assignment: basics of Ladder Diagrams
Zahteve zaključka
- 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_TRIG
and anRS
memory cell. -
Familiarize yourself with the counter – try one that can count up or down, specifically use the
CTUD
function block from theTc2_Standard
→Counter
library. - Try using timers from the
Tc2_Standard
→Timer
library: pulse generatorTP
, on-delayTON
, and off-delayTOF
.- For the timer function block’s
IN
input, use a button, and for theQ
output, connect a light. - The time at the
PT
input is of typeTIME
; constants are defined in the following format:T#2ms
,T#1min3s
, etc.
- For the timer function block’s
- Using
FUN
functions andFB
function blocks:- Create a new function that performs a logical AND over two inputs,
x1
andx2
. The output should bey
. Call this function in theMAIN
program, 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
FB
be?
- 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...