![background image](http://html1.mh-extra.com/html/omron/trajexia-cj1w-mch72/trajexia-cj1w-mch72_operation-manual_742454170.webp)
All BASIC commands
Section 4-2
159
4-2-112 FLAG
/i
4-2-113 FLAGS
/i
/i
Example
FINS_COMMS(1, 0, 0, 0, $80, 50, 10, 0, 300, 3000)
This command writes 10 words (
length
=10) of CJ1W-MCH72 VR mem-
ory as integers (
local_area
=0), starting from VR(300)
(
local_offset
=300) to the CIO area of the PLC (
remote_area
=$80),
starting from CIO50 (
remote_offset
=50). Thus, the values in the
CJ1W-MCH72 memory range VR(300) to VR(309) are placed in mem-
ory CIO50 to CIO59 of the PLC. The timeout is set to 3 seconds.
See also
N/A
Type
System command
Syntax
FLAG(flag_number [,value])
Description
The
FLAG
command is used to set and read a bank of 24 flag bits. The
FLAG
command can be used with one or two parameters. With one
parameter specified 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
command is provided to aid compatibility with
earlier controllers and is not recommended for new programs.
Arguments
•
flag_number
The flag number is a value from 0..23.
•
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(21,ON)
Set flag bit 21 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 programs. The 24 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.
Bit number
Decimal value
0
1
1
2
2
4
3
8
4
16
5
32
Содержание 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...