54
MNEMONIC FUNCTION TYPE
PG Enter/Exit Program Mode Program Instruction
DESCRIPTION
When starting program mode, you must specify at what address to enter the program instructions in the program space. Simply
type “PG” again when you have finished entering your program commands to go back to immediate mode.
While in program mode, leading tabs, spaces and blank lines are ignored. This allows the user to format a text file for readability, and
then download the program to the MDrive by transferring the text file in a program such as IMSTerminal or Hyperterminal. The
example given below could be stored in a text file and downloaded. The lines preceded by an apostrophe (‘) are comments and will
be ignored by the MDrive Motion Control.
USAGE
PG <address>
EXAMPLE:
PG 100 ‘Enter program mode, start program at address 100
*********PROGRAM*********
E ‘End prgram
PG ‘Exit program, return to immediate mode
RELATED COMMANDS: E,
MNEMONIC FUNCTION TYPE
PR Print Selected Data/Text Instruction
DESCRIPTION
This instruction is used to output text and parameter value(s) to the host PC. Text should be enclosed in quotation marks while
parameters (variables and flags) should not. Text strings and parameters which are to be output by the same PR instruction should
be separated by commas. The information being output is followed by a carriage return and line feed unless a semicolon (;) is
included at the end of the PR instruction to indicate that the cursor should remain on the same line.
It is important to note that the receive buffer for the MDrive Motion Control is 64 characters, this includes the PR instruction
itself, any spaces, text characters, etc. If the buffer length is exceeded ASCII code “OxFF” will echo to the terminal screen.
USAGE
PR <data/text>
EXAMPLE:
PR “Position =”, P ‘print axis position, 18 characters used
‘the terminal will display: Position = 1234567
RELATED COMMANDS: —
MNEMONIC FUNCTION TYPE
PM Postition Maintenance Enable Setup Flag
DESCRIPTION
This flag will enable the position maintenece functions of an MDrive Motion Control with encoder. The position maintenance
velocity will be at the setting for VI (Initial Velocity).
USAGE DEFAULT
PM= <0/1> 0 (Disabled)
EXAMPLE:
PM=0 ‘Position Maintenance Disabled (Default)
PM=1 ‘Position Maintenance Enabled
RELATED COMMANDS: VI