### Original ZX Program

1XE1 1XD1 - - - (Opperating Sequence)

L IF(INXXXXXXXX1) VAR6=-1*VAR6 VAR7=-1*VAR7 NIF O1 TR0 TR1 D(VAR6) O0 G O1 D(VAR7) O0 G O1 VAR2=VAR1/10000 VAR3=VAR2*10000 VAR4=VAR1-VAR3 VAR5=VAR4*-10000 VAR7=VAR5*5000 VAR6=VAR3*5000 N XT

1XE100 1XD100 - - - (Start-up Sequence)

LD3 MN MPI IN1N IN2N IN3N IN4N IN5A IN6A IN7J OUT1J OUT2J OUT3J OUT4A INL0 STR15 OUTL1 OSE1 JVL.25 JVH.25 A600 V85 AD600 1VARD1 VAR2=VAR1/10000 VAR3=VAR2*10000 VAR4=VAR1-VAR3 VAR5=VAR4*-10000 VAR7=VAR5*5000 VAR6=VAR3*5000 XG1 XT

I1-I4 and O1-O3 were originally connected to the thumbwheels (wire# 89, 91, 92, 93 & 97, 98, 99 respectively) as was VOUT (wire# 121). I4 was connected to relay contacts; the relay was turned on by a Twist Jog switch operated by the opperator. There was no connection to I6. I7 & O4 were connected to the plc.

```1XE1                  Erase any previous #1 sequence
1XD1                  Begin sequence #1
L                     Begin a loop within the sequence
IF(INXXXXXXXX1)       If IN 6 is closed, then
VAR6=-1*VAR6          Let Variable 1 = - Variable 1
VAR7=-1*VAR7          Let Variable 2 = - Variable 2
NIF                   End If/then statement
O1                    Turn Output 1 on.
TR0                   Wait for IN 5 to open
TR1                   Wait for IN 5 to close
D(VAR6)               Set Distance to be Variable 6 steps
O0                    Turn Output 1 off
G                     Go Variable 6 steps
O1                    Turn Output 1 on
D(VAR7)               Set Distance to be Variable 7 steps
O0                    Turn Output 1 off
G                     Go Variable 7 steps
O1                    Turn Output 1 on
VAR2=VAR1/10000
VAR3=VAR2*10000
VAR4=VAR1-VAR3
VAR5=VAR4*-10000
VAR7=VAR5*5000
VAR6=VAR3*5000
N                    End Loop
XT                   End sequence

1XE100               Erase any previous #100 sequence
1XD100               Begin sequence #100
LD3                  Disable CW & CCW limit
MN                   Set mode to Normal (not continuous)
MPI                  Set mode positioning to Incremental
Distance = D1 + D2 + D3 ...
IN1N                 Set Input 1 to be a data input
IN2N                 Set Input 2 to be a data input
IN3N                 Set Input 3 to be a data input
IN4N                 Set Input 4 to be a data input
(For use with thumbwheels)
IN5A                 Set Input 5 to be a trigger input
IN6A                 Set Input 6 to be a trigger input
IN7J                 Set Input 7 to be a jog switch
OUT1                 Output 1 to be a strobe output
OUT2J                Output 2 to be a strobe output
OUT3J                Output 3 to be a strobe output
(For use with thumbwheels)
OUT4A                Output 4 to be a programable output
INL0                 Set In Level to Low
( ---|/|--- = closed = 1 )
STR15                Set Strobe delay to 15 milliseconds
(For use with thumbwheels)
OUTL1                Set Out Level to High
OSE1                 Enable Jog
JVL.25               Set Jog Velocity Low to .25 revolutions per second
JVH.25               Set Jog Velocity High to .25 revolutions per second
A600                 Set Acceleration to 600 revoutions per second^2
```