![background image](http://html1.mh-extra.com/html/omron/trajexia-cj1w-mch72/trajexia-cj1w-mch72_operation-manual_742454272.webp)
All BASIC commands
Section 4-2
261
4-2-258 VRSTRING
/i
Example
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 ten 1 ' s and 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 as follows:
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
GOTO movep
load: ' Put load in position and mark array
OP(15,OFF)
VR(VR(0)) = 1
RETURN
The variables are backed up by a battery so the program here could be
designed to store the state of the machine when the power is off. It
would of course be necessary to provide a means of resetting com-
pletely following manual intervention.
Example
loop: ' Assign VR(65) to VR(0) multiplied by axis 1 measured
position
VR(65) = VR(0)*MPOS AXIS(1)
PRINT VR(65)
GOTO loop
See also
CLEAR_BIT
,
READ_BIT
,
SET_BIT
,
TABLE
.
Type
System command
Syntax
VRSTRING(vr_start)
Description
Combines the contents of an array of VR() variables so that they can be
printed as a text string. All printable characters will be output and the
string will terminate at the first null character found. (i.e. VR(n) contains
0)
Arguments
•
vr_start
number of first VR() in the character array.
Example
PRINT #5,VRSTRING(100)
See also
N/A
Содержание trajexia CJ1W-MCH72
Страница 69: ...Specifications Section 2 4 58...
Страница 83: ...FINS commands Section 3 4 72...
Страница 147: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...All BASIC commands Section 4 2 266...
Страница 278: ...267 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 371: ...360 Index...
Страница 373: ...362...