APPLICATION-SPECIFIC FUNCTION: MOTOR MULTIPLEXER
This function is designed to combine the motor control signals produced by two linked MOVE SFC steps.
Click
here for information on the MOVE SFC step
A motor is controlled by the following three signals
(symbolized by the green/blue/red dots on the icon):
ON (0 or 1): The
motor runs when the ON signal is at 1. Otherwise, it stops (with optional
braking depending on the motor configuration)
DIRECTION (0 or 1): Indicates
the direction of motor rotation (1 clockwise, 0 anticlockwise)
SPEED (0 to
32768): Indicates the motor speed in revolutions per minute
Note 1: When more than two MOVE SFC steps are linked, it
is possible to combine them by cascading several MOTOR MULTIPLEXER blocks: The
three motor control signals at the multiplexer output combining the first two
steps are in turn combined with the three signals produced by the third step,
etc.
Note 2: In order to bring the speed
output within the PWM range [0..255], a GAIN block must be inserted before the
analog output controlling the motor speed. This block should be set to 255/N
where N is the maximum motor speed. For information on the GAIN block,
click here
This
function combines the ON1, DIRECTION1 and SPEED1 inputs of the first motor with
the ON2, DIRECTION2 and SPEED2 inputs of the second motor.
At the output:
Note 3: In principle, for the same motor, there
can only be one active MOVEMENT SFC step at any given time (ie. ON=1). If
several steps combined by a cascade of MOTOR MULTIPLEXER blocks are active
simultaneously, then the outputs of the last block will have the values ON=1,
DIRECTION=0 and SPEED=0, which will prevent the motor from moving.