Omron trajexia CJ1W-MCH72 Operation Manual page 170

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-112 FLAG
4-2-113 FLAGS
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
(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
/i
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
/i
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.
/i
Bit number
0
1
2
3
4
5
integers
(local_area=0),
1
2
4
8
16
32
Section 4-2
starting
from
VR(300)
Decimal value
159

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents