8 Debugging. Schneider Electric FTX117, Terminal
Oglas
Oglas
8
Debugging
8.1
General
The FTX 117 terminal has a set of functions for debugging applications in Instruction List language. They are :
• Dynamic display of I/O state, of internal bits and variable values in the required base
(decimal, hexadecimal or ASCII).
• Modification of variable values and bit state.
• Forcing of I/O bits.
• Limited program modification in RUN mode.
h>
.
It displays program variable data. Select m
to see the Dbg menu : m 4
or
C
Debug function Dbg
• 0 Inf : Information (see Section 7.5)
• 1 Trf : Program transfer (see Section 6)
• 2 Cnv : Select display base
• 3 Frc : Force I/O
• 4 Prg : Return to programming screen
8.2
Dynamic program display
When the PLC is in RUN mode, the program screen displays the state of the Boolean variables by a rectangle placed in front of each of them :
• empty rectangle = state 0
• filled rectangle = state 1.
000 LD %I0.2
001 ANDN %M1
002 OR %I0.3
003 ST %Q0.4
___________________________________________________________________________
8/1
The debug screen displays the state of the Boolean variables and the numeric values contained in each program line. It is displayed as an extension to the right of the program screen.
C
-
001 ANDN %M1
002 OR %I0.3
003 OR %I0.4
Program screen m 2
and
¨ is used to select the display base.
are used to select the base and confirms the selection.
z
-
%M1 0
%I0.3 1
%Q0.4 1
Debug screen
-
Hex 16#346
Dec 838
Bin 00000011
Ascii ' F '
The numeric variables on the screen are then displayed
(1) or m4
.
-
%Q0.4 1
%MW0 16#346
%KW10 16#F00
8.3
Modification and forcing
The debug screen is used to modify :
• bit states
• word values.
-
%Q0.4 1
Note : In RUN, program execution takes precedence, so that if an instruction determines the bit state or writes the variable, the modifications made using the terminal are overwritten by the program logic.
>
to access the value field and enter the value (number)
to confirm an entry.
-
%KW10 200
___________________________________________________________________________
8/2
Debugging
8
• m3
accesses the I/O forcing screen (%I and %Q).
• Select forcing option Y (yes) using
>
or
<
.
When option Y is selected, the screen offers the forcing of each of the I/O.
• Select inputs or outputs using
^ and
¨
and cursor, using z
>
or
< d
executes the forcing. The I/O bits which have been forced are marked with the letter "f" in front of the
.
variable in the debug screen.
Forcing Y
01234567
%I0.0 .......
%Q0.0 ........
Forcing Y
01234567
%I0.0 .1.0....
%Q0.0 .1.0....
f%I0.3 1 f%Q0.4 1
%MW0 100
%KW10 200
Note :
• Forcings take precedence over the writing of I/O by the program.
• Forcing of all bits is cancelled after a cold restart.
C
___________________________________________________________________________
8/3
C
8.4
Modifying the program in RUN mode
The program editor allows the program to be modified when the PLC is in RUN mode.
!
WARNING
UNEXPECTED EQUIPMENT OPERATION
For obvious safety reasons, it is advisable to program a PLC in STOP.
It is possible, however, to program a PLC which is in RUN mode so that program modifications not requiring the application to be stopped can be performed.
However, these modifications remain the responsibility of the user.
Before any modifications are performed, certain conditions for programming a
PLC while running must be fulfilled. It is essential to know the consequences of the modifications on the application, and to take any necessary actions to determine what these are.
Failure to observe this precaution can result in equipment damage, severe personal injury, or or death.
Modifying in RUN mode
The process for modifying in RUN mode is identical to that for programming in RUN mode. The modification takes effect as soon as the current entry is confirmed.
Restrictions
The following table shows the restrictions on use and on modification when the PLC is in RUN mode :
Mode/function
Configuration
Programming
Access
Access to display only
All modifications/insertions/cancellations of instructions are permitted, except for instructions which modify the structure of the program :
• parentheses
• Grafcet instructions
• labels %Li: and SRi:
• jump : JMP and SR subroutine call
• instructions that follow instructions %Li:, SRi:, -*-i and
=*=i
• block instructions: BLK, OUT_BLK, END_BLK
• instructions MPS, MPP, MRD
The following functions are not active :
• clear
• search and replace
• program transfer to EEPROM
___________________________________________________________________________
8/4
Preuzimanje
Oglas