BASIC commands
PROGRAMMING MANUAL
59
Revi
si
on 3.0
3.2.54 CONNECT
/i
3.2.55 CONSTANT
/i
3.2.56 CONTROL
/i
Type
Axis command
Syntax
CONNECT(ratio, driving_axis)
CO(ratio, driving_axis)
Description
The
CONNECT
command connects the demand position of the base axis to
the measured movements of the axis specified by
driving_axis
to achieve an
electronic gearbox.
The ratio can be changed at any time by executing another
CONNECT
com-
mand on the same axis. To change the driving axis the
CONNECT
command
needs to be cancelled first.
CONNECT
with different driving axis will be
ignored. The
CONNECT
command can be cancelled with a
CANCEL
or
RAPIDSTOP
command. The
CLUTCH_RATE
axis parameter can be used to
set a specified connection change rate.
CONNECT
works on the default basis axis (set with
BASE
) unless
AXIS
is
used to specify a temporary base axis.
Arguments
•
ratio
The connection ratio of the gearbox. The ratio is specified as the encoder
edge ratio (not units). It holds the number of edges the base axis is
required to move per edge increment of the driving axis. The ratio value
can be either positive or negative and has sixteen bit fractional resolu-
tion.
•
driving_axis
The Master axis which will drive the base axis.
Example
In a press feed, a roller is required to rotate at a speed one quarter of the
measured rate from an encoder mounted on the incoming conveyor. The
roller is wired to axis 0. An input channel monitors the encoder pulses from
the conveyor and forms axis 1. This code can be used:
BASE(1)
SERVO = OFF ' This axis is used to monitor the conveyor
BASE(0)
SERVO = ON
CONNECT(0.25,1)
See also
AXIS
,
CANCEL
,
CLUTCH_RATE
,
CONNECT
,
RAPIDSTOP
.
Type
System command
Syntax
CONSTANT "name", value
Description
Declares the name as a constant for use both within the program containing
the
CONSTANT
definition and all other programs in the Trajexia Tools project.
Note: The program containing the
CONSTANT
definition must be run before
the name is used in other programs. In addition, only that program should be
running at the time the CONSTANT is executed, otherwise the program error
will appear and the program will stop when trying to execute this command.
For fast startup the program should also be the only process running at
power-up.
When the CONSTANT is declared, the declaration remains active until the
next TJ1-MC__ reset by switching the power off and back on, or by executing
the EX command.
A maximum of 128
CONSTANT
s can be declared.
Arguments
•
name
Any user-defined name containing lower case alpha, numerical or under-
score characters.
•
value
The value assigned to
name
.
Example
CONSTANT "nak",$15
CONSTANT "start_button",5
IF IN(start_button)=ON THEN OP(led1,ON)
IF key_char=nak THEN GOSUB no_ack_received
See also
N/A
Type
System parameter (read-only)
Syntax
CONTROL
Description
The
CONTROL
parameter contains the type of TJ1-MC__ in the system. The
value of this system parameter for the TJ1-MC__ is 262.
I52E-EN-03.book Seite 59 Freitag, 29. Juni 2007 11:55 11