Detailed description
2.12 Block descriptions
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
2-93
Caution
The text below is only relevant if an MCP1In, MCP1Out, MCP1StatSend, or
MCP1StatRec pointer parameter (or the parameters for the second MCP and the HHU) is
to be assigned to a data block (these pointers are usually stored on inputs or outputs).
To assign the MCP1In, MCP1Out, MCP1StatSend, or MCP1StatRec pointer parameter
(or the parameters for the second MCP and the HHU) to data block elements:
The In parameter (e.g., MCP1In) for this operator component must point to a data block.
The parameterized DB number must be the same for the other parameters if the other
pointers point to data blocks (the other parameters can point to inputs, outputs or flags).
All pointers of an operator component do not have to point to data blocks.
Declaration 810D, 840D
Code Comment
FUNCTION_BLOCK FB 1
VAR_INPUT
MCPNum: INT:= 1; //0: No MCP
//1: 1 MCP (default)
//2: 2 MCPs
MCP1In: POINTER; //Start addr. MCP 1 input signals
MCP1Out: POINTER; //Start addr. MCP 1 output signals
MCP1StatSend: POINTER; //Status DW for sending MCP 1
MCP1StatRec: POINTER; //Status DW for receiving MCP 1
MCP1BusAdr: INT:= 6; //Default
MCP1Timeout: S5TIME:= S5T#700MS;
MCP1Cycl: S5TIME:= S5T#200MS;
MCP2In: POINTER; //Start addr. MCP 2 input signals
MCP2Out: POINTER; //Start addr. MCP 2 output signals
MCP2StatSend: POINTER; //Status DW for sending MCP 2
MCP2StatRec: POINTER; //Status DW for receiving MCP 2
MCP2BusAdr: INT ;
MCP2Timeout: S5TIME:= S5T#700MS;
MCP2Cycl: S5TIME:= S5T#200MS;
MCPMPI: BOOL:= FALSE;
MCP1Stop: BOOL:= FALSE;