LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have to press on the graph cursors to save values form it, why?

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 8
(2,665 Views)

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.

Message 2 of 8
(2,634 Views)

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.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 3 of 8
(2,606 Views)

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

 

 

0 Kudos
Message 4 of 8
(2,595 Views)

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

Message 5 of 8
(2,588 Views)

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

 

0 Kudos
Message 6 of 8
(2,581 Views)
Solution
Accepted by topic author maurlind

I modified your code to show you what I meant 🙂

 

Regards

CaravagGIO

 

 

Message 7 of 8
(2,573 Views)

Thanks it works , offcourse it does 🙂

 

Really appreciated your time and effort!

 

Best Regards Maurlind

 

 

0 Kudos
Message 8 of 8
(2,566 Views)