Table; Tablevalues - Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual

Hide thumbs Also See for TJ1-MC04 - PROGRAMMING 1:
Table of Contents

Advertisement

BASIC commands

3.2.256 TABLE

/i
Type
System command
Syntax
TABLE(address, value {, value})
TABLE(address)
Description
The TABLE command loads data to and reads data from the TABLE array.
The TABLE has a maximum length of 64000 elements. The TABLE values are
floating-point numbers with fractions. The TABLE can also be used to hold
information, as an alternative to variables. The TABLE command has two
forms.
TABLE(address, value{, value}) writes a sequence of values to the
TABLE array. The location of the element is specified by address. The
sequence can have a maximum length of 20 elements.
TABLE(address) returns the TABLE value at that entry.
A value in the TABLE can be read-only if a value of that number or higher has
been previously written to the TABLE. For example, printing TABLE(1001) will
produce an error message if the highest TABLE location previously written to
the TABLE is location 1000. The total TABLE size is indicated by the TSIZE
parameter. Note that this value is one more than the highest defined element
address.The TABLE can be deleted with by using DEL "TABLE" or NEW
"TABLE" on the command line.
Notes:
Applications like the CAM command, CAMBOX command and the
SCOPE command in Trajexia Tools all use the same TABLE as the data
area. Do not use the same data area range for different purposes.
The TABLE and VR data can be accessed from all different running
tasks. To avoid problems of two program tasks writing unexpectedly to
one global variable, write the programs in such a way that only one pro-
gram writes to the global variable at a time.
The TABLE and VR data in RAM will be lost when the power is switched
off.
Arguments
address
The first location in the TABLE to read or write. Range: [0,63999]
value
The value to write at the given location and at subsequent locations.
PROGRAMMING MANUAL
Example
TABLE(100,0,120,250,370,470,530,550)
The above line loads an internal table as below.
Example
The following line will print the value at location 1000.
>> PRINT TABLE(1000)
See also
CAM, CAMBOX, DEL, NEW, SCOPE, TSIZE, VR.
/i
Table entry
100
101
102
103
104
105
106

3.2.257 TABLEVALUES

/i
Type
System command
Syntax
TABLEVALUES(address, number_of_points, format)
Description
Returns a list of TABLE points starting at the number specified. There is only
one format supported at the moment, and that is comma delimited text.
Note: TABLEVALUES is provided mainly for Trajexia Tools to allow for fast
access to banks of TABLE values.
Arguments
address
Number of the first point to be returned
number_of_points
Total number of points to be returned
format
Format for the list
Example
No example.
See also
N/A
Value
0
120
250
370
470
530
550
143

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-mc16 - programming 1Tj1-mc04 1

Table of Contents