AMS DCB-274 Computer Hardware User Manual


 
ADVANCED MICRO SYSTEMS, INC. SMC-27X2 SOFTWARE
43
128 k 400 0 Set new trip at 400 and turn ports off.
133 k 600 16 Set new trip at 600 and turn port 5 on.
138 i 200 8 Reset origin, RAM=128, port 4 on.
143 P 0 End program.
S Save the shadow RAM program.
G 0 Execute program.
Failure to store the program in shadow memory will result in loss of all commands between 128 and 192.
Once they are stored, they will automatically reload with every reset.
The following example further describes the program sequence:
Address Description
0 “O 0” The position counter is reset to zero.
4 “k 200 8” The initialize command “k” is first used to initialize the real time
sequence.
Assume that the command “k 200 8” is executed at the beginning
of the program. The following actions take place:
1. Port 4 is set on per data2 see the “A” command.
2. The first trip position is set per Data1 (200).
3. A special trip program counter (PC) is set to 128.
9 “+6000” Now the +6000 index command is started. When the position
matches 200, the command located at 128 is checked for either a
“i” or “k.”
128 “k 200 0” The “k” changes the trip position to 400 and turns all output ports
off (high logic voltage) This is executed while at the exact 400
position. The program counter is advanced to 133.
133 “k 600 16” This is executed like the previous 128, new trip=600, ports 4 and
are turned on and the program counter set to 138.
138 “i 200 8” The restart command performs the same actions as the initial k 200
8 command. Port 4 is turned on, the trip is set to 200 and program
counter is reset to 128.
ONE IMPORTANT ADDITIONAL ACTION is performed. The position counter is reset to ZERO and causes
the repeat of trips 200, 400 and 600.
Notes:
1. The physical motor travel will be 6000 steps, even though the position counter has been reset 10 times.
2. The cycle will repeat 10 times.
3. The position counter ends up at zero.