08-06-2014 04:23 AM
I want to save diffrent values from a graph into excel.
My program takes a signal and then I can adjust the intervall that I want to look at and then adjust that with two cursors.
This I have succede with, the problem is that when I'm trying to save it, I first have to press the save button, then press one of the cursors to get the popup window so that I can select the right location to save. To continue to save different values i have to repeat the procedure.
I would like to just run my program and then adjust my cursor to the intervall that I like, and then press the save button to store the values in a excel document then continue to select different valuse and hit the save button to store more vaules and so on.
Is there somthing in my code that force me to press on the cursors before it can save the vaules?
Best regards Maurlind
Solved! Go to Solution.
08-06-2014 07:59 AM
Hi Maurlind,
the code in your event structure will run only when one of stop buttons value change or when cursor is released . If you press SaveData button no event happens (from event structure point of view) and nothing happens. If you add SaveButton value change into event structure case it will work.
08-07-2014 01:43 AM
Hi Maurlind.
As Caravag says, you need to add the Save button to your event structure.
Another advise is to split up some of your code in your event structure, meaning that you have different event cases for different buttons. This will make your code more readable, and keep each state quickly to execute.
08-07-2014 03:31 AM
Hi Again!
I added the Save button to the event structure case but it didn't work. I don't have a full understadning of event structure But im guessing i need som code in vaule change event. I have tried to wire the save button in and out but dosen't seem to work. I also made a whole new event structure inside the current and wierd the save button and write to measurement file then it worked, but then the stoped program button didn't.
I have attached the new code.
And also thank you for the quick reply on the post before!
Best Regards Maurlind
08-07-2014 03:44 AM
Hi maurlind,
you should add SaveButton value change event to the case with the code not to new case with no code. For more information about Event Structures read LabView help http://www.ni.com/white-paper/3331/en/ or look at some video tutorials https://www.youtube.com/watch?v=8eO64fo3Pho
Regards,
CaravagGIO
08-07-2014 04:38 AM
I tried that, then it sort of works, but the rest of the program doesn't. My live update of the adjusted signal graph only appears after i press the Save button. Before i could manually set an interval and see the adjusted graph. And now the Stop Program button doesn't respond. But the save button work directly. Which is good.
I have replaced my DAQ assist with a simulated signal so you can test the program.
It would be most kind if you could help me with this, tutorials works for the basic understanding of certain things but not always easy to implement in your own work.
Best Regards Maurlind
08-07-2014 04:57 AM
I modified your code to show you what I meant 🙂
Regards
CaravagGIO
08-07-2014 05:38 AM
Thanks it works , offcourse it does 🙂
Really appreciated your time and effort!
Best Regards Maurlind