LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the difference between the 2 activex server interface types

Hi,
i have a problem with a LabView ActiveX-Server i wrote. This is a little test application with 2 ActiveX-Servers and a VC++ Application. The first server opens the serial resource and sends it as variant to VC. VC sends the variant then back to the second server where i want to communicate with a serial device. When i access the second server through the LabView.Application interface everything is fine. But when i'm trying to access the exe directly with [VI-Name].vi (i think this is called run interface) i get an error that my resource for the serial interface is not correct.
Want is the difference between the two interface types and how can i solve the problem?
Thanks
0 Kudos
Message 1 of 8
(2,732 Views)
The path of a main VI changes after it is compiled into executable. For example, the original VI is at
c:\temp\test\main.vi,
after building it into executable (say the executable directory is exe), the path to main.vi then changes to
c:\temp\test\exe\main.exe\main.vi

Sometimes in order to correctly reference some relative information, the "main.exe" need to be removed from the path. If you are accessing main.vi at development time, then the correct path should be the longer one during runtime.

-Joe
0 Kudos
Message 2 of 8
(2,717 Views)
Hi Joe,
i'm not quite sure i get you right. My problem ist no vi- or path-problem, i have a problem with a VISA serial resource handle. Is it a problem to store a VISA handle as variant in a VC-client and access it later in a LV ActiveX-Server?
0 Kudos
Message 3 of 8
(2,702 Views)
You can wire a string to the VISA variant resource type in labview. I don't use VC so I could not speak on its part, but you certainly can save the VISA resource as string, can't you?

-Joe
0 Kudos
Message 4 of 8
(2,699 Views)
With strings it's the same. Only the error message changed. Now the handle is correct but the device is busy. Is it possible that I can use a serial handle only within one exe and can not share it? With other handles it's no problem at all.
0 Kudos
Message 5 of 8
(2,685 Views)
when you use the VISA resource, was it being used by another application? For serial communication, you can have only one session active at any time.

-Joe
0 Kudos
Message 6 of 8
(2,679 Views)
I think that's it. Because of the 2 Active-X-Server I have 2 exes accessing the serial port. When I use the LabView Active-X interface both VIs run in the same thread (LabView) and everything is fine. When I build applications of both server I have 2 exes (threads), thats the problem.
Ok, I think I understand that one, thanks Joe
0 Kudos
Message 7 of 8
(2,673 Views)
Glad to be helpful

-Joe
0 Kudos
Message 8 of 8
(2,669 Views)