LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Supply Cycling ON/OFF in While Loop Despite State Machine Logic (Beginner)

Solved!
Go to solution

Hello everyone,

I'm a student and new to LabVIEW. I'm working on a temperature control project and have run into an issue that I can't seem to solve, and I would appreciate any help.

My Goal:

  • Read temperatures from two thermocouples (T_cell and T_o) using a NI cDAQ (DAQ Assistant)

  • Compare the two temperatures.

  • If T_cell > T_o, turn ON a Keysight E36000 Series DC Power Supply to 40V / 3A.

  • If the condition is not met, turn the Power Supply OFF (0V / 0A).

  • Most importantly: The power supply should maintain its state (either ON or OFF) without receiving new commands as long as the temperature condition is stable.

    - The Problem: Even when the T_cell > T_o condition is continuously true, the power supply does not hold a steady 40V output. Instead, it repeatedly cycles on and off. I can see the "CV" (Constant Voltage) light on the instrument's panel turn on for a moment and then the output turns off, repeating every second.

    - My Question: When I use Execution Highlighting, the logic appears to be working as intended. The outer case executes 'True' only once when the temperature condition first changes. On subsequent loops where the condition is stable, the 'False' (empty) case executes, which is correct.

    Logically, this should stop the VI from sending repeated commands, but the physical power supply is still cycling on and off. I don't understand what is still causing the instrument to turn off.

    Am I missing a fundamental concept or a wiring mistake in my implementation? I have attached my VI and screenshots of my Front Panel and Block Diagram.

    Thank you in advance for any guidance!

    (Here you would attach your VI file and the screenshots you have provided.)

  • dingding_1-1760688115435.png

     




0 Kudos
Message 1 of 3
(107 Views)
Solution
Accepted by topic author dingding

Why are you enabling the output and immediately disabling the output in the same case, if you want it to stay active? 

aputman_1-1760709621548.png

aputman
0 Kudos
Message 2 of 3
(62 Views)

It's my first time writing LabVIEW, so I took examples, wrote the code, and ran it. I missed the part you pointed out, but when I deleted the part I pointed out, I made sure it ran smoothly as I aimed. Thank you.

0 Kudos
Message 3 of 3
(29 Views)