YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Problem with PISDK and PHP Options · View
mrobutti77
#1 Posted : Friday, February 25, 2011 10:56:48 AM
Rank: Newbie
Groups: Member

Joined: 5/13/2010
Posts: 6
Location: Italy
Hi to All !


I'm trying to use PISDK inside my PHP page.

There is NO problems to link the PISDK COM object using the code line : $g_sdk = new COM('PISDK.PISDK');

There is NO problems to get the snapshot value from a specific pi point : $val = $pipt->Data->Snapshot-Value;

The issue happens when I try to get data using the ArchValue method from the $pipt object. See the example below :

$timestmap = new VARIANT(time(),VT_R8);

$pivl = $pipt->Data->ArcValue($timestamp,rtAuto);


The method retruns and error related to the VARIANT data type. It doesn't seem the same passed with a classic VB call.


Could someone give me help about this matter?

Thanks in advance.

Regards.

Marco
MR77
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
erburrell
#2 Posted : Wednesday, March 30, 2011 7:57:23 PM
Rank: Member
Groups: Member

Joined: 4/2/2009
Posts: 19
Location: Mississippi, USA
I'm not a php expert, but if you copied the expressions straight from your page, could it be the following:

$timestmap = new VARIANT(time(),VT_R8);

$pivl = $pipt->Data->ArcValue($timestamp,rtAuto);

Notice that the variable names are different...

Ed.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.