LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding function after stop while loop

Hi
 
I make a small application that use ActiveX with
1 class  - C1
2 functions - Init , F1  invoke node
1 property - Freq  property node
I also need it to run continuously so I add while loop
its run O.K - but the problem is that when I press the stop
I need to run 1 more function that  close the inititation
( its a must - something to do with the activex dll)
 
How to add it so this close function only work once when I stop the application
 
thanks ,
T.Z
please see picture attached
0 Kudos
Message 1 of 4
(2,644 Views)
The attchment
0 Kudos
Message 2 of 4
(2,640 Views)
You can use an event structure and trace out the 'stop' key press and then do your action (close) and stop the loop.
 
Hope this helps
 
Mathan


Message Edited by mathan on 07-07-2008 04:41 AM
0 Kudos
Message 3 of 4
(2,639 Views)
T.Z.,

your screenshot shows, that you have not sufficient knowledge about VI architectures to solve the issue properly. Therefore, i suggest you to take a look into the architectures delivered with LabVIEW (available using the templatebrowser file >> new).
Another thing is that if you continue to implement LV code like this, you will get unreadable and therefore non debugable code. So please make sure you know about the LabVIEW Style Guide.

I think, in your application, you maybe want to start with a state machine to accumulate knowledge in "how LabVIEW works". Then, maybe you have to switch to more advanced architectures, but this is asumption since the task should define the architecture.....

hope this helps,
Norbert


Message Edited by Norbert B on 07-07-2008 06:32 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,618 Views)