I am putting together a Labview application that sends a value to a USB device and then
waits for data returned from the device. I have a knob which is selected for one of four
positions (0-3) and each position specifies a test to be performed by the USB device.
The test is then initialized by the user pressing the test button but the problem that I am having is
displaying the data from the device and using the same fields for each case...
I would like for this to loop and wait for the user to press the Test button or exit upon user selection of the quit button.
Attached is a copy of my vi...
Can someone explain how I can display all of the data on my panel regardless of the case selected?
Solved! Go to Solution.
I do understand that you are talking about test status from each cases, correct ?
If yes, you can shift register on while look for test status, it will update every time whatever case user will select.
Thanks for the tip on the shift registers...
One thing that still puzzles me is how to keep certain items displayed.
I have a test status indicator that gets over-written when a CRLF is sent to it and the
user ID and serial number fields disply data entered but are then blanked out while the
test status gets over written.
The connected USB device that I am monitoring with this code is spewing several lines of data with
CRLFs and the test status gets over written with every new line that comes across the
How can I get all of the data to be displayed in the test status indicator along with CRLFs
so that the is readable by the user and keep the user ID & serial number displated until another one is requested?
I am guessing that this has to do with where and how I am successusing the shift registers and have tried a couple different variations without any success...
Any additional info on this would be helpful
attached is my updated code
You can use feebback node for keeping test status string updated. code attached.
I think you should use 'State Machine Architectire' for your applcaiton , which will make your applcation much simply. see link.
Thanks for the example, unfortunately I can't open it as it was created in v9 and
I only have v8.2...
I plan to upgrade to the latest as soon as the company will approve it but this might not be until
june or july.
Is there a way to show what you are doing differently in v 8.2 so that i can look at it?
I have saved for LV 8.2.
Thanks again for your help with this...
I tried the vi that you posted but had some problems with it.
I have attached a screen shot of the
vi where there is what looks like a feedback loop with the text:
"Missing object, The object "Feedback Node" does not exist in previous version."
Do I need to just connect this with a wire?
It means Feedback node doesnt exists in LV 8.2, lets disconnect it now.
The vi that you posted is giving me different results and I am trying to determine what has changed...
It appears that if the test button is pressed then the code requests the employee ID and the serial number, displays thes
in the employee # and serial number fields on the front panel and then goes into a timeout mode...
My original vi had the following cases:
default - prompts user for employee ID & serial number. Also opens serial port & sends "1" to the device on the serial port and waits for response. Post all response to test status.
opens serial port and writes "2" to the device on the serial port and waits for response. Post all response to test status.
opens serial port and writes "3" to the device on the serial port and waits for response. Post all response to test status.
opens serial port and writes "4" to the device on the serial port and waits for response. Post all response to test status.
The vi that you posted appears to do the following:
state 0 = timeout - closes serial port?
state 1 = "test 2": value change - prompts user for employee ID & serial number
state 3 =  "knob" : Value Change- writes "1" to serial port
Upon execution of the vi that you posted with the knob set to Run all tests:
The code loops in timeout state until the test button is pressed. Once pressed, this changes the state to  "test 2" value change which prompts for the serial number and user number. Once these two are entered and the OK button is pressed, the employee ID and serial number fields on the front panel are loaded with these numbers. The code then drops back into the state 0 timeout mode.
Switching to another knob setting ultimately ends up with values being overwritten and errors occuring...
Not sure what I am doing wrong at this point...
- I have added 'Event Structure' in your VI for controls 'Test' & 'Knob'.
- If user will press 'Test', prompt for user name & Unit id.
- I have changed data type of knob from DBL to Interger, so you ll get 0,1,2,3 not floating points values and configured Knob as 'Mouse Up' so user can easliy switch from 3 to 1 (1 steps ahead).
I assume that is all you need and fulfilling your requirement.