8
Internal
Motion Generator
Page 30
User Manual for PMotion
8.3
Example of using the internal Motion Generator
This example refers to the example already described in section 7.7 on page 25. The internal
controller calculation of the tabular values is designed so that entries made via an operator
panel will influence the map. In this example, the print length and the distance between the print
marks are modified. It is assumed that the print length will be entered via the operator panel in
the variable $LEN in mm, and that the distance between the print markers will be entered in
variable $REG, also in mm. The dimensions stated in mm must be converted into increments.
In variables $ECM and $PCM, the conversion factors are increments/mm x 100. The
corresponding messages are output to the operator panel with the variables $MSG. The
command line for starting the motion generator is normally part of a program which is stored in
the controller’s Flash-EPROM. This program is called up when the map is to be recalculated.
The variables $REG and $LEN are written via the operator panel!
$REG=300
# Registration distance, mm
$LEN=150
# Print length, mm
$ECM=7958
# Web Encoder Counts x 100
$PCM=2776
# Print Drum Encoder Counts x 100
# Sequence for map calculation:
ES Map_01
$MSG=3
# Operators Panel Message „Calculating Map“
$MRESET=1
# Reset map variables
$MNAME=Map_01
# Map name
# Master
$MM0=0
# Master start position
$MM1=((($LEN/2+5)*$ECM)/100)
# Half print distance (+5mm window)
$MM3=($REG*($ECM/100)) #
Registration
distance
$MM2=($MM3-$MM1)
# Start of print
# Slave
$MS0=0
# Slave start position
$MS1=((($LEN/2+5)*$PCM)/100)
# Half print distance (+5mm window)
$MS3=(374*($PCM/100))
# Cycle length slave
$MS2=($MS3-$MS1)
# Start of print
# Segment 1: Constant Velocity
$MF1=1
# Constant velocity for printing
$MA1=348831
# Start velocity
$MW1=21000000
# Velocity matched with previous segment
# Segment 2: Sine-squared velocity
$MF2=3
# Sine-squared velocity for catching up / pausing
$MX2=0
# Start at 0%
$MY2=100000000
# End at 100%
$MW2=22001000
# End position segment 2 defined
# Segment 3: Constant velocity
$MF3=1
# Constant velocity for printing
$MW3=22000000
# Velocity matched with previous segment
$MNPT=1000
# Number of steps (points)
$MSTART=1
# Trigger internal motion generator
NS