Specifications
BASIC commands
PROGRAMMING MANUAL 94
Revision 5.0
3.2.135 GET
/i
/i
/i
3.2.136 GLOBAL
/i
Type I/O command
Syntax GET [#n,] variable
Description The GET command assigns the ASCII code of a received character to a varia-
ble. If the serial port buffer is empty, program execution will be paused until a
character has been received. Channels 5 to 7 are logical channels that are
superimposed on the programming port 0 when using Trajexia Studio.
Note: Channel 0 is reserved for the connection to Trajexia Studio and/or the
command line interface. Please be aware that this channel may give problems
for this function.
Arguments • n
The specified input device. When this argument is omitted, the port as
specified by INDEVICE will be used. See the table below.
Input device
number
Description
0 Programming port 0
1 RS-232C serial port 1
2 RS-422A/485 serial port 2
5 Trajexia Studio port 0 user channel 5
6 Trajexia Studio port 0 user channel 6
7 Trajexia Studio port 0 user channel 7
• variable
The name of the variable to receive the ASCII code.
Example GET#5, k
This line stores the ASCII character received on the Trajexia Studio port chan-
nel 5 in k.
See also INDEVICE, INPUT, KEY, LINPUT
Type System command
Syntax GLOBAL "name", vr_number
Description Declares the name as a reference to one of the global VR varia-
bles. The name can then be used both within the program contain-
ing the GLOBAL definition and all other programs in the Trajexia
Studio project.
Note: The program containing the GLOBAL definition must be run
before the name is used in other programs. In addition, only that
program should be running at the time the GLOBAL 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.
Using GLOBAL with only the name will erase the specified con-
stant.
Using GLOBAL with no parameters will erase all GLOBAL decla-
rations. This also happens when the TJ1-MC__ is reset by switch-
ing the power off and back on, or by executing the EX command.
In programs that use the defined GLOBAL, name has the same
meaning as VR(vr_number). Do not use the syntax: VR(name).
A maximum of 128 GLOBALs can be declared.
Arguments • name
Any user-defined name containing lower case alpha, numeri-
cal or underscore characters.
• vr_number
The number of the VR to be associated with name.
Example GLOBAL "srew_pitch",12
GLOBAL "ratio1",534
ratio1 = 3.56
screw_pitch = 23.0
PRINT screw_pitch, ratio1
See also N/A