Tutorial. Schneider Electric PL7 Junior/Pro - Premium PLC Applications - Movement Control
تبلیغات
تبلیغات
Tutorial
3
At a glance
Aim of this chapter
What's in this
Chapter?
This chapter provides an example of the implementation of a movement command application using the SERCOS® package for TSX Premium PLCs.
This Chapter contains the following Maps:
Topic
Description of the example
Trajectory description
Description of commands in manual mode
Prerequisites and methodology
Variable Speed Controller Configuration
Module TSX CSY 84 configuration
Symbolization
Symbolization of TOR input/output modules
Axis command module symbolisation:
Programming preprocessing
Programming the Grafcet chart
Transitions programming
Actions programming
Programming of post-processing
Program transfer
Adjusting the Parameters
Introduction to the Debug Mode
Page
29
TLX DS 57 PL7 xx
Tutorial
Description of the example
Introduction
Transfer Device
This example is given for teaching purposes only. It will enable you to follow each phase of implementation for axis command TSX CSY 84 without having to read the whole manual.
A transfer device ensures that machining outputs are removed. This device is made up of a claw which can move within the space on an axis (X and Y axes) parallel to the ground.
When an item appears on the removal conveyor belt A, the claw automatically locates it in order to place it on belt B or C depending on the type of item. The claw then returns to position, ready to grab as soon as a new machined item is detected.
Illustration
C3
Machining equipment C1
C4
C2
Conveyor A
Conveyor B
Conveyor C
Inputs/Outputs The inputs/outputs are as follows :
C1
C2
C3
C4
O/F machined item detection cell identification sensor for item type claw open/closed detection sensor detection cell at the edge of the item (in the claw), connected to the input module event claw : claw open/close command
30
TLX DS 57 PL7 xx
Application
Grafcet
The application Grafcet is as follows :
0
1
2
3
4
5
6
Reference point
Referenced axes
Move to waiting position
Detection of a machined part
Move to conveyor A
Detection of edge of part and grab stationary
Close grab
Type 1 part and grab closed
Move to conveyor B
Grab stationary
Open grab
Grab open
8
Type 2 part and grab closed
Move to conveyor C
Grab stationary
Tutorial
TLX DS 57 PL7 xx
31
Tutorial
Trajectory description
Trajectory illustration
The following diagram describes the trajectory:
Y_LMAX
Conveyor A
3
2
4
7
5
Waiting position
Conveyor B
6
Conveyor C
1
X_LMIN
Y_LMIN
X_LMAX
Description
3
4
1
2
Source port at speed Vp0
Switch at Vret speed to the ready position (Xatt, Yatt) with stop
Switch to the A conveyor belt (XA, YA) until the machined item is detected at speed VA
Switch to speed VB on belt B (XB, YB) with stop
6 Switch to speed VC on belt C (XC, YC) with stop
5, 7 Switch at Vret speed to the ready position (Xatt, Yatt) with stop
32
TLX DS 57 PL7 xx
Tutorial
Description of commands in manual mode
Front Panel of the Human-
Machine
Interface
The following commands are regrouped on a front panel in order to control the moving part manually whilst there is an installation error. The commands and LEDs are run by input and output TOR modules
Auto X Y Fault
Manual Axis selection
Start cycle
Homing Ack.
Fault
Stop cycle
Reverse Forward Emergency stop
Open grab Close grab
Description of the Commands l l l l l l l l l l l
Auto / Man: operating mode selector switch.
Start cycle: automatic execution of the cycle.
Stop cycle: automatic stopping of the cycle.
X / Y axis selection: Axis selection for control in manual mode.
Source port: manual source port on the selected axis.
Forward / Reverse: positive or negative manual switch command for the selected axis.
Fault: LED batches all hardware and application faults.
Ack. fault: command to acknowledge faults present.
Emergency stop: immediate stop of the moving part whatever mode is selected.
Open grab: claw open command.
Close grab: command to close the grab.
TLX DS 57 PL7 xx
33
Tutorial
Prerequisites and methodology
Requirements
Methodology l l l
In order to restrict this description to the specific functions for the axis command, it should be assumed that the following operations have already been performed.
PL7 software, version > V3.4B is installed.
UniLink software is installed.
hardware is installed.
l l
Implementation of the TSX XSY 84 module requires: configuration of the Lexium 17S variable speed controller, using UniLink software configuration of the TSX XSY 84 module, using PL7 software (version > V3.4B).
34
TLX DS 57 PL7 xx
Variable Speed Controller Configuration
Connection to the variable speed controller
Access to the UniLink software displays the following screen :
COM1
COM2
Offline
Disconnect
Interfaces
Tutorial
Click on COM1 or COM2 to connect to the variable speed controller (this depends on the serial port used on the programming terminal for connection to the variable speed controller).
Configuration of the motor and the SERCOS® address
Please consult the UniLink software user manual on how to configure the motor and the SERCOS® address.
TLX DS 57 PL7 xx
35
Tutorial
Module TSX CSY 84 configuration
Software
Declaration of the PLC
Configuration
Launch the PL7 software, select the New File command, select a Premium processor and check the Grafcet option.
Access the configuration editor from the application browser. To do this: l l open the Station folder (double click on the icon or click on its link), open the Configuration folder (double click on the icon or click on its link), l double click on the hardware Configuration icon.
Then select each component in the PLC configuration. The following items have been selected in this application: l l l l l rack 0 and rack 1 : TSX RKY 8E processor: TSX P57 303, supply modules : TSX PSY 2600 for rack 0 and TSX PSY 5500 for rack 1,
32 inputs module : TSX DEY 32D2K in position 2 of rack 0,
32 outputs module : TSX DSY 32T2K in position 3 of rack 0, l axis command module : TSX CSY 84 in position 2 of rack 1.
Configuration Screen
Configuration
TSX 57303 V5.0 XMWI
XTI..
5 6
0
2
6
0
0
P
S
Y
0
5
7
3
0
3
T
S
X
2
3
2
D
2
K
D
E
Y
3
3
2
T
2
K
D
S
Y
4
1
C
S
Y
8
4
2 3 4 5 6
5
5
0
0
P
S
Y
The processor cycle time should exceed 8ms (2 x the duration of the module cycle).
36
TLX DS 57 PL7 xx
Axis configuration
Tutorial
Double click on the TSX CSY 84 module (position 2 of rack 1), which displays the configuration screen.
l In the channel level zone select: 1 Real, then the Real axis function, l Enter the parameter values, in accordance with the following screen :
TSX CSY 84 [RACK0 POSITION 3]
Configuration
Designation: 8 AXIS N4 MOTION.CONT
Symbol:
Channel:
Real 1
Function:
Real axis
Configured channels: 0, 1, 2
Task:
MAST
Limits
Position checking
Max. Position 5.000000e+005
Min. Position -5.000000e+005
Max. speed 1.200000e+004
Max. Acceleration 1.200000e+004
Max. Deceleration 1.200000e+004
Ctrl. of the enabled position
Active
Tolerance 0.000000e+000
Units
Type
Position
Speed
Acceleration
Scale factor
Numerator
Denominator
Linear mm mm/min
µ m/s²
2.000000e+000
1.000000e+000
Movement
Modulo
Max. modulo
Min. modulo
0.000000e+000
0.000000e+000
In-position band
Acceleration
Deceleration
1.000000e+005
1.000000e+004
1.000000e+004
Acceleration type
Rectangle 100 % l l l
Enter the same parameters for the second axis (Integer 2).
Confirm the entry using the Edit /Confirm command or the icon
On the main screen of the configuration editor, confirm the configuration using the
Edit / Confirm command or the icon :
Note: Maximum speed. (Max speed) is set for a 6000 revs/min motor, with movement of 2mm per rev.
TLX DS 57 PL7 xx
37
Tutorial
Symbolization
Entering symbols
Entering symbols may be accessed by double clicking in the application browser, and in sequence on the Variable and I/O icons.
Variables
Parameters I/O
Address
%I102.0
%I102.0.1
%I102.0.2
%I102.0.3
%I102.0.4
%I102.0.5
%I102.0.6
%I102.0.7
%I102.0.8
%I102.0.9
%I102.0.10
%I102.0.11
%I102.0.12
%I102.0.13
%I102.0.14
%I102.0.15
%I102.0.16
%I102.0.17
%I102.0.18
%I102.0.19
%I102.0.20
%I102.0.21
%I102.0.22
%I102.0.23
%I102.0.24
%I102.0.25
%I102.0.26
Addr.
102 : TSX CSY 84
Type
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
Ap2_steady
Symbol
Ap2_ramping
Ap2_stopping
Ap2_profile_end
Ap2_in_position
Ap2_axis_homing
Ap2_axis_homed
Ap2_axis_not_following
Ap2_holding
Ap2_resuming
Ap2_drive_enable
Ap2_drive_diag
Ap2_drive_warning
Ap2_drive_fault
Ap2_drive_disabled
EBOOL Ap2_axis_summary_fault
EBOOL Ap2_axis_comm_ok
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
EBOOL
Ap2_axis_is_linked
Ap2_axis_at_target
Ap2_axis_pos_limit
Ap2_axis_neg_limit
Ap2_drive_realtime_bit1
Entry field
Comment
Motion profile in acceleration or deceleration
Motion profile in constant velocity
Motion profile in deceleration to the target position
Motion profile commands processed + move queue empt
Target reached within Tolerance band
Homing command in execution
Axis in home position and the drive’s position valid
Motion profile disabled to perform a special operation(ex:
Motion profile in deceleration or paused
Motion profile in acceleration back following a resume co
Drive enabled with motor power
SERCOS class 3 diagnostic bit changed
SERCOS class 2 diagnostic bit changed
SERCOS class 1 diagnostic bit changed
Drive desabled and motor power removed
Motion profile fault (drive fault or drive communication fau
Axis power up and communication drive active
Axis active and responding to commands (VirtualMaster
At_target in Position tolerance band
Axis position beyond the positive position limit
Axis position is beyond the negative position limit
Axis in home position and the drive’s position valid
Symbols for internal variables
The following internal variables are symbolized:
Comment Address
%MF102
%MF104
Symbol
Speed_reached
Man_speed
38
TLX DS 57 PL7 xx
Tutorial
Symbolization of TOR input/output modules
TOR input module symbols
%I2.7
%I2.8
%I2.9
%I2.10
%I2.11
%I2.12
%I2.13
%I2.14
The TOR input module is positioned in slot 2 of rack 0. The symbols are as follows
Address
%I2.1
%I2.2
%I2.3
Symbol
Sensor_2
Sensor_3
Auto_man
Comment
Item identification sensor (0= type 2,
1 = type 1)
Grab open / grab closed sensor
Select mode switch (0 = auto
1 = man 1)
%I2.4
%I2.5
%I2.6
Start_cycle
Stop_cycle x_y_selection Select axis manually to move or PO (1 = x; 0
= y)
Home_man
Forward
Reverse
Ack_fault
Fault_type
Enable_axes
Open_grab
Close_grab
Confirm axes
Output Module
Symbols
The TOR input module is positioned in slot 3 of rack 0. The symbols are as follows
Address
%Q3.0
%Q3.1
Symbol
Grab
Fault
Comment
Actuator command to open / close grab
Fault indication
TLX DS 57 PL7 xx
39
Tutorial
Axis command module symbolisation:
List of symbols The axis command module is positioned in slot 2 of rack 1.
These symbols are as follows:
Comment
%I102.1.15
%I102.1.16
%I102.1.17
%I102.1.18
%I102.1.19
%I102.1.20
%I102.1.21
%I102.1.22
%I102.1.26
%I102.1.27
%I102.1.28
%I102.1.29
%I102.1.30
%I102.1.31
%IF102.1
Address
%I102.1
%I102.1.1
%I102.1.2
%I102.1.3
%I102.1.4
%I102.1.5
%I102.1.6
%I102.1.7
%I102.1.8
%I102.1.9
%I102.1.10
%I102.1.11
%I102.1.12
%I102.1.13
%I102.1.14
Symbol
Ramping_x
Steady_x
Stopping_x
Profile_end_x
In_position_x
Axis_homing_x
Axis_homed_x
Axis_not_following_x
Holding_x
Resuming_x
Drive_enable_x
Drive_diag_x
Drive_warning_x
Drive_fault_x
Drive_disable_x
Axis_summary_fault_x
Axis_comm_ok_x
Axis_is_linked_x
Axis_in_command_x
Axis_capture_x
Axis_at_target_x
Axis_pos_limit_x
Axis_neg_limit_x
Drive_realtime_bit1_x
Drive_realtime_bit2_x
Axis_hold_x
Axis_halt_x
Axis_faststop_x
+Axis_ready_x
Position_x
40
TLX DS 57 PL7 xx
Tutorial
TLX DS 57 PL7 xx
Address
%Q102.1.2
%Q102.1.2
%Q102.1.2
%Q102.1.2
%Q102.1.2
%Q102.1.2
Symbol
Control_acquire_x
Control_enable_x
Control_resume_x
Control_clear_fault_x
Allow_capture_x
Allow_acquire_x
%Q102.1.26
%Q102.1.27
Allow_enable_x
Allow_follow_x
%Q102.1.28
Allow_resume_x
%MW102.1.19
Err_write_cmd_x
%MD102.1.20
Return_1
%MD102.1.27
Param_1
%MD102.1.29
Param_2
%MF102.1.22
Return_2
%MF102.1.24
Return_3
%MF102.1.31
Param_3
%MF102.1.33
Param_4
%I102.2
Ramping_y
%I102.2.1
%I102.2.2
%I102.2.3
%I102.2.4
Steady_y
Stopping_y
Profile_end_y
In_position_y
%I102.2.5
%I102.2.6
%I102.2.7
%I102.2.8
%I102.2.9
%I102.2.10
%I102.2.11
%I102.2.12
%I102.2.13
%I102.2.14
%I102.2.15
%I102.2.16
Axis_homing_y
Axis_homed_y
Axis_not_following_y
Holding_y
Resuming_y
Drive_enable_y
Drive_diag_y
Drive_warning_y
Drive_fault_y
Drive_disable_y
Axis_summary_fault_y
Axis_comm_ok_y
Comment
41
Tutorial
Address
%I102.2.17
%I102.2.18
%I102.2.19
%I102.2.20
%I102.2.21
%I102.2.22
Symbol
Axis_is_linked_y
Axis_in_command_y
Axis_capture_y
Axis_at_target_y
Axis_pos_limit_y
Axis_neg_limit_y
%I102.2.26
%I102.2.27
%I102.2.28
%I102.2.29
Drive_realtime_bit1_y
Drive_realtime_bit2_y
Axis_hold_y
Axis_halt_y
%I102.2.30
%I102.2.31
Axis_faststop_y
Axis_ready_y
%IF102.2
Position_y
%MD102.2.20
Return_12
%MD102.2.27
Param_12
%MD102.2.29
Param_22
%MF102.2.22
Return_22
%MF102.2.24
Return_32
%MF102.2.31
Param_32
%MF102.2.47
Param_42
Comment
42
TLX DS 57 PL7 xx
Programming preprocessing
MAST - PRL ! (*Chart initialisation*)
IF NOT %I2.4 OR %S1 THEN SET %S21; END_IF;
! (*Initialisation of movement values*)
%MF50 := %MF52 := 1000.0; (*Ready position*)
%MF54 := 2000.0; (*Move to belt B axis X*)
%MF56 := 1500.0; (*Move to belt B axis Y*)
%MF58 := 2000.0; (*Move to belt C axis X*)
%MF60 := 500.0; (*Move to belt C axis Y*)
%MF102 := 10000.0; (*Auto speed*)
%MF104 := 2000.0; (*Manual speed*)
%MF106:= 1000.0; (*Reference point speed*)
(*Initialization of channel 0*)
%Q102.0.26 := NOT %S0;
%L10:
Tutorial
TLX DS 57 PL7 xx
43
Tutorial
Programming the Grafcet chart
CHART - PAGE 0 Grafcet
(*INIT*)
(*start cycle*)
(*enable axes x and y*)
(*axes enabled*)
(*home axes x and y*)
(*referenced axes*)
(*move to waiting position*)
(*detect a part>> 1
(*move to conveyor a*)
(*detect edge of part*)
0
1
2
3
4
7
List of connectors
1
2
3
(*detection of a machined item*)
(*belt b movement*)
(*belt c movement*)
5
(*close grab*)
6
(*movement>> 2
10
(*movement>> 3
3
7
(*open grab*)
(*grab open*)
44
TLX DS 57 PL7 xx
Tutorial
Transitions programming
Step 0 -> 1
Step 1 -> 2
Step 2 -> 3
Step 3 -> 4
Step 4 -> 5
Step 5 -> 6 l %X(0) -> %X(1)
! (*dcy and auto mode and no error *)
%I2.4 AND NOT %I2.3 AND NOT %I102.1.15 AND NOT %I102.2.15
l %X(1) -> %X(2)
! (*%m1 manual control // %mw2.x.3 = 1 -> ERR WRITE_CMD*)
%I102.1.10 AND %I102.2.10
l %X(2) -> %X(3)
! (*verification if drives are referenced and the command made*)
%I102.1.6 AND %I102.2.6
AND (%MW102.1.19 = 0) AND (%MW102.2.19 = 0) AND NOT
%MW102.1:X1
AND NOT %MW102.2:X1 (*check exchanges*) l %X(3) -> %X(4)
! (*verification => end of instruction and in position*)
%I102.1.3 AND %I102.2.3 AND %I102.1.4 AND %I102.2.4
(*check axes*)
AND %I3.0
(*part present*)
AND (%MW102.1.19 = 0) AND (%MW102.2.19 = 0) AND NOT
%MW102.1:X1
AND NOT %MW102.2:X1 (*check exchanges*) l %X(4) -> %X(5)
! (*verification => end of instruction and in position*)
%I102.1.3 AND %I102.2.3 AND %I102.1.4 AND %I102.2.4
(*check axes*)
AND (%MW102.1.19 = 0) AND (%MW102.2.19 = 0) AND NOT
%MW102.1:X1
AND NOT %MW102.2:X1 (*check exchanges*) l %X(5) -> %X(6)
! (*machined item identification*)
%I2.1 AND %I2.2
TLX DS 57 PL7 xx
45
Tutorial
Step 6 -> 7
Step 7 -> 3
Step 5 -> 10
Step 10 -> 7 l %X(6) -> %X(7)
! (*verification => end of instruction and in position*)
%I102.1.3 AND %I102.2.3 AND %I102.1.4 AND %I102.2.4
(*check axes*)
AND (%MW102.1.19 = 0) AND (%MW102.2.19 = 0) AND NOT
%MW102.1:X1
AND NOT %MW102.2:X1 (*check exchanges*) l %X(7) -> %X(3)
! (*open grab?*)
NOT %I2.2
l %X(5) -> %X(10)
! (*machined item identification*)
NOT %I2.1 AND %I2.2
l %X(10) -> %X(7)
! (*verification => end of instruction and in position*)
%I102.1.3 AND %I102.2.3 AND %I102.1.4 AND %I102.2.4
(*check axes*)
AND (%MW102.1.19 = 0) AND (%MW102.2.19 = 0) AND NOT
%MW102.1:X1
AND NOT %MW102.2:X1 (*check exchanges*)
46
TLX DS 57 PL7 xx
Tutorial
Actions programming
Step 1
Step 2 l l
%X1 P1
! (*confirmation of axis channels 1 and 2*)
SET %Q102.1.10; SET %Q102.1.2; SET %Q102.2.10; SET
%Q102.2.2;
%X1 P0
! (*Initialization of values*)
SET %Q102.1.10; SET %Q102.1.2; SET %Q102.2.10; SET
%Q102.2.10;
RESET %Q102.2.2; l %X2 P1
! (*channel 2 reference point*)
%MW102.2.26 := 6034; (***Set position***)
%MD102.2.27 := 0; (***Param 1***)
%MD102.2.29 := 0; (***Param 2 ***)
%MF102.2.31 := 1.0; (***1 => positive direction, -1 negative direction***)
%MF102.2.33 := %MF106; (***speed***)
WRITE_CMD %CH102.2;
! (*channel 1 reference point*)
%MW102.2.26 := 6034; (***Set position***)
%MD102.1.27 := 0; (***Param 1***)
%MD102.1.29 := 0; (***Param 2***)
%MF102.1.31 := 1.0; (***1 => positive direction, -1 => negative direction***)
%MF102.1.33 := %MF106; (***speed***)
WRITE_CMD %CH102.1;
TLX DS 57 PL7 xx
47
Tutorial
Step 3
Step 4
Step 5 l %X3 P1
! (*channel 2 absolute movement*)
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := %MF50; (Direction / Cont 1.0, Position / abs***)
%MF102.2.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.2;
! (*channel 1 absolute movement*)
%MW102.2.26 := 6034; (***Set position***)
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := %MF52; (Direction / Cont 1.0, Position / abs***)
%MF102.1.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.1; l %X4 P1
! (*channel 1 absolute movement*)
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := 0.0; (Direction / Cont 1.0, Position / abs***)
%MF102.1.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.1;
! (*channel 2 absolute movement*)
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.1.31 := 0.0; (Direction / Cont 1.0, Position / abs***)
%MF102.2.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.2; l %X5 P1
! (*close grab*)
SET %Q3.0;
48
TLX DS 57 PL7 xx
Step 6
Step 7
Step 10
Tutorial l %X6 P1
! (*channel 1 absolute movement*)
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := %MF52; (Direction / Cont 1.0, Position / abs***)
%MF102.1.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.1;
! (*channel 2 absolute movement*)
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := %MF56; (Direction / Cont 1.0, Position / abs***)
%MF102.2.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.2; l %X7 P1
(*open grab*)
RESET %Q3.0; l %X10 P1
! (*channel 1 absolute movement*)
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := %MF58; (Direction / Cont 1.0, Position / abs***)
%MF102.1.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.1;
! (*channel 2 absolute movement*)
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 0; (***Move type: -1 error, 0 ABS_MOVE, 1 INCR_MOVE,
2 CONT_MOVE, 3 ABS_MOVE_POS, 4 ABS_MOVE_NEG***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := %MF60; (Direction / Cont 1.0, Position / abs***)
%MF102.2.33 := %MF102; (***Speed***)
WRITE_CMD %CH102.2;
TLX DS 57 PL7 xx
49
Tutorial
Programming of post-processing
MAST - POST ! (*----------RESET error management----------*)
IF %I2.10 THEN SET %Q102.1.15; SET %Q102.2.15; SET %Q102.1.2;
SET %Q102.20.2;
ELSE RESET %Q102.1.15; RESET %Q102.2.15;
RESET %Q102.1.2; RESET %Q102.2.2;
END_IF;
! (*----------Management of manual mode----------*)
(*Initialize G7*)
IF %I2.3 THEN SET %S21;
END_IF;
(*Enable axes for manual mode*)
IF %I2.10 THEN SET %Q102.1.2; SET %Q102.2.10; SET %Q102.2.2;
SET %Q102.2.10;
ELSE RESET %Q102.1.2; RESET %Q102.1.10; RESET %Q102.2.2;
RESET %Q102.1.10;
END_IF;
(**********Positive x channel manual mode**********)
IF RE%I2.9 AND %I2.6 THEN
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 2; (***Move type 2 = CONT_MOVE***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := 0.0; (***Direction***)
%MF102.1.33 := %MF104; (***Speed***)
WRITE_CMD %CH102.1;
END_IF;
(**********Negative x channel manual mode**********)
IF RE%I2.9 AND %I2.6 THEN
%MW102.1.26 := 513; (***Move Immed***)
%MD102.1.27 := 2; (***Move type 2 = CONT_MOVE***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := -1,0; (***Direction***)
%MF102.1.33 := %MF104; (***Speed***)
WRITE_CMD %CH102.1;
END_IF;
IF FE %I2.9 AND %I2.6 THEN %MW102.1.26:= 407;
WRITE_CMD %CH102.1;
END_IF;
50
TLX DS 57 PL7 xx
TLX DS 57 PL7 xx
(**********Positive y channel manual mode**********)
IF RE%I2.9 AND NOT %I2.6 THEN
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 2; (***Move type 2 = CONT_MOVE***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := 0.0; (***Direction***)
%MF102.2.33 := %MF104; (***Speed***)
WRITE_CMD %CH102.2;
END_IF;
IF FE %I2.8 AND NOT %I2.6 THEN %MW102.2.26 := 407;
WRITE_CMD %CH102.2;
END_IF;
(**********Negative y channel manual mode**********)
IF RE%I2.9 AND NOT %I2.6 THEN
%MW102.2.26 := 513; (***Move Immed***)
%MD102.2.27 := 2; (***Move type 2 = CONT_MOVE***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := -1.0; (***Direction***)
%MF102.2.33 := %MF104; (***Speed***)
WRITE_CMD %CH102.2;
END_IF;
IF FE %I2.9 AND NOT %I2.6 THEN %MW102.2.26 := 407;
WRITE_CMD %CH102.2; END_IF;
(**********Manual homing of channel x**********)
IF RE %I2.7 AND %I2.6 THEN
%MW102.1.26 := 6034; (***Homing***)
%MD102.1.27 := 0; (***Param_1***)
%MD102.1.29 := 0; (***Param_2***)
%MF102.1.31 := 1.0; (***Direction***)
%MF102.1.33 := %MF106; (***Speed***)
WRITE_CMD %CH102.1;
END_IF;
Tutorial
51
Tutorial
(**********Manual homing of channel y**********)
IF RE %I2.7 AND NOT %I2.6 THEN
%MW102.2.26 := 6034; (***Homing***)
%MD102.2.27 := 0; (***Param_1***)
%MD102.2.29 := 0; (***Param_2***)
%MF102.2.31 := 1,0; (***Direction***)
%MF102.2.33 := %MF106; (***Speed***)
WRITE_CMD %CH102.2;
END_IF;
! (*----------Stop cycle in progress HALT instruction----------*)
IF RE%I2.5THEN %MW102.1.26:= 407; WRITE_CMD %CH102.1;
%MW102.2.26 := 407; WRITE_CMD %CH102.2;
END_IF;
! (*----------Error type read----------*)
IF RE%I2.11THEN%MW102.1.26 := 5510; WRITE_CMD %CH102.1;
%MW102.2.26 := 5510; WRITE_CMD %CH102.2;
END_IF;
! (*----------Disable channels----------*)
(*disable drive on channel 2*)
IF %M4THEN%MW102.2.26 := 402; WRITE_CMD %CH102.2; END_IF;
(*disable drive on channel 1*)
IF %M4THEN%MW102.2.26 := 402; WRITE_CMD %CH102.1; END_IF;
52
TLX DS 57 PL7 xx
Tutorial
Program transfer
Procedure for transferring a program
After the application has been configured and the program has been entered, they must be transferred into the PLC processor memory, by following the following procedure :
Step
1
2
3
4
Action
Connect the terminal to the PLC using the AP
→
Connectcommand.
Activate the AP
→
Transfercommand.
Select the Console ->PLC option.
Confirm transfer.
TLX DS 57 PL7 xx
53
Tutorial
Adjusting the Parameters
Introduction If needed, it can be important to be able to adjust the configuration parameters.
There are several possible ways of doing this: l you can return to local mode and modify the parameters directly inside the configuration screen, l PL7 enables you to also modify the parameters in online mode by using either: l the adjustment screens (method explained below), l the functions associated with the adjustment parameters via the application.
Adjustment procedure via the
PL7 screens
In order to carry out the parameter adjustment, you should perform the following steps:
Step
1
2
Action
Access the hardware configuration screen of the application.
Double click on the CSY 84 module. You can also select the module and execute the commandEdit
→
Open module.
54
TLX DS 57 PL7 xx
Step
3
4
5
Tutorial
Action
Activate theView
→
Adjust command to access the adjustment screen
(example: Channel 1)
Adjust
Designation: 8 AXIS N4 MOTION.CONT
Symbol:
Channel:
1 Real
Configured channels: 0, 1
Function:
Real axis
Limits
Position checking
Max. position 5.000000e+006
Min. position -5.000000e+002
Units
Type
Position
Speed
Max. speed 5.000000e+005
Max. accélération 5.000000e+004
Max. deceleration 5.000000e+002
Ctrl. of the enable position
Active
Tolerance 0.000000e+000
Acceleration
Scale factor
Numerator
Denominator
Linear
µ m
µ m/s
µ m/s²
Task:
MAST
1.000000e+000
1.000000e+000
Movement
Modulo
Max. modulo
Min. modulo
0.000000e+000
0.000000e+000
In-position band 7.000000e+000
Acceleration
Deceleration
1.000000e+002
1.000000e+001
Acceleration type
Rectangle 100 %
Transfer the variable speed controller parameters
Direction of transfer
PLC -> variable speed controller
Variable speed controller -> PLC
Transfer
Parameters
Transfer the variable speed controller parameters to the PLC memory:
Address table %MW 100
Length 200
Results
Error transfer: 22
Length of the table read : 00
Enter the possible changes.
Confirm the entries using the Edit
→
Confirm command or click on the icon
Restore/Save parameters
This service is available for the Network channel, the real, imaginary and remote axes as well as for the slave axes. For more information on this service, refer to the
Basic applications manual, Common applications section, RESTORE_PARAM and
SAVE_PARAM functions.
TLX DS 57 PL7 xx
55
Tutorial
Introduction to the Debug Mode
Introduction Once the application has been performed then transferred, it is often necessary to debug it.
PL7 will show you how to do this with the help of tools such as: l debugging screens that: l l have numerous indicators of the status of the application give access to the change of status of certain variables
Note: The debug function has to be in online mode.
Debug procedure
You can perform the program debugging in the following way:
Step
1
2
3
Action
Set the PLC to RUN.
Display the debug screen of the TSX CSY 84 module.
Note: You can simultaneously display a language editor in order to follow the development of the application.
Begin executing the program.
56
TLX DS 57 PL7 xx
دانلود
تبلیغات