The text of a manual · part 59 of 68
DL405 User Manual: Chapter 9: Maintenance and Troubleshooting, pages 523 to 530
Pages 523 to 530 of 608, from DL405 User Manual
The original document is the PDF (8.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AutomationDirect D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models
Page 523
Maintenance and Troubleshooting TEST-PGM and TEST-RUN Modes
9--19
Test Mode allows the CPU to start in TEST-PGM mode, enter TEST-RUN mode, run a fixed number of scans, and then return to TEST-PGM mode. You can select from 1 to 65,535 scans. You can select this operation from either the Handheld Programmer (AUX 12) or DirectSOFT via a PLC Modes menu option. With the Handheld, the actual mode entered when you first select Test Mode depends on the mode of operation at the time you make the request. If the CPU is in RUN mode, then TEST-RUN is entered. If the mode is PGM, then TEST-PGM is entered. DirectSOFT provides more flexibility in selecting the various modes with different menu options. The following example shows how you can use the Handheld to select the Test Modes Use AUX 12 to enter Test Mode AUX
1
2
ENT
ENT
MODE = TEST-PGM
To specify the number of scans. . . CLR
1
SHFT TEST
NO. OF SCANS?
(CPU runs scans and returns to Test-PGM )
To switch to TEST-PGM mode . . . CLR ENT
2
SHFT TEST
STOP SCAN?
(to confirm the return to TEST-PGM)
To switch to TEST-RUN mode . . . ENT
3
SHFT TEST
START SCAN?
(to confirm the entry of TEST-RUN)
With the Handheld Programmer you gain some advantages by using Test Mode. S The Handheld Programmer status displays are more detailed. S You can enable the CPU to hold output states. Test Mode Displays: For some instructions, the TEST-RUN mode display is more detailed than the status displays shown in RUN mode. The following diagram shows an example of a Timer instruction display during TEST-RUN mode. RUN Mode
$ TMR
TEST-RUN Mode
3 T 000
K0500
$ TMR
3
T=510 T 000 K0500 Current Value
DL405 User Manual, 4th Edition
Maintenance and Troubleshooting
CLR
Page 524
9--20
Maintenance and Troubleshooting Holding Output States: In normal RUN mode, the outputs are turned off when you return to PGM mode. In TEST-RUN mode you can set each individual output to either turn off or hold its last output state on the transition to TEST-PGM mode. The ability to hold the output states is especially useful, since It allows you to maintain key system I/O points for examination. The following diagram shows the differences between RUN and TEST-RUN modes. RUN Mode to PGM Mode X0
X2
X1
X3
Y0 X4
X10
Outputs are OFF Y1
Status on final scan X0
X2
X1
X3
X10
END
Y0 X4 Y1
Maintenance and Troubleshooting
END
TEST-RUN to TEST-PGM X0
X2
X1
X3
Y0 X4
Hold Y0 ON Y1
X10 Let Y1 turn OFF
END
You can use AUX 58 on the Handheld Programmer to select the action for each individual output.
DL405 User Manual, 4th Edition
Page 525
Maintenance and Troubleshooting Run Time Edits X 430 440 450
9--21
The DL440 and DL450 CPUs allow you to make changes to the application program during Run Mode. These edits are not “bumpless.” Instead, CPU scan is momentarily interrupted (and the outputs are maintained in their current state) until the program change is complete. This means if the output is off, it will remain off until the program change is complete. If the output was on, it will remain on. WARNING: Only authorized personnel fully familiar with all aspects of the application should make changes to the program. Changes during Run Mode become effective immediately. Make sure you thoroughly consider the impact of any changes to minimize the risk of personal injury or damage to equipment. There are some important operations sequence changes during Run Time Edits. 1. If there is a syntax error in the new instruction, the CPU will not enter the Run Mode. 2. If you delete an output coil reference and the output was on at the time, the output will remain on until it is forced off with a programming device. 3. Input point changes are not acknowledged during Run Time Edits. So, if you’re using a high-speed operation and a critical input comes on, the CPU may not see the change. You can use either the Handheld Programmer or DirectSOFT to edit the program during Run Mode. The following pages show a brief example of how to do this with the Handheld Programmer. You use AUX 14 to edit the program during Run Mode. We’ve already shown you how to select the various AUX functions, but a few things are different with AUX 14. S Once you select AUX 14 the Handheld RUN LED starts blinking. This indicates the a Run Mode edit is in progress. S If you had displayed an address just before selecting AUX 14, that address will automatically appear. So, you can search for an address or instruction before you select AUX 14 or after you select AUX 14. Select AUX 14, Run Time Edit 1
4
ENT
AUX 1* OPERATING MODE AUX 14 RUN TIME EDIT
Press ENT to select AUX 14 and display the address ENT
$xxxxx STR X 0001
DL405 User Manual, 4th Edition
Maintenance and Troubleshooting
AUX
Page 526
9--22
Maintenance and Troubleshooting
Changing an Instruction During Run Mode
Once you’ve found the instruction you can change it very easily. The following example shows you how to change the X5 contact to X10. Ladder Representation X0
X2
X5
Y0 OUT
X1
X3
X4
Change X5 X6 END
Identify the Instruction ADDRESS
INSTRUCTION
0 1, - 6, - 10
STR X0 OR X1, - AND X5, - END
DESCRIPTION Starts branch 1 with X0 Joins X1 in parallel with X0, - Starts branch 4 with X5, - Ends the program
FIND the Address AND
X(IN)
5
FIND
SEARCHING
Maintenance and Troubleshooting
AND X5
$ AND
6 X 0005
Change the Instruction AND
X(IN)
10
ENT
$ 6 WANT TO ALTER?
Press CLR to abort the edit or ENT to accept ENT
(If you press ENT, the change is accepted and the next address is displayed. If you pressed CLR, the current address is displayed.
DL405 User Manual, 4th Edition
$ ORN
7 X 0006
Page 527
Maintenance and Troubleshooting Inserting an Instruction During Run Mode
9--23
Inserting an instruction during Run Mode works almost exactly the same as it does during Program Mode. Remember, INSERT adds an instruction before the instruction that is being displayed and the remaining addresses increment. Ladder Representation X0
X2
X5
X7
Y0 OUT
X1
X3
X4
Add X7 X6 END
Identify the Instruction ADDRESS
INSTRUCTION
0 1, 6
STR X0 OR X1, AND X5 AND X7 ORN X6, END
Insert before
7, 10
DESCRIPTION Starts branch 1 with X0 Joins X1 in parallel with X0, Starts branch 4 with X5 Adds X7 in series with X5 Joins X6 (NOT) in parallel, Ends the program
FIND the Address OR
NOT
X(IN)
6
FIND
SEARCHING ORN X6 7 X 0006
Insert the New Instruction AND
X(IN)
7
SHFT
INS
$ 7 WANT TO INSERT?
Press CLR to abort the edit or ENT to accept ENT
(If you press ENT, the change is accepted and the next address is displayed. If you pressed CLR, the current address is displayed.
$ ORN
8 X 0006
DL405 User Manual, 4th Edition
Maintenance and Troubleshooting
$ ORN
Page 528
9--24
Maintenance and Troubleshooting
Deleting an Instruction During Run Mode
Deleting an instruction during Run Mode works almost exactly the same as it does during Program Mode. Remember, this operation deletes the instruction that is currently being displayed and the remaining addresses decrement. Ladder Representation X0
X2
X5
X7
Y0 OUT
X1
X3
X4
Delete X7 X6 END
Identify the Instruction ADDRESS
INSTRUCTION
0 1, 6 7, 11
STR X0 OR X1, AND X5 AND X7, END
Delete
DESCRIPTION Starts branch 1 with X0 Joins X1 in parallel with X0, Starts branch 4 with X5 Adds X7 in series with X5, Ends the program
FIND the Address AND
X(IN)
7
FIND
SEARCHING
Maintenance and Troubleshooting
AND X7 $ AND
7 X 0007
Delete the Instruction SHFT
DEL
$ 7 WANT TO DELETE?
Press CLR to abort the edit or ENT to accept ENT
(If you press ENT, the change is accepted and the next address is displayed. If you pressed CLR, the current address is displayed.
DL405 User Manual, 4th Edition
$ ORN
7 X 0006
Page 529
Maintenance and Troubleshooting Special Debug Instructions
9--25
There are several instructions that can be used to help you debug your program during machine startup operations: END, PAUSE, STOP, and BREAK. END Instruction: You can quickly disable part of the program by inserting an END statement prior to the portion that should be disabled. The CPU assumes that is the end of the program. The following diagram shows an example. New END disables X10 and Y1
Normal Program X0
X2
X1
X3
Y0 X4
X0
X2
X1
X3
Y0 X4
Y1
X10
END
END
Y1
X10
END
PAUSE Instruction: This instruction provides a quick way to allow the inputs (or other logic) to operate while disabling selected outputs. The output image register is still updated, but the output status is not written to the modules. For example, you could make this conditional by adding an input contact or CR to control the instruction with a switch or a programming device. Or, you could just add the instruction without any conditions so the selected outputs are always disabled. PAUSE disables Y0 and Y1
Normal Program X0
X2
X1
X3
Y0
Y0 -- Y1 PAUSE
X4 Y1
X10
X2
X1
X3
Y0 X4 Y1
X10
END
STOP Instruction: Sometimes during machine startup you need a quick way to turn off all the outputs and return to Program Mode. In addition to the Test Modes, you can also use the STOP instruction. When executed, a STOP causes the CPU to exit Run Mode and enter Program Mode. The following program does this. Remember, all outputs are turned off during Program Mode. STOP puts CPU in Program Mode
Normal Program X0
X2
X1
X3
Y0
X20 STOP
X10
X4 Y1
END
X0
X2
X1
X3
X10
Y0 X4 Y1
END
DL405 User Manual, 4th Edition
Maintenance and Troubleshooting
END
X0
Page 530
9--26
Maintenance and Troubleshooting BREAK Instruction: If you have a DL440 CPU you can also use the BREAK instruction to stop the program scan. As long as the BREAK instruction is active the scan is stopped and the CPU enters a special mode, TEST-HALT. You have to use either the Handheld Programmer or DirectSOFT to restart the scan by placing the CPU back in Run Mode. When the CPU returns to Run Mode the scan resumes at the point of the break. For example, if you are using several data instructions it may be helpful to stop the scan and examine the accumulator and accumulator stack. The following diagram shows an example. X1
Constant
LD K3245
3
2
4
5
2
4
5
Current Acc. value Acc. 0
Load the value 3245 into the accumulator
0
0
0
3
V701
V700
Previous Acc. value Acc. X
LD K5151
X
X
X
X
X
X
X
Constant
5
1
5
1
Current Acc. value
Load the value 5151 into the accumulator, pushing the value 1234 onto the stack
Acc. 0
0
0
0
5
V701
1
5
1
V700
Previous Acc. value Acc. 0
X10
BREAK
0
0
3
2
4
5
0
0
0
0
3
2
4
5
V703 -- V702
Level 2
X
X
X
X
X
X
X
X
V705 -- V704
Level 3
X
X
X
X
X
X
X
X
V707 -- V706
Level 4
X
X
X
X
X
X
X
X
V711 -- V710
Level 5
X
X
X
X
X
X
X
X
V713 -- V712
Level 6
X
X
X
X
X
X
X
X
V715 -- V714
Level 7
X
X
X
X
X
X
X
X
V717 -- V716
Level 8
X
X
X
X
X
X
X
X
V721 -- V720
Stops Scan Here Y0
X2
Maintenance and Troubleshooting
0
Y0
X2
Accumulator Stack Level 1
Restarts Scan Here
In the example, input X10 triggers the BREAK instruction. The CPU will stop scanning the program at this point. Now you could easily see how the program instructions have affected the accumulator or accumulator stack. The following diagram shows how you could use the Handheld to examine the accumulator stack. Select the location to monitor CLR
V
2
5
0
0
WD ST
V MON
V 0703 xxxx
V 0702 3245
Value is displayed When you use the Handheld to return to Run Mode, the CPU starts scanning the program at the rung following the BREAK.
DL405 User Manual, 4th Edition