These are notes I kept in an Excel file as I debuged the program onstage.
General Notes 7/15/1999
Compare Statements
m1 D<K
m2 D=K
m3 D>K
Motor Control Board Set-up
Revolutions per Second = 0.4
Forward State to Stop - adjust the Reverse Acceleration potentiometer
Reverse State to Stop - adjust the Forward Acceleration potentiometer
The Speed Pot ( on the pickle) value in register D4, is set to 737
The approximate count to stop, at the above speed value, is 700
The up stage / down stage encoder count, including the stopping distance,
is approximately 10,000
The rotation count, inclusive of the stopping distance, is approximately 36,700
In both States 2 and State Y, the Rotation Delay Count is 7,000
Program Count + 700 = Actual Count
STATE Program Count STATE Program Count
Master Master
Stage Right Stage Left
State 1 9,300 State 1 9,100
State W 46,700 State W 45,700
State 2 46,000 State 2 45,000
State X 10,000 State X 9,800
State 3 56,000 State 3 55,000
State Y 700 State Y 700
Synchronization Method with Accumulation Count
The Slave Encoder count is compared to the Master Encoder count. The difference
is multiplied by a predetermined percentage value, with the result combined with
the Slave Speed Value Register. The key to this is tracking the Encoder counts.
The Master Encoder never changes direction, but the Slave encoder's rotation
direction does change from State 1 to State 2, and from State 2 into State 3.
If the High Speed Counter's Buffer Memory is loaded, at the change of states,
with the appropriate Encoder count (negated or straight), the comparison is easy.
Synchronization
DEDIV K10 K100 D31 Divide 10 by 100 to give a % (produces a Floating Point
Number) & put it into the Percentage Register.
DSUB D12 D18 D33 Subtract Master Encoder count by the Slave Encoder count.
Put result into Difference Value Register. Depending on the
direction of the Slave Encoder count (+ or-), the Negated
Slave Encoder count may be used. Slave Value is always taken
away from Master Value - If the Slave Encoder is behind,
this results in a (+) value combined into the Slave Speed
register, increasing the speed of the Slave Motor.
FLT D33 D35 INT to FLT Converts the Difference Value Register (an integer)
into a Floating Point Number, used for further calculations.
DEMUL D31 D35 D37 Multiples the INT to FLT Register by the Percent Value Register.
Put into the Percent Combine Value Register.
INT D37 D39 FLT to INT Converts the Percent Combine Value Register (a
floating point number) into an Integer.
DADD D39 D8 D8 Add Combine the FLT to INT Register with the Slave Speed Value Register.
Accumulation Count
DTO K2 K10 D20 K2 Writing to a High Speed Counter - loading a preset value located
m1 m2 s n in a data register.
m1 - High Speed Counter Block Address
m2 - Buffer Memory Address
s - Source of the data (Head Address)
n - Number of words from the Head Address
STATE 1 - SR Compare D18 to D12
Slave Encoder counts down
D10 counts down
D18 counts up ' load into BFM for State 2
STATE 2 - SR Compare D10 to D12
Slave Encoder counts up
D10 counts up
D18 counts down ' load into BFM for State 3
STATE 3 - SR Compare D18 to D12
Slave Encode counts down
D10 counts down
D18 counts up
STATE W - SR Compare D18 to D12
Slave Encoder counts up
D10 counts up
D18 counts down ' load into BFM for State 2
STATE X - SR Compare D10 to D12
Slave Encoder counts down
D10 counts down
D18 counts up ' load into BFM for State 3
STATE Y - SR Compare D18 to D12
Slave Encode counts up
D10 counts up
D18 counts down
STATE 1 - SL Compare D16 to D22
Slave Encoder counts up
D16 counts up
D24 counts down ' load into BFM for State 2
STATE 2 - SL Compare D24 to D22
Slave Encoder counts down
D16 counts down
D24 counts up ' load into BFM for State 3
STATE 3 - SL Compare D16 to D24
Slave Encode counts up
D16 counts up
D24 counts down
STATE W - SL Compare D16 to D22
Slave Encoder counts down
D16 counts down
D24 counts up ' load into BFM for State 2
STATE X - SL Compare D24 to D22
Slave Encoder counts up
D16 counts up
D24 counts down ' load into BFM for State 3
STATE Y - SL Compare D16 to D24
Slave Encode counts down
D16 counts down
D24 counts up
Motor Ramping - Up & Down
UP
State 1 contact N / O RAMP s1 < s2 D K
State 2 contact N / O
State 3 contact N / O
State W contact N / O
State X contact N / O
State Y contact N / O
all contacts n /o & all or'ed together
s1 - start value, from a register zero value
s2 - end value, from a register target - Adjusted Speed Value Register
Copy of adjusted speed value Register - sent to the Master / Slave Speed Registers
D - what register is ramping
K - time setting (number of scans)
DOWN
STOP contact N/O RAMP s1 > s2 D K whatever latches the stop, must be broken with any State.
(needs latch) be broken with any State.
Whatever drives the RAMP instruction, must latch through the completion of
the command. (ie. The motors must reach zero for a stop command)
SR and SL Rotators must have their own Start and Stop Ramps. This is because
of the rotation delay in State 2 & X.
Return to PLC