LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stuck in loop while adding to graph chart

Hi.

I am trying to measure with Keithley 2636A sourcemeter continuesly resistence.

I build a VI which calls the Keithley's VI to measure a single sample and make a loop on it.

The issue is that after I push measure, the loop starts and send the samples to graph while I cannot exit this state (stuck in the loop).

Any suggestions?

 

Thanks.

 

 

0 Kudos
Message 1 of 10
(3,312 Views)

Hi!

 

You have false constant connected to both your while loops. They will never stop. You have to connect a stop button to them. The best would be to create an event for the stop button. You should remove the other while loop with all the property nodes. If you need to run this before the main loop, you should use a sequence structure and the dataflow of the error wire to be sure that it runs before the mainloop. And you only need to run it once. Not in parallell with the main loop. You should also put the controls inside the main loop. Otherwhise you'll not be able to change them. You should create a sub-vi and cluster all the controls. Call the sub-vi whenever you need to change values. Like a settings pop-up. The whole code could be minimized alot. I would love to help you, but I don't have event structure in my LV license. 

 

But I can give you an example with the pop-up settings atleastSmiley Happy 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 2 of 10
(3,299 Views)

I addition please read this document carefully.

 

thanks,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 10
(3,291 Views)

Hi again!

 

I created a small example for you and converted it to LV2009. It shows just a small concept of the settings pop-up and how to use panel splitters to create a nice userinterface.

The program itself does not do much. It allows you to change settings and update the values and chart. As mentioned I don't have event structure in my LV. Please notice that all the property nodes in the blockdiagram is not a good solution, but I'm running out of time todaySmiley Very Happy The property nodes disables/enables the controls so that the user don't get stuck in any loops if he pushes the wrong button.

 

Frontpanel.PNG

 

Blockdiagram.PNG

 

The files is in the zipped folder belowSmiley Happy

If you want to know how to create good looking user interfaces, please check out the UI group! 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 10
(3,279 Views)

A state machine would better suit this. I don't like the idea of using nested while loops. Makes debugging and future scalability much more difficult.

0 Kudos
Message 5 of 10
(3,261 Views)

Guys,

I didn't have time to get deep to your replays but the fast responce was amazing.

 

I was impressed with this community and you personnaly !

 

Have a good day.

I will responce as quickly as I check your options.

 

Thanks.

Sagi

 

0 Kudos
Message 6 of 10
(3,254 Views)

BTW:

The Keithley VI "Configure and measure" doing a sequence for measuring one sample.

Is there an option to get continuesly measurement without the loop outside the VI ?

 

Thanks.

Sagi

0 Kudos
Message 7 of 10
(3,247 Views)

More to the implementation way.......

I used Even Deejay for my platform but I get only sample per second.

Is there a way to increase the samples per sec.?

 

Thanks.

 

Download All
0 Kudos
Message 8 of 10
(3,230 Views)

Hi!

 

You could remove the timing of the while loop. There is a wait function there with a 200 value connected. Since your are using another VI in side the while loop, the delay of the while loop is decided by the delay of the sub-Vi. You have not attached the keithley sub-VI so I can't check, but I believe there is a wait function inside it. 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 9 of 10
(3,183 Views)

Attached,

config and measure for the Keithley 26xx and basic VIs it uses.

Download All
0 Kudos
Message 10 of 10
(3,175 Views)