From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Random values from a VI meant to measure periodic time

Hi,

 

I have set up a DAQ to a photogate. I have set up labview to measure the periodic time of a pendulum using the photogate, but I am getting random values for the period when the photogate is blocked. It is my first time using labview this way so any help would be much appreciated. I have attached the VI I am working with below.

 

0 Kudos
Message 1 of 3
(546 Views)

Hi Patrick,

 


@PatrickClancy wrote:

I have set up a DAQ to a photogate. I have set up labview to measure the periodic time of a pendulum using the photogate, but I am getting random values for the period when the photogate is blocked.


Why do you use the DAQAssistent?

Have you had a look at those example VIs coming with LabVIEW and DAQmx? Have you tried to execute the example VIs explaining how to use DAQmx counters?

Have you tried to measure the same using the testpanels in MAX? Does it work correctly ("as expected") in MAX?

 

We cannot test your VI as we don't have your DAQ device nor your UUT - you need to test on your own!

 

Btw. why are both frontpanel and blockdiagram set to full screen? This is really annoying - especially for such a small VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(527 Views)

Sorry, since I don't have drivers installed, I cannot see how your assistant is configured. can you give details?

 

All you read is dynamic data of unknown datatype and size that you then display as a single scalar, in a loop that does not have any timing and spins as fast as your code allows.

 

What does the value of the "scalar" represent? If this is a counter value (guessing from the file name), you probably want to process it for a more reasonable display. Why is it orange?

 

I recommend not to use a switch as stop button. Seems confusing.

0 Kudos
Message 3 of 3
(508 Views)