LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time controlled boolean button for turning powersupply ON and OFF

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 🙂

 

zmitk_0-1669218359110.png

 

0 Kudos
Message 1 of 15
(1,508 Views)

I see the files were not uploaded. Here are the files. 

0 Kudos
Message 2 of 15
(1,495 Views)

Please use zip, which is supported by windows. Nobody should be forced to install other software just to look at your attachment.

0 Kudos
Message 3 of 15
(1,478 Views)
0 Kudos
Message 4 of 15
(1,470 Views)

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…

Best regards,
GerdW


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

Thank you for answering, will learn how to make a state machine and try with that.

 

0 Kudos
Message 6 of 15
(1,415 Views)

@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?

0 Kudos
Message 7 of 15
(1,397 Views)

Yes, you are right. It is EA power supply, HV-9000-4K.

0 Kudos
Message 8 of 15
(1,383 Views)

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.

0 Kudos
Message 9 of 15
(1,316 Views)

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.

0 Kudos
Message 10 of 15
(1,297 Views)