LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power supply control

Solved!
Go to solution

Hello Friends,

 

I'm trying to design a VI to control my power supply via serial port, controls are "set voltage - set current and output on-off". The VI is working but I can control only voltage or current when I start the VI, if voltage control works, current control doesn't work or vice versa, here is the VI that I have attached, please help me to solve this problem.

0 Kudos
Message 1 of 16
(1,851 Views)

Please attach the VI in an older version - preferably 2016 as most of the users don't use the latest LabVIEW yet.

 

I have not seen the VI but from your description it sounds like you want the VI to be continuously running to react to your changes in the front panel, if you implementation was not in such a way, it is expected that you've configure the values before you run the VI

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
Message 2 of 16
(1,830 Views)

I have attached again as 2016 version

0 Kudos
Message 3 of 16
(1,822 Views)

Verifying against the commands (from this post), your implementation is correct. Only one suggestion is to add a 100ms or 500ms delay inside the loop as you're bombarding the power supply continuously with the same set of commands.

santo_13_0-1649989505118.png

 

What makes you think that the current value is not changing? are you looking at the current readback?

Since you're using the power supply in CV mode, the current will remain actual as long as the current limit is not reached.

 

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
Message 4 of 16
(1,814 Views)

When the output is in "off" state, I can adjust preset voltage or current but not both. When i shut down my power supply and power up again both works, but just sometimes. Its weird. I can see the changes on the display of the power supply, I don't know where is the problem. I have already put delay in loop and set to 500ms, 100ms, 50ms, nothing changed. Its original software works as expected but very badly designed and has very ugly UI, so I want to design my own UI, and it's a good starting point to start learning Labview I guess.

0 Kudos
Message 5 of 16
(1,810 Views)

asdfgPNG.JPGThis is the original UI also made with Labview, but so ugly, source files has been extracted I think, I cannot find them in installation folder.

0 Kudos
Message 6 of 16
(1,805 Views)

If i put each command block into a flat sequence for sequential execution, is it good or bad idea? I think my power supply accepts only one command at a time.

0 Kudos
Message 7 of 16
(1,767 Views)

@BerkayBtr wrote:

If i put each command block into a flat sequence for sequential execution, is it good or bad idea? I think my power supply accepts only one command at a time.


No, do not use the Flat Sequence Structure.  You are already using data flow, via the error wire, to set the order that things happen.

 

Many devices cannot handle several commands coming in quick succession.  Just adding a simple delay (use Stall Dataflow.vim) between your commands will fix this.  The amount of time to wait depends on many factors (the device, the communication bus, the command itself, etc.).  Generally speaking, 100ms is more than long enough.  I did work with an oscilloscope that needed several seconds to handle certain commands.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 16
(1,752 Views)

Thank you crossrulz, I will try "stall dataflow"

0 Kudos
Message 9 of 16
(1,735 Views)

I have tried "Stall Dataflow.vim" between commands, still same behaviour, cannot adjust both presets, but when I stop and then start the VI, it adjust the preset value as seen on the front panel as soon as I start the VI. By the way, my English is not so good, sorry for that, hope I can express my problem well.

0 Kudos
Message 10 of 16
(1,708 Views)