11-23-2022 09:50 AM
Hello everyone,
I am new to Labview an I am trying to remote control a power supply and measure voltage and leakage current of varistors.
I am stuck with a problem, when I would like to time control the Boolean button. The idea is, when the button is pressed (set to True), the power supply would turn on and set the prefered voltage for n amount of time (lets say 100 ms). After that time, the actual voltage and current would be measured, and than power supply woud turn OFF.
Is it possible to control the time of boolean button when leached? Or I need to write a state machine, but I dont know how to.
For now, program is working like I want (without time control), commands are send to power supply (preset voltage, current), and also actual voltage and current are measured.
Thank you for helping me 🙂
11-23-2022 10:10 AM
I see the files were not uploaded. Here are the files.
11-23-2022 10:43 AM
Please use zip, which is supported by windows. Nobody should be forced to install other software just to look at your attachment.
11-23-2022 11:07 AM
Sorry about that, zip file attached.
11-23-2022 02:41 PM
Hi zmitk,
@zmitk wrote:
when the button is pressed (set to True), the power supply would turn on and set the prefered voltage for n amount of time (lets say 100 ms). After that time, the actual voltage and current would be measured, and than power supply woud turn OFF.
That sounds like state1 (wait for button), state2 (set and enable power supply), state3 (wait time), state4 (read data), state5 (disable power supply).
What about using a statemachine?
@zmitk wrote:
Or I need to write a state machine, but I dont know how to.
Well, LabVIEW comes with lots of example VI and example projects.
I know there are example projects explaining basic statemachines…
11-24-2022 01:31 AM
Thank you for answering, will learn how to make a state machine and try with that.
11-24-2022 02:59 AM
@zmitk: I work for EA since almost 25 years and recognize some of our old VIs in your screenshot.
Out of curiosity: is it one of our power supplies and if so, which one?
11-24-2022 05:16 AM
Yes, you are right. It is EA power supply, HV-9000-4K.
11-29-2022 06:35 AM
Hi there,
With my program I am controlling a power supply and taking different measurements on varistors.
The program is made with state machine. I would like to write measured values to a text file, but I dont know how to pass data from one state of state machine to another.
When you press boolean 'Start measure', state machine starts, and take 3 different measurements (voltage on varistor at 1 mA, 10mA, and leakage current of the varistor (in different states).
How to pass data from states of state machine, so I can write than all together in one row in text file?
I hope you can open my code (hope all files are in project file).
Thank you.
11-29-2022 06:38 AM
I made this program with state machine (or I just think this is a state machine 🙂 )
It is working for now, I just have a problem with passing data from different states of state machine, to write it to a text file at the end.
Hope you can open my code.