CY545 Stepper System Controller
www.ControlChips.com
Y 100<cr>
E<cr>
Select external memory or location
Write the following commands to memory
100
106
111
117
121
125
131
133
135
139
145
150
157
161
167
169
177
183
188
195
199
205
211
213
219
224
231
235
241
245
253
R 175<cr>
F 12<cr>
Commands will start at address 100
First set up stepping parameters
S 200<cr>
A 0<cr>
W 3<cr>
N 200<cr>
+<cr>
Declare current position as zero
Wait for Bit 3 high, stock is available
G<cr>
Move 200 steps before first hole punch
Read hole spacing from external switches
Delay 250 msec, let stock settle into place
Activate punch with Bit 1 low
N #<cr>
D 250<cr>
/B 1<cr>
D 1000<cr> Delay 1 sec to punch hole
B 1<cr>
D 100<cr>
G<cr>
Turn off punch
Wait for punch to clear work stock
Move to next hole position
L #,139<cr> Repeat punches as set by external switches
D 250<cr>
/B 1<cr>
D 1000<cr> Delay 1 sec to punch hole
B 1<cr>
D 100<cr>
N 200<cr>
G<cr>
D 250<cr>
/B 2<cr>
D 1500<cr> Delay 1.5 sec to cut stock
B 2<cr>
D 150<cr>
P 0<cr>
T 4,121<cr> Repeat operation until Bit 4 is high
0<cr>
Delay 250 msec, let stock settle into place
Activate punch for last hole in piece
Turn off punch
Wait for punch to clear work stock
Move 200 steps after last hole punch
Delay 250 msec, let stock settle into place
Cut stock off with Bit 2 low
Turn off cutter
Wait for cutter to clear work stock
Return to starting location
Stop running program now
Q<cr>
Quit saving commands to memory
Y 100<cr>
X<cr>
Reset memory address to start of program
Execute the above program
© 2002 Cybernetic Micro Systems
88
Chapter 19 - Circuits and Examples