AnsweredAssumed Answered

vrf Agilent VEE and OPCAutomation (.NET wrapper)

Question asked by VRFuser on Nov 9, 2004
I'm not sure what you're doing.  Looks like you are using objects that are
found outside of vee to be used by the .net environment.  I think the first
line executed because VEE allows .net.  But I think the second line is
confused as to whose doing the call.

Not sure but try:

Set ConnectedOPCServer = CreateObject("Kepware.KepserverEX.V4","Server")
where Server is a valid IP without the first line.

I'm assuming the first argument is your program ID and the second, "Server",
is some hostname or IP.


rufus

-----Original Message-----
From: John F. Moynihan [mailto:john.moynihan@vidacsolutions.com]
Sent: Friday, November 05, 2004 4:43 PM
To: VRF
Subject: [vrf] Agilent VEE and OPCAutomation (.NET wrapper)

I am new to Agilent VEE and would like to talk to an instrument through an
OPC server.  I have started a program, and can successfully instantiate an
OPCServer object.  However, the Connect method fails.  Here's a simple
example.

Set ConnectedOPCServer =
CreateInstance("Interop.OPCAutomation","Interop.OPCAutomation.OPCServerClass
");
ConnectedOPCServer.Connect("Kepware.KepserverEx.V4");

The first line executes and creates the instance.  The second line fails and
I get the following error. 

"Execution of method 'Connect' in the referenced .NET object or type failed"

Error number: 751

Exception type: System.InvalidCastException No such interface supported


Can anyone offer any insight?

John F. Moynihan
Project Engineer
Vidac Solutions
Office 636-305-9179
Cell   314-565-3377
Fax    636-349-8357
john.moynihan@vidacsolutions.com



---
You are currently subscribed to vrf as: rwarren@amti.net To subscribe send a
blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".


---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes