CDS-3310
Chapter
7 Application Programming
i
21
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.
Error Code Command
When there is a program error, the CDS-3310 halts the program execution at the point where the error
occurs. To display the last line number of program execution, issue the command, MG _ED.
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.
Stop Code Command
The status of motion for each axis can be determined by using the stop code command, SC. This can
be useful when motion on an axis has stopped unexpectedly. The command SC will return a number
representing the motion status. See the command reference for further information.
RAM Memory Interrogation Commands
For debugging the status of the program memory, array memory, or variable memory, the CDS-3310
has several useful commands. The command, DM ?, will return the number of array elements
currently available. The command, DA ?, will return the number of arrays which can be currently
defined. For example, a standard CDS-3310 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 7900 and the
command DA ? will return 29.
To list the contents of the variable space, use the interrogation command LV (List Variables). To list
the contents of array space, use the interrogation command, LA (List Arrays). To list the contents of
the Program space, use the interrogation command, LS (List). To list the application program labels
only, use the interrogation command, LL (List Labels).
Operands
In general, all operands provide information which may be useful in debugging an application
program. Below is a list of operands which are particularly valuable for program debugging. To
display the value of an operand, the message command may be used. For example, since the operand,
_ED contains the last line of program execution, the command MG _ED will display this line number.
_ED contains the last line of program execution. Useful to determine where program stopped.
_DL contains the number of available labels.
_UL contains the number of available variables.
_DA contains the number of available arrays.
_DM contains the number of available array elements.
_AB contains the state of the Abort Input
_LFa contains the state of the forward limit switch for the 'a' axis
_LRa contains the state of the reverse limit switch for the 'a' axis
_RS contains the state of the power-up error status
Содержание CDS-3310
Страница 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...