I’m writing values to other equipment via OPC and modbus. I’ve lifted the example from http://www.autoitscript.com/forum/topic/127376-using-autoit-to-read-data-from-opc-server/page__hl__%2Bopcserver and it works well including the Item.Write. Now I’d like to use OPCGroup.SyncWrite because with .Write the modbus server does individual writes and it's too slow.
I have example in VB from http://forums.mrplc.com/index.php?showtopic=12381
OPCGroup1.SyncWrite NumItems, ServerHandles(), Values(), Errors() 'Perform OPC Write
My attempt in AutoIt:
Output:
I think the group object is right (when I used the ID it said 'not an object'), item handles and values seem right. What could be wrong? Are the format of AutoIt arrays correct for passing to other languages?
Thanks.
I have example in VB from http://forums.mrplc.com/index.php?showtopic=12381
OPCGroup1.SyncWrite NumItems, ServerHandles(), Values(), Errors() 'Perform OPC Write
My attempt in AutoIt:
[ autoit ]
0 ~24986912~ ~1.100000~ ~~ 1 ~24987056~ ~1.100000~ ~~ 2 ~24987200~ ~1.100000~ ~~ 3 ~24987344~ ~1.100000~ ~~ (178) : ==> The requested action with this object has failed.: $OPCGroup1.SyncWrite($iOPCNofItms, $OPCItmHnds, $sOPCValues, $OPCErrs) $OPCGroup1.SyncWrite($iOPCNofItms, $OPCItmHnds, $sOPCValues, $OPCErrs)^ ERROR
I think the group object is right (when I used the ID it said 'not an object'), item handles and values seem right. What could be wrong? Are the format of AutoIt arrays correct for passing to other languages?
Thanks.