06-15-2012 01:26 AM
Hi everyone,
I am new to LabView and I have a problem that has been on for days now..
I am creating a quiz where each questions will be in a VI itself. The main VI will be calling the subVI into the subpanel when it is called. My problem appears to be at the "results" part of the quiz. I do know the use of "Save to spreadsheet.vi".
I have tried putting the save to spreadsheet.vi in the subvi but it does not save the data until the "stop" button in the subvi is pressed. Clicking the stop button is not a problem. The problem is that once I pressed the stop button, I cannot call out the next question.
I have also tried to put the "save to spreadsheet.vi" at my main vi. But the whole VI does not run at all.
06-15-2012 01:27 PM - edited 06-15-2012 01:29 PM
I think what you need is an event structure. Make a write to file button, then set the event strucutre to write the file when your button is pressed. This will stop the program from stopping.
In the example I attached, I didnt name the buttons (which i should have), but when each button gets pressed, the event structe will happen. Similar to when your write to file button gets pressed.
Good luck.
06-15-2012 03:34 PM - edited 06-15-2012 03:43 PM
One problem is you are using tunnels on the while loop in your sub-vi. You should enable auto-indexing to capture all the data from every iteration; otherwise, you will only see the last data element.
Edit: Perhaps your intentions is to capture on data set? In that case, never mind.
06-15-2012 03:41 PM
How did you create these .png files? Did you create a Vi snippet? I can't load your pics onto the BD. Can you post your code?
06-15-2012 07:59 PM
06-17-2012 08:42 PM
very sorry for the late reply.
the attached is my VI. i did not use a labview tool to take the picture.
Another problem i realise was that when the back button is pressed, the vi is "refreshed" the value that was previously keyed in was gone.
06-17-2012 08:49 PM
ic... thanks for your input... i will try to add the event structure into my "questions" and get back to you (:
06-18-2012 08:35 AM
I suggest down-converting your code to 8.x. You may get more help because more folks will be able to access your VIs.
06-19-2012 04:37 AM
oh... i have solved my problems already... although i think i need some activex thingy to save it to excel...
I inserted another case so as to save into spreadsheet. thanks everyone for helping me (:
06-19-2012 05:02 AM
If you solved your issue please post your solved VIs
I think it will be informative for others also