LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run Program Continously

Solved!
Go to solution

Hi,

 

I wish to control an instrument via LabVIEW. The instrument is power source instrument. I need to use this instrument to supply power. But the problem is I need to supply continuous power. but when I use a loop, the power will on, off, on, off and go on. How can I make the program run continuously without using a while or a for loop? Thank You. 

0 Kudos
Message 1 of 7
(3,022 Views)

Hi govind,

 

when I use a loop, the power will on, off, on, off and go on.

You should not switch on and off your power supply in your loop…

 

When you need more help you should attach your VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,001 Views)

I do not switch it on and off. There is a switch which I turn it on when the program run, but in the machine, I can see the on switch flickering. That is what I want to stop. I want it to work continuously. 

0 Kudos
Message 3 of 7
(2,992 Views)

@govindsankar wrote:

There is a switch which I turn it on when the program run, but in the machine, I can see the on switch flickering. That is what I want to stop.


This should be fixed very easy - seems like some misunderstanding of how LabVIEW works. Just show us the code.

ʍolɟɐʇɐp ʞuıɥʇ
0 Kudos
Message 4 of 7
(2,989 Views)

I have attached the code

0 Kudos
Message 5 of 7
(2,986 Views)
Solution
Accepted by govindsankar

Hi govind,

 

I can see the on switch flickering.

Maybe there is a loose wire forcing that lamp to flicker???

Maybe you are changing some settings (or initializing the device) with each iteration and so forcing the device to switch off/on with each iteration?

 

I repeat: When you need more help you should attach your VI!

 

Edit:

You initialize the Keithley device with each iteration!

Do you need to do so?

Initialize ONCE before the loop, do measure in the loop, and don't forget to close the communication after the loop!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(2,982 Views)

Putting a loop around this example does turn it on and off!  The VI called "Source Output Enable" is what turns the source ON/OFF.  Here's a better example to get you started.  But its not perfect or even great! 

k26xx_set_constant_X_measure_Y.png


An SMU is a complicated instrument.  You can make very good measurements by choosing default values like in the example you used, but you can do far better by learning how to properly set the instrument up to source and measure exactly what you want.  Before you go too far coding, decide if you are sourcing current or voltage.  Now setup up the source properly and the measurement properly.  Do you want autoranging, autozero, compliance limits, range limits, etc..

 

Craig

0 Kudos
Message 7 of 7
(2,945 Views)