EasyManua.ls Logo

Omron TJ1-MC04 - PROGRAMMING 1

Omron TJ1-MC04 - PROGRAMMING 1
312 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
Loading...
BASIC commands
PROGRAMMING MANUAL 84
Revision 3.0
3.2.122 FLAG
/i
3.2.123 FLAGS
/i
/i
Type System command
Syntax FLAG(flag_number [,value])
Description The FLAG command is used to set and read a bank of 32 flag bits. The FLAG
command can be used with one or two parameters. With one parameter spec-
ified the status of the given flag bit is returned. With two parameters specified
the given flag is set to the value of the second parameter. The FLAG com-
mand is provided to aid compatibility with earlier controllers and is not recom-
mended for new programs.
Arguments flag_number
The flag number is a value from 0..31.
value
If specified this is the state to set the given flag to i.e. on or off. This can
also be written as 1 or 0.
Example FLAG(27,ON)
Set flag bit 27 on.
See also N/A
Type System command
Syntax FLAGS([value])
Description Read and set the FLAGS as a block. The FLAGS command is provided to aid
compatibility with earlier controllers and is not recommended for new pro-
grams. The 32 flag bits can be read with FLAGS and set with FLAGS(value).
Arguments value
The decimal equivalent of the bit pattern to which the flags must be set.
See the table below.
Example FLAGS(146) ' 2 + 16 + 128
Set Flags 1,4 and 7 on, all others off.
Example IF (FLAGS and 8) <>0 then GOSUB somewhere
Test if Flag 3 is set.
See also N/A
Bit number Decimal value
01
12
24
38
416
532
664
7128
I52E-EN-03.book Seite 84 Freitag, 29. Juni 2007 11:55 11

Table of Contents

Related product manuals