86
•
Chapter 7 Application Programming
DMC-1500
:ED Edit
Mode
000 #A
Program Label
001 PR1000
Position Relative 1000
002 BGX
Begin
003 PR5000
Position Relative 5000
004 EN
End
<cntrl> Q
Quit Edit Mode
:XQ #A
Execute #A
?003 PR5000
Error on Line 3
:TC1
Tell Error Code
?7 Command not valid
while running.
Command not valid while running
:ED 3
Edit Line 3
003 AMX;PR5000;BGX
Add After Motion Done
<cntrl> Q
Quit Edit Mode
:XQ #A
Execute #A
Debugging Programs
Commands
The DMC-1500 provides trace and error code commands which are used in debugging programs. The
trace command causes the controller to send each line in a program to the host computer immediately
prior to execution. Tracing is enabled with the command, TR1. TR0 turns the trace function off.
Note: When the trace function is enabled, the line numbers as well as the command line will be
displayed as each command line is executed.
When there is a program error, the DMC-1500 halts the program execution at the point where the error
occurs. The line number is then displayed.
The user can obtain information about the type of error condition that occurred by using the command,
TC1. This command reports back a number and a text message which describes the error condition.
The command, TC0 or TC, will return the error code without the text message. For more information
about the command, TC, see the Command Reference.
The DMC-1500 provides the capability to check the available program memory and array memory.
The command, DM ?, will return the number of array elements currently available. The command,
DA ?, will return the number of arrays currently available. For example, a standard DMC-1510 will
have a maximum of 8000 array elements in up to 30 arrays. If an array of 100 elements is defined, the
command DM ? will return the value 1500 and the command DA ? will return 13.
Operands
The operand _ED will return the value of the last line executed and can be used to determine where an
error occurred. For example, the command MG _ED will display the line number in the program that
failed.
The operand _DL returns the number of available labels.
The operand _UL returns the number of available variables.
The operand _DA returns the number of available arrays.
Содержание DMC-1510
Страница 6: ......
Страница 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Страница 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 160: ...148 Appendices DMC 1500 Card Level Layout...
Страница 178: ...166 Appendices DMC 1500 ICM 1100 Drawing 1 3 4 0 0 4 4 0 2 4 0 7 0 0 4 5 3 7 0 5 7 0 2 8 5 1 0 0 1 0 1 0 7 0 1 0 0...
Страница 180: ...168 Appendices DMC 1500...
Страница 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...