All BASIC commands
Section 4-2
158
4-2-110 FLAG
/i
4-2-111 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
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...