06-07-2011 01:14 AM
i want to display the signals from my sensorDAQ in a graph.but i have more than one event in the event structure to acquire the signal and display it in the graph.the first event is to acquire the threshold signals and its displayed in the graph as a feedback.after the first event is executed, i will call the second event,where the further signals are acuired and compared with the threshold signals from the event 1.my question is how can i use the same front panel control in more than two events in the event structure?please answer me i'm stuck.
Solved! Go to Solution.
06-07-2011 01:22 AM - edited 06-07-2011 01:24 AM
Hi,
If the number of events are not too many, then you may use a local variable of the graph in the other events and pass the value to the graph. Right click the graph indicator on the block diagram and created local variable.
Also you can use a shift regsiter for this purpose. If you can attach your code, then i can explain it better.
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a solution if your problem is Solved;))
06-07-2011 01:31 AM - edited 06-07-2011 01:36 AM
Hi,
I have attached here an example of doing the same using shift registers and local variables. Take a look. Shift register is always a better option than local variables.;)
Regards,
Nitzz
(Give kudos to good answers, Mark it as a solution if your problem is Solved;))
06-07-2011 01:42 AM
06-07-2011 07:31 AM
It might be better to put the DAQ outside the event structure in a parallel loop rather than duplicating code in several event cases. Look at the Producer/Consumer Design PAtterns.
Lynn
06-09-2011 12:37 AM
thank you all for your valuable support, i was able to solve the problem 🙂