Hi, Everybody!
I need deploy an aplicattion for
1) GET data from PI System.
2) Calculate()
3) WRITE data to PI System.
In step 1 and 2 it everething ok, I get the data and calculate new values with no problems.
But in step 3, i get an error about type mismatch.
Im using PISDK and PERL/PHP language.
My code to WRITE data in a simple form is:
PERL
use Win32::OLE;
use Win32::OLE::Variant;
use Time::HiRes qw(usleep gettimeofday);
use Data:

umper;
my $PI = Win32::OLE->new('PISDK.PISDK') or die "Error";
my $server = $PI->Servers->Item("localhost");
$server = $PI->Servers->Item("localhost");
$server->Open("localhost;UID=piuser;pwd=piuser");
$value = Variant(VT_I4, 100);
$time= Variant(VT_I4,0);
$server->PIPoints("TagToWrite")->Data->UpdateValue($value->Value,$time->Value) or die "Can't write data to PI\n";
The result of the code is:
Win32::OLE(0.1709) error 0x80020005: "Type mismatch"
in METHOD/PROPERTYGET "UpdateValue" argument 2 at ...../PERL/writepi.pl line 28
Can't write data to PI.
Does anybody have a sample of some code with the UpdateValue function?
or some experience with PISDK/PERL/PHP?
In PHP the error is like PERL, type mismatch.
Thanks in advance.