LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call external application for electrode impedance measurements

Hello everyone

I got stuck with that problem for weeks and I hope somebody will help here.
I'm using Labview (8.2) to call an application named ZPlot.
The node "StartSweep"  starts the application and it runs just one time (I mean one sweep of about 61 points) and the measurement data are saved one file.

What I'm trying to achieve is:  the user should be able to set (from Front Panel) how many sweeps the application have to do. I've tried to use the node "GetPointsRemaining" (it returns "0" after one sweep is finished) to restart the application but it's not working. What can I do so that the application runs as many sweeps as set (from the Front Panel) by the user ?
 
I attached the VI that call the application and I would be very greatful if somebody can help me solve that problem
 
Best regards
Kabanga 
0 Kudos
Message 1 of 11
(3,383 Views)

Hi Kabanga,

if the function "GetPointsRemaining" returns 0 then it is ok that the while loop ends. Because 0=0 -> true, not true = false -> and your loop condition is set to run if true.

Mike

0 Kudos
Message 2 of 11
(3,377 Views)

Hi Mike,

thanks for your answer.
Your are right: the while loop ends when one sweep is finished (means, 61 points has been measured).

Now how to restart it again so that it does another sweep automatically? 

So what I want to do is:

1)- Start Labview
2)-Set the number of sweeps 
3)-Call the external application
4)-Do all sweeps
5)-After all sweeps is finished,stop the measurements

Thanks for your help
Kabanga




 I set  the number of sweeps on the Front Panel

 

0 Kudos
Message 3 of 11
(3,374 Views)

Hi Kabanga,

do you want something like this? See the attachment with the additional while loop.

Mike

0 Kudos
Message 4 of 11
(3,370 Views)

Hi Mike,

thank you very much. It's exactly what I want !!!

I tried to put a Case Stucture, so that the application starts when the user hit a button on the Front Panel, but it's not working.
Any other idea how I can start the application by hitting a button on the Front Panel?

Best regards
Kabanga

0 Kudos
Message 5 of 11
(3,362 Views)

Hi Kabanga,

you could use an Event Structure for that.

Mike

0 Kudos
Message 6 of 11
(3,360 Views)

Hi Mike

I used an event structure but it's just calling my application once and  I'm having problem  to stop LV by hitting "stop"
What should I change in my code so that my external application is called as many times as the user set it?

Best regards
Kabanga

0 Kudos
Message 7 of 11
(3,342 Views)

Hi Kabanga,

can you attache your vi?

Mike

0 Kudos
Message 8 of 11
(3,340 Views)

Hi Mike

here are my VI and a demo version of the application I'm calling using LV.
I cleaned up the VI so that you find it user friendly....there is still a lot to do, but I'm trying first to make it run before care about user interface

Best regards
Kabanga

0 Kudos
Message 9 of 11
(3,338 Views)

Hi Kabanga,

create an Event for the Stop Button. It helps.

Mike

0 Kudos
Message 10 of 11
(3,334 Views)