LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would you approach this?

Hello All,
 
I am writing a simple GUI that will allow me to choose a file and then transmit that file to a device.  Attached what my GUI (front panel) will look like.  This is my approach:
 
-Two 'while loops'
-One loop (event loop) contains an event structure to handle button presses as well as window close (I want to release a semaphore before the program terminates).
-The other loop (main loop) takes care of communication with the device.
-The event loop uses a notifier to relay start/stop commands to the main loop
-The main loop triggers an event signaling that it has completed transmitting
-*When one button is pressed, it is disabled and greyed until that action can be performed again*
(ex. 'Download' is diabled until 'Cancel' is pressed or transmission completes)
 
Does anyone see where this VI could get 'stuck' (in a state that it can't recover from)?  Does anyone have another approach that may be simpler yet do the same?
 
Thanks!!
Jorge
0 Kudos
Message 1 of 5
(2,883 Views)

woops, here:

 

0 Kudos
Message 2 of 5
(2,882 Views)
Using a notifier might be problematic, I only use those to interchange static values (write once, read many).
You could get stuck if you don't have a time-out on the hardware interfacing values.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 5
(2,873 Views)

You can edit your message for up to 10 minutes after you posted it.Smiley Wink

Questions I have would be what is the purpose of the semaphore you are talking about?  Where is the other end, or what are you trying to block from executing?

What is the the other end you are communicating with?  Another LabVIEW program, a piece of hardware, ...?

Your program could get hung up if that communication process breaks down without any kind of error thrown.  But if you do your programming properly, then your Cancel button should be effective to get your program back to its original state.

It seems like you have a good thought process going to start this project.  Remember to catch any errors and handle them.  It seems that your main loop should be a state machine architecture.

0 Kudos
Message 4 of 5
(2,873 Views)


Questions I have would be what is the purpose of the semaphore you are talking about?  Where is the other end, or what are you trying to block from executing?

What is the the other end you are communicating with?  Another LabVIEW program, a piece of hardware, ...?



I am communicating with hardware via RS232.  This program is passed a VISA reference and a semaphore for that reference (there are other VIs running using the same device).
 
What I am really not sure about is the communication between the main loop and the 'event loop'.  I will take care of any errors that happen during communication (the string indicators at the bottom are for reporting current transmission stats and any errors).
 
0 Kudos
Message 5 of 5
(2,867 Views)