LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get continuous values

Hi everybody!

I am working with LabVIEW 7.0 and I have the problem to get coninuous
values from an measuring instrument. The instrument works with an
ActiveX tool and I havnt got any problems all the time.
The measurement instrument is connected at the COM-Port and i have to
check the connection with a method-node before I can begin to measure.
But now i put this vi into another vi as sub-vi. The sub-vi connects
with the measuring instrument (duration for the connection: 2 seconds)
and gets one pair of measuring values. Then it leaves the sub-vi and
processes the rest of the vi. But I would like to see continuous
values on the Frontpanel. Because of the long connection-time, I see
only values which are updated at 2 second intervals. Thats
a long
time.
I think it is possible to get continuous values with functions like
'call by reference' or 'call by value'. But i dont know how it works.
Any body understand my problem and has an idea to remedy the problem?

Thanks

Skob
0 Kudos
Message 1 of 3
(2,573 Views)
I think we need to learn more about your application. What instrument vendor and model are you using? When you say that the subVI connects for two seconds, is the two seconds spent inside of the ActiveX object, or are you doing something in the subVI to wait two seconds? If the two seconds is being spent in ActiveX, there's probably not much you can do about it (unless you are willing to not use the ActiveX object and just talk to the serial port directly). Note also that the measuring device itself may take two seconds to do any measurement. In that case, you can't go faster without replacing the device.

Brian
Message 2 of 3
(2,573 Views)
Hi Skob,
There are different ways of calling a subVI in LabVIEW. I'll mention each of these ways in a little detail:

The simplest is by inserting the subVI in the main VI (You will see the icon of the subVI on the block diagram). When this VI is called, the block diagram waits until the subVI is done executing, after which the main VI continues to execute the rest of the VI.

Another way of calling a VI is called dynamically. The following links discuss the two way of calling a VI dynamically and their differences.

Serving Up Powerful Solutions - LabVIEW VI Server Examples

Calling a VI by Reference

What Is the Difference between Calling a VI with an Invoke Node and Calling a VI with a Call by Refe...

Suggestions
1) Call your VI that acquires data dynamically.
2) Open connection to your instrument only once (especially because it seems like it takes a while for this). Then acquire the data. After you are done, close the connection.

I hope this helps.

Sincerely,
Feroz
National Instruments
0 Kudos
Message 3 of 3
(2,573 Views)