
B-63434EN/02 DESCRIPTION 2.CYCLIC TRANSMISSION
- 17 -
2.2.2 DI data allocation
2.2.2.1 Dynamic DI data allocation of common memory area 2
The user program switches to the DI data area for a target node and
reads the DI data for the node. By specifying a node number, the DI
data from the node and status information of the node can be read.
Procedure
Set the following parameters beforehand:
1) Pa42: Allocation address (for DI)
2) Pa43: Area 2 data exchange condition allocation address
3) Pa44: Switch flag allocation address
4) Pa46: Area 2 static allocation data size = 0
Organization of area 2 data exchange condition allocation:
2222<, )'=$1+
2222< )**-:%/)+'-;
2222< ##-%>:%/)+'-;
2222<5 )**-:%/)+'-;
Note) This function does not use the hatched portion.
Procedure of dynamic change of common memory area 2 allocation
by the user program:
1) The user program specifies the following in the PMC D area
specified by Pa43 (area 2 data exchange condition allocation
address):
- Node number
- DI offset
- Data size
2) Then, the user program writes FFh to the area (switch flag) in
the PMC R area specified by Pa44 (switch flag allocation
address).
3) The CNC monitors the switch flag at all times. When FFh is
written, the node number, DI offset, data size, and DO offset set
in the PMC D area are taken in as internal information, and the
switch flag is set to 00h. At this time, the CNC once reads DI
data according to the new settings before the switch flag is set to
00h. So, the user program can read DI data immediately after
checking that the switch flag is set to 00h.
4) Until FFh is written to the switch flag, the user program can read
the node information of a specified node number and area 2 DI
data from the R area or the D area.
5) Until FFh is written to the switch flag, the CNC writes the node
information of a specified node number and area 2 DI data to the
specified area in the PMC R area or D area.