Note:
The NO command also works to comment programs. The inclusion of the apostrophe or NO
commands will require process time by the RIO board.
Using REM Statements with the Galil Terminal Software
When using Galil software to communicate with the RIO, REM, as in remark, statements may also be
included. ‘REM’ statements begin with the word ‘REM’ and may be followed by any comments that
are on the same line. The Galil terminal software will remove these statements when the program is
downloaded to the RIO board. For example:
#OUTPUT
REM PROGRAM LABEL
SB1;CB2;
REM Set Bit 1 and Clear bit 2
EN
REM END OF PROGRAM
Since the REM statements will be removed when the program is downloaded to RIO, be sure to keep
a copy of the program with comments stored on the PC.
Program Lines Greater than 40 Characters
Line Continuation Character
A new character ( ` ) {ascii character 96} has been included to allow a command in an application
program to extend beyond the confines of the 40 character maximum line length.
#TEST
IF((var100=100)& (var101=50));MG"Condi`
tion satisfied”;ELSE;MG”Stop”;ENDIF
EN
This allows for
a) more efficient command compressing
b) the continuation of message commands (MG) on multiple lines.
c) Longer IF, JP, & JS conditional statements
(Note: the total length of a multi-line command can not exceed 80 characters)
Lock Program Access using Password
The RIO can lock out user access to the internal program using the PW and {cntrl}L{cntrl}K commands.
The PW sets the Password for the unit and the {cntrl}L{cntrl}K will lock the application program from
being viewed or edited . The commands ED, UL, LS and TR will give privilege error #106 when the RIO
is in a locked state. The program will still run when locked. The locked or unlocked state can be
burned with the BN command. Once the program is unlocked, it remains accessible until a lock
command or a reset (with the locked condition burned in) occurs. An example of how to lock the
program is shown here:
:
PW test, test
:^L^K test,1
1 locks, 0 unlocks
:LS
?
TC1
106 Privilege violation
Chapter 5 Programming ▫ 57 RIO-47xxx Rev 1.0r