AMS DCB-274 Computer Hardware User Manual


 
ADVANCED MICRO SYSTEMS, INC. SMC-27X2 SOFTWARE
47
Function Type NV Bytes
Set Origin Immediate, Program 4
Command
O
Mnemonic
(Name) O
Data 1
Position (±8,388,607)
Data 2
None
Result
None
O (Set Origin)
This command sets the internal 24-bit position counter to the specified value. Zero position for the
RELATIVE mode is “0000.” Signed numbers are used. Hardware reset clears to “0000.” The position counter
is incremented or decremented for all motion commands. During any index the position counter is used only
for trip value comparison. This counter may be changed without affecting the distance of travel in process.
This command may be implemented within a program. It is very useful when used in conjunction with the
Find Home and Relative Positioning commands. Following, is an example:
P 0 Enter program mode.
F 1000 1 Find the Home switch in the “1” direction at a step rate of 1000 SPS.
O Set origin and counter to 0.
R 1000 Move to position 1000 relative to 0.
P Exit program mode.
Function Type NV Bytes
Program Mode On/Off Immediate N/A
Command
P
Mnemonic
(Name) P (a)
Data 1
Address (0-2047)
Data 2
None
Result
None, #
P (Program Mode)
The P command is always used in pairs. The first “P” initiates the program mode at the specified address.
Once in this mode all commands and data are directed into the NV memory for future execution. Entering the
second “P” command will terminate the PROGRAM mode, and then insert an end of program marker (0FFh)
in the stored program. The controller will then return to the COMMAND mode.
The program mode may also be terminated with the ESCape character, causing immediate return to the
COMMAND mode without inserting the end of program marker. This is useful for editing sections of the
program, without requiring that all commands be re-entered.
More than one program may exist at different addresses. These commands can than be executed via the “G
(address)” command. There are special address ranges that are assigned to various functions:
Address Function
128-191 Fast “shadow” RAM
256-511 “G 2048” command
1600 Power-up routines