A2: Various NC/PLC interface signals and functions
1.3 Functions
Basic Functions
62
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Example
A WORD is to be transferred from the PLC to the NC.
The position offset within the NCK input (PLC output area) should be the fourth byte. The position offset must be
a whole-number multiple of the data width.
• Writing from PLC:
• Reading in part program
Behavior during POWER ON, block search
The DPR communications buffer is initialized during "POWER ON".
During a "block search", the PLC variable outputs are collected and transferred to the DPR communications
buffer with the approach block (analogous to writing of analog and digital outputs).
Other status transitions have no effect in this respect.
Program code (extract)
Comment
. . .
CALL FC21 (
Enable :=M10.0,
;if TRUE, then FC21 active
Funct :=B#16#4,
S7Var :=P#M 104.0 WORD1,
IVAR1 :=04,
IVAR2 :=-1,
Error :=M10.1,
ErrCode :=MW12);
. . .
)
Program code (extract)
Comment
. . .
PLCDATA = $A_DBW[4];
// Read a word
. . .