Справочник Пользователя для Delta Tau GEO BRICK LV
Turbo PMAC User Manual
Synchronizing Turbo PMAC to External Events
353
These commands in the motion program are followed immediately by the calculations and commands for
the first moves that are to be started on the trigger. With the time-base frozen, Turbo PMAC will perform
all of the calculations, but not start actual execution of these moves. Variable I11 (calculation delay)
should be set to 0, so Turbo PMAC will be ready to start the move as soon as the time base starts.
the first moves that are to be started on the trigger. With the time-base frozen, Turbo PMAC will perform
all of the calculations, but not start actual execution of these moves. Variable I11 (calculation delay)
should be set to 0, so Turbo PMAC will be ready to start the move as soon as the time base starts.
Step 4: Arming the Trigger
The motion program that calculates the moves cannot arm the trigger itself without having a chance that
the trigger could occur before the calculations are done. If this were to happen, the program would be
behind the desired synchronization. Therefore, for reliable operation, the trigger should be armed by a
task that cannot execute until all of the move calculations are done, usually a PLC program. Arming the
trigger requires just one simple conditional branch in a PLC program; it just looks to see if the time base
is frozen, and if it is, the PLC program arms the trigger. Since the PLC program cannot interrupt the
motion program, this is guaranteed to happen after the motion program has finished the calculations for
the move.
The motion program that calculates the moves cannot arm the trigger itself without having a chance that
the trigger could occur before the calculations are done. If this were to happen, the program would be
behind the desired synchronization. Therefore, for reliable operation, the trigger should be armed by a
task that cannot execute until all of the move calculations are done, usually a PLC program. Arming the
trigger requires just one simple conditional branch in a PLC program; it just looks to see if the time base
is frozen, and if it is, the PLC program arms the trigger. Since the PLC program cannot interrupt the
motion program, this is guaranteed to happen after the motion program has finished the calculations for
the move.
Step 5: Starting on the Trigger
Once the trigger has been armed, Turbo PMAC waits for the position-capture trigger to occur on the
master encoder. Variables I7mn2 and I7mn33 determine which edges of which signals cause the trigger.
When Turbo PMAC sees that the trigger has occurred, it starts the time base, using the captured master
position as the starting point for the time base.
Once the trigger has been armed, Turbo PMAC waits for the position-capture trigger to occur on the
master encoder. Variables I7mn2 and I7mn33 determine which edges of which signals cause the trigger.
When Turbo PMAC sees that the trigger has occurred, it starts the time base, using the captured master
position as the starting point for the time base.
Triggered Time-Base Example
Motor #1 is the A-axis in Coordinate System 1. It is a rotary axis with a 2500 line-per-revolution encoder
on the motor, and its load is geared down from the motor at a 3-to-1 ratio. It is to be slaved to a master
encoder connected to Turbo PMAC on Servo IC 2 Encoder 4. The master encoder has 4096 lines per
revolution, and typically rotates at about 600 rpm. After being given the command to run, the X-axis
must wait for the index pulse of the master and for 45 degrees past it. For the next 36 degrees of the
master, it must accelerate up to speed, then run at speed for 144 degrees of the master, and finally
decelerate over 36 degrees of the master. This move must cover one full revolution of the A-axis.
on the motor, and its load is geared down from the motor at a 3-to-1 ratio. It is to be slaved to a master
encoder connected to Turbo PMAC on Servo IC 2 Encoder 4. The master encoder has 4096 lines per
revolution, and typically rotates at about 600 rpm. After being given the command to run, the X-axis
must wait for the index pulse of the master and for 45 degrees past it. For the next 36 degrees of the
master, it must accelerate up to speed, then run at speed for 144 degrees of the master, and finally
decelerate over 36 degrees of the master. This move must cover one full revolution of the A-axis.
We will use the triggered time-base, triggering from the master encoder’s index pulse. Choosing 600 rpm
as our “real-time” speed for the master, we compute our real-time input frequency (RTIF) in counts/msec:
as our “real-time” speed for the master, we compute our real-time input frequency (RTIF) in counts/msec:
600 rev/min * (min/60 sec) * (4096 lines/rev) * (4 counts/line) * (sec/1000 msec)
= 163.84 counts/msec
The time-base scale factor (SF) is:
SF= 131,072 / RTIF = 131,072 / 163.84 = 800 (decimal)
At the real-time speed of 600 rpm (10 rps), one revolution of the master takes 100 msec; so 45 degrees of
the master takes 12.5 msec, and so on.
the master takes 12.5 msec, and so on.
Set-up and Definitions
I7240=3
; x4 decode of IC 2 Enc 4, set to count up in direction of motion
I7242=1
; ENC 4 capture trigger on rising edge of index pulse
I8008=$A78218
; Add triggered time base entry to end of default conversion table
; process $A is triggered time-base, running (post-trigger); $78218
; points to IC 2 Enc 4 registers
I8009=800
; Scale factor is 800 decimal Result is at address $350A
M199->Y:$3509,20,4
; Method digit of conversion table entry =$9 frozen, $B armed,
;$A
running
&1
; Address Coordinate System 1
#1->83.33333333A
; Motor 1 is A-axis in C.S. 1; 3 x 2500 x 4 cts/rev / (360 deg rev)