Try turning the last parameter to your OPCItemWrite call into a string. Some servers are sensitive to the actual type of the data in the variant. I think you might have tried that though.
Someone else had a similar problem, he started out with this code (which gave the error):
use Win32::OLE::OPC; use CGI qw(:all); $opcintf = Win32::OLE::OPC->new('OPC.Automation','hci.phd'); $group = $opcintf->OPCGroups->Add('sanitize_mode'); $items = $group->OPCItems(); $reset_item = $items->AddItems("6440SAN2.PV", 999); $reset_item->Write('SANITIZE');
and this is the code once he got it working:
use Win32::OLE::OPC; use CGI qw(:all); $opcintf = Win32::OLE::OPC->new('OPC.Automation','hci.phd'); $group = $opcintf->OPCGroups->Add('san_grp'); my $items = $group->OPCItems; $items->AddItem( '6440SAN2.PV', 0 ); $item = $items->Item(1); $item->Write('NORMAL');
You don't show how you are creating the groups, that might have something to do with it.
In reply to Re: Win32::OLE error
by Anonymous Monk
in thread Win32::OLE error
by nonnonymousnonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |