Specifications

BASIC commands
PROGRAMMING MANUAL 88
Revision 5.0
3.2.124 FLAG
/i
3.2.125 FLAGS
/i
/i
local_offset
The offset of the first value in the local (source) memory area. The range
depends upon the VR or TABLE array size and value for the length argu-
ment.
timeout
The number of milliseconds to wait for a response from the destination
FINS server, before timing out.
IP1, IP2, IP3, IP4
Optional parameters that define the remote (destination) server IP
address. These arguments must be used if both the Trajexia system and
the destination FINS server do not belong to same network.
Example A Trajexia system and an OMRON CJ1 PLC with Ethernet Unit CJ1W-ETN11
system are connected to the same network. The IP address of Trajexia sys-
tem is 192.168.0.5. The IP address of the PLC Ethernet Unit is 192.168.0.12.
When you execute the command FINS_COMMS(0,0,12,0,$82,
1000,20,0,500,5000,192,168,0,12), 20 words (length=20) of DM PLC mem-
ory area (remote_area=$82) is read, starting from DM1000
(remote_offset=1000), and is written in the Trajexia VR memory in integer
format (local_area=0), starting from VR(500) (local_offset=500). So, values
in PLC memory range DM1000 to DM1019 are placed in Trajexia memory
VR(500) to VR(519). The timeout is set to 5 seconds.
When you execute the command FINS_COMMS(1,0,12,0,$80,
50,10,0,300,3000,192,168,0,12), 10 words (length=10) of Trajexia VR mem-
ory as integers (local_area=0), starting from VR(300) (local_offset=300), are
written to the CIO area of the PLC (remote_area=$80), starting from CIO50
(remote_offset=50). So, values in Trajexia memory range VR(300) to
VR(309) are placed in memory 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 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..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 pro-
grams. 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
01
12
24
38
416