LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop that reads voltage input changes

Hello, 

 

I am using ULx LabVIEW and a USB-231 to read and convert voltages from a high voltage power supply (I posted about it a little before but it's not too pertinent to this). 

 

I have part of the LabVIEW code that reads the input voltages and coverts them into the "real voltage" provided by the power supply, but I also want a continuous loop that can read when the input has changed and provide the correct value to the user. 

 

Anything helps, thank you! 

0 Kudos
Message 1 of 8
(1,167 Views)

To help us to help you, attach your VI.  (My goal is to teach you how to do your work for yourself).

 

Is "ULx LabVIEW" a different Product from "NI LabVIEW"?  Can you tell us anything about this Software?  Does it have a "Version number"?

 

Bob Schor

0 Kudos
Message 2 of 8
(1,159 Views)

ULx LabVIEW is a driver used for MCC DAQ products like the USB-231 I am using. Here's the link: https://www.mccdaq.com/daq-software/universal-library-extensions-lv.aspx

 

This is my VI so far. Takes an analog voltage signal and in the loop it scales it 25e3 (0-250kV) and has a numeric indicator. As far as reading when the analog voltage signal has changed, I'm a bit lost. 

 

 

 

0 Kudos
Message 3 of 8
(1,157 Views)

Sorry, I don't look at JPEG images of LabVIEW code.  [Would you be happy if I sent you a picture of my moderate-sized Matlab, Python, or C++ routine, rather than the native text-format file?].  Please attach your work in the form of a .VI file.

 

Bob Schor

0 Kudos
Message 4 of 8
(1,138 Views)

Apologies, here.

0 Kudos
Message 5 of 8
(1,133 Views)

To just read samples continuously, your implementation seems to do that alright (not the best but gets job done).

 

In addition, just be sure to wire a stop button to the stop terminal of the while loop and then you should be good to go.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 8
(1,126 Views)

Forgot to add the stop button before sending, thanks for the reminder. Any advice to make it better? I'm sure I can settle for this but I'm curious what could improve it. 

0 Kudos
Message 7 of 8
(1,122 Views)

Hi tjhanks,

 


@tjhanks wrote:

As far as reading when the analog voltage signal has changed, I'm a bit lost.


You should do it the other way around: read the signal continuously to detect when the signal has changed...

 

To detect changes you should use a shift register: it helps to compare current with previous values!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(1,090 Views)