LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having a real problem getting my vi to work - great difficulty running sequence as desired

Hi
 
I am have a real problem getting my vi to work as required.
 
I would like the my vi (EXAMPLE.vi in the vi library attached) to run continuously.  It should update the graphs on the front pannel and also save data to file when requested using the  save data to file button. (I have written a sub vi. to deal with this data handling and file saving which run in two while loops with the vi as can be seen on inspection of the block diagram)
 
Now, what I would like is for the updating to pause whenever I change any of the settings on the front panel (which are controls in the first half of the sequence of the vi) so the hardware is reset.  As it is at the moment I have to stop the vi to change the front panel settings and then restart it in order for the first part of the sequence to run and re-set the values on the hardware.
 
I guess I need to use some kind of event driven programming an event stucture or something like that. This is quite advanced and I don't know how to implement it. 
 
Can anybody offer any Ideas. 
 
Many many thanks
 
Ashley
 
 
 
0 Kudos
Message 1 of 6
(2,920 Views)
I agree with you that the best method would probably be an event driven style of programming.  I created a template for you on the structure.  Take a look at it and it should work easily for yousince you already have the code pretty well sorted out.

It is for LV 8.0

Kenny
Kenny

0 Kudos
Message 2 of 6
(2,904 Views)
Hi Kenny
 
Thanks for your reply.  A little problem though - not yet upgraded to LabVIEW 8.
 
Incidently is Event-driven programming easier in LabVIEW 8?
 
Many thanks
 
Ashley? 
0 Kudos
Message 3 of 6
(2,900 Views)

Here is the 7.1 Version.

I wouldn't think that it is any easier.  You could check the release notes for 8.0 to see if there was anything that changed for an event structure.

 

Kenny

Kenny

0 Kudos
Message 4 of 6
(2,876 Views)

Thanks Kenny

I will integrate my code into this structure you've outlined when I get a spare moment.

I will let you know how I get on.

Many thanks

Ashley.

0 Kudos
Message 5 of 6
(2,876 Views)

Hi,

If you are new to event structures then you may find the following tutorial useful:

Event-Driven Programming in LabVIEW
http://zone.ni.com/devzone/conceptd.nsf/webmain/E5F8474BDA20C97786256B5A0066968B?opendocument

A powerful New Tool for UI Programming--User Interface Event Programming
http://zone.ni.com/devzone/conceptd.nsf/webmain/2a8ab43b28bbde1086256b830059875c

Advanced Event Handling with LabVIEW 7 Express
http://zone.ni.com/devzone/conceptd.nsf/webmain/aa79ff38336eb38886256d2b004aca49#1

I hope this helps

All the best

Kurt

0 Kudos
Message 6 of 6
(2,856 Views)