Hello All!
I'm, trying to "BlockMove" a group of inputs/outputs to a DB for interaction with a WinCC SCADA system on a Siemens 412-2DP CPU. (The folks here feel more secure about the SCADA dealing with copies of the input/ output values instead of the actual live ones..prevents any chance of setting an output via WinCC etc etc..) I'm using an Any pointer to do this and although I do get vaues in my DB, they do not correspond to the live I/Os. Here's my code..any idea's on what exactly I'm doing wrong.
// Build Any Pointers To Transfer Robot IO Data To WinCC DB
// Build Any Pointer For Source IO Block (Robot System IOs)
LAR1 P##RobotIO_SRCBLK_AnyPoint
L B#16#10 // Constant 10h for S7
T B [AR1,P#0.0]
L B#16#2 // Data Type (02h = Byte)
T B [AR1,P#1.0]
L W#16#4 // Area size (In This Case Number of Bytes (Data Type Multiplier))
T W [AR1,P#2.0]
L W#16#0 // Data Block Number ( Not A DB Therefor Value = 0)
T W [AR1,P#4.0]
L B#16#81 // Data Type (81h = Input Area)
T B [AR1,P#6.0]
L B#16#0 // Load 0 for Byte 7 ( Last 3 Bits Not Needed Since Max Offset < 8191 )
T B [AR1,P#7.0]
L W#16#50 // Offset For Start Position of Input Address (I80.0)
T W [AR1,P#8.0]
// Build Any pointer For Destination DB (WinCC Robot Data DB)
LAR1 P##RobotIO_DSTBLK_AnyPoint
L B#16#10 // Constant 10h for S7
T B [AR1,P#0.0]
L B#16#2 // Data Type (02h = Byte)
T B [AR1,P#1.0]
L W#16#4 // Area size (In This Case Number of Bytes (Data Type Multiplier)
T W [AR1,P#2.0]
L W#16#55 // Data Block Number (DEC 85)
T W [AR1,P#4.0]
L B#16#84 // Data Type (84h = DB)
T B [AR1,P#6.0]
L B#16#0 // Load 0 for Byte 7 ( Last 3 Bits Not Needed Since Max Offset < 8191 )
T B [AR1,P#7.0]
L W#16#0 // Offset For Start Position in WinCC Robot Data DB (0)
T W [AR1,P#8.0]
// Transfer Trolley Counter Data From "Current Lots" DB to "Client Request" DB
CALL "BLKMOV"
SRCBLK :=#RobotIO_SRCBLK_AnyPoint
RET_VAL:=#RobotIO_ReturnVal
DSTBLK :=#RobotIO_DSTBLK_AnyPoint
Thank you kindly for your time and help.....Cheers!
R.K.
I'm, trying to "BlockMove" a group of inputs/outputs to a DB for interaction with a WinCC SCADA system on a Siemens 412-2DP CPU. (The folks here feel more secure about the SCADA dealing with copies of the input/ output values instead of the actual live ones..prevents any chance of setting an output via WinCC etc etc..) I'm using an Any pointer to do this and although I do get vaues in my DB, they do not correspond to the live I/Os. Here's my code..any idea's on what exactly I'm doing wrong.
// Build Any Pointers To Transfer Robot IO Data To WinCC DB
// Build Any Pointer For Source IO Block (Robot System IOs)
LAR1 P##RobotIO_SRCBLK_AnyPoint
L B#16#10 // Constant 10h for S7
T B [AR1,P#0.0]
L B#16#2 // Data Type (02h = Byte)
T B [AR1,P#1.0]
L W#16#4 // Area size (In This Case Number of Bytes (Data Type Multiplier))
T W [AR1,P#2.0]
L W#16#0 // Data Block Number ( Not A DB Therefor Value = 0)
T W [AR1,P#4.0]
L B#16#81 // Data Type (81h = Input Area)
T B [AR1,P#6.0]
L B#16#0 // Load 0 for Byte 7 ( Last 3 Bits Not Needed Since Max Offset < 8191 )
T B [AR1,P#7.0]
L W#16#50 // Offset For Start Position of Input Address (I80.0)
T W [AR1,P#8.0]
// Build Any pointer For Destination DB (WinCC Robot Data DB)
LAR1 P##RobotIO_DSTBLK_AnyPoint
L B#16#10 // Constant 10h for S7
T B [AR1,P#0.0]
L B#16#2 // Data Type (02h = Byte)
T B [AR1,P#1.0]
L W#16#4 // Area size (In This Case Number of Bytes (Data Type Multiplier)
T W [AR1,P#2.0]
L W#16#55 // Data Block Number (DEC 85)
T W [AR1,P#4.0]
L B#16#84 // Data Type (84h = DB)
T B [AR1,P#6.0]
L B#16#0 // Load 0 for Byte 7 ( Last 3 Bits Not Needed Since Max Offset < 8191 )
T B [AR1,P#7.0]
L W#16#0 // Offset For Start Position in WinCC Robot Data DB (0)
T W [AR1,P#8.0]
// Transfer Trolley Counter Data From "Current Lots" DB to "Client Request" DB
CALL "BLKMOV"
SRCBLK :=#RobotIO_SRCBLK_AnyPoint
RET_VAL:=#RobotIO_ReturnVal
DSTBLK :=#RobotIO_DSTBLK_AnyPoint
Thank you kindly for your time and help.....Cheers!
R.K.