From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control a LabVIEW VI remotely using Visual Basic

I'm new to labVIEW.  I was given the task of controlling a labVIEW VI remotely using Visual Basic and the tcp/ip protocol.  I searched the forum for examples, but didn't come across any.  I would like to know:
1.  I've seen the mentioning of remote panel.  Do I need one on the machine where VB is running in order to communicate with the VI on the remote machine?
2. How to make remote calls from within Visual basic?

An example will be the most helpful.  Many thanks in advance.

0 Kudos
Message 1 of 5
(2,921 Views)
Take a look here , here , and here

Maybe those can shed some light on the topic.. I know they helped me.


EDIT: Just relized you said "control remotely"... well... i hope those links can still help. Although Im sure youve run across them already.

Message Edited by MJBrehm on 09-06-2006 03:06 PM

0 Kudos
Message 2 of 5
(2,914 Views)

Hi uits,

      Here's a link that demonstrates a LabVIEW program as an ActiveX server - called from a VB client.  I think with a little work you can move the VB client to a different "remote" machine. Smiley Happy  I don't know if LabVIEW's dot-NET tools provide a similar interface.  Of course you could always brute-force remote-control from VB through a TCP/IP connection to a LabVIEW program (setting up your own messaging.)

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 5
(2,894 Views)
Hello tbd,
Thanks very much for the example link.  I modified the VB code to use with my labVIEW VI.  A  problem I ran into was that my labVIEW VI is in a while loop (unlike the example where the labVIEW VI runs once and stops).  The VB code would start my VI okay, but then hung, and I'd receive a Windows error message 'component request pending'.  Any insights on how to correct the problem? 

All this leads to another question:  If there's a labVIEW VI running,  how can I pass controls to and retrive values from it from VB without stopping the labVIEW program?  Thanks very much.



  
0 Kudos
Message 4 of 5
(2,865 Views)

Hello uits,

It may be possible to do this using the SetControlValue method.  You can change the values of the controls while the VI is executing.  This may not address the other issue of the error.  What gets this error and is it the vi or the visual basic program that gets the error?  A screen shot may be very helpful to figuring out what is happening. 

I hope this helps.

Steven T.

0 Kudos
Message 5 of 5
(2,834 Views)