EasyManuals Logo

Trio Motion Coordinator MC216 User Manual

Trio Motion Coordinator MC216
566 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #315 background imageLoading...
Page #315 background image
Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-125
System Parameters and Commands
VR
Type:
System Command
Syntax:
VR(expression)
Description:
Recall or assign to a global numbered variable. The variables hold real numbers and
can be easily used as an array or as a number of arrays. There are 251 variable loca-
tions which are accessed as variables 0 to 250, except on the MC206 which has 1024
VR’s numbered from 0..1023.
The numbered variables are used for several purposes in Trio BASIC. If these
requirements are not necessary it is better to use a named variable:
The numbered variables are BATTERY BACKED (except on MC202) and are not
cleared between power ups.- The numbered variables are globally shared between
programs and can be used for communication between programs. To avoid problems
where two processes write unexpectedly to a global variable, the programs should
be written so that only one program writes to the global variables.
The numbered variables can be changed by remote controllers on the TRIO Fibre
Optic Network, or from a master via a MODBUS or other supported network.
The numbered variables can be used for the
LINPUT, READPACKET
and
CAN
com-
mands.
Example 1:
' put value 1.2555 into VR() variable 15. Note local variable ‘van’ used to give name
to global variable:
val=15
VR(val)=1.2555
Example 2:
A transfer gantry has 10 put down positions in a row. Each position may at any time
be FULL or EMPTY.
VR(101)
to
VR(110)
are used to hold an array of ten1’s or 0’s to
signal that the positions are full (1) or EMPTY (0). The gantry puts the load down in
the first free position. Part of the program to achieve this would be:
movep:
MOVEABS(115) ‘ MOVE TO FIRST PUT DOWN POSITION:
FOR VR(0)=101 TO 110
IF VR(VR(0))=0) THEN GOSUB load
MOVE(200)‘ 200 IS SPACING BETWEEN POSITIONS
NEXT VR(0)
PRINT "All Positions Are Full"
WAIT UNTIL IN(3)=ON

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Trio Motion Coordinator MC216 and is the answer not in the manual?

Trio Motion Coordinator MC216 Specifications

General IconGeneral
BrandTrio
ModelMotion Coordinator MC216
CategoryController
LanguageEnglish

Related product manuals