12-01-2021 06:52 PM
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!
12-01-2021 07:35 PM
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
12-01-2021 07:45 PM
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.
12-01-2021 08:47 PM
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
12-01-2021 09:12 PM
Apologies, here.
12-01-2021 09:34 PM
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.
12-01-2021 09:50 PM
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.
12-02-2021 01:51 AM - edited 12-02-2021 01:55 AM
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!