Omron trajexia CJ1W-MCH72 Operation Manual page 176

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-117 FPGA_VERSION
4-2-118 FRAC
Example
A machine that applies lids to cartons uses a simulated line shaft. This
example sets up a virtual axis running forward to simulate the line shaft.
Axis 0 is then connected, with the CONNECT command, to this virtual
axis to run the conveyor. Axis 1 controls a vacuum roller that feeds the
lids on to the cartons using the MOVELINK control.
BASE(4)
ATYPE=0 'Set axis 4 to virtual axis
REP_OPTION=1
SERVO=ON
FORWARD 'starts line shaft
BASE(0)
CONNECT(-1,4) 'Connects base 0 to virtual axis in reverse
WHILE IN(2)=ON
BASE(1)
'Links axis 1 to the shaft in reverse direction
MOVELINK(-4000,2000,0,0,4,2,1000)
WAIT IDLE
WEND
RAPIDSTOP
See also
AXIS, CANCEL, RAPIDSTOP, REVERSE, UNITS.
/i
Type
Slot parameter
Syntax
FPGA_VERSION
Description
This parameter returns the FPGA version of the CJ1W-MCH72.
Arguments
N/A
Example
N/A
See also
N/A
/i
Type
Mathematical function
Syntax
FRAC(expression)
Description
The FRAC function returns the fractional part of the expression.
Arguments
expression
Any valid BASIC expression.
Example
>> PRINT FRAC(1.234)
0.2340
See also
N/A
Section 4-2
165

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents