06-06-2017 07:44 PM
Hi everyone!
Is it possible to use the event structure to simulate/change different waveforms?
I've attached my VI.. when I push the button, the waveform changes, but it's locked.. I've already unchecked the "Lock Panel" option in the "Edit Events Handled by this Case" window, but it's still not working.
Help?
Thanks!
Solved! Go to Solution.
06-06-2017 09:34 PM
The front panel isn't locked, it's just waiting for for an event. Because you don't have a timeout case configured in the event structure, it's going to block execution until you trigger another event.
06-08-2017 01:36 AM
I just tried adding an "Event Timeout" case, but the waveforms are still locked... I'm guessing I'm understanding you incorrectly.. (Sorry, I'm sort of new to LabVIEW)..
06-08-2017 03:04 AM - edited 06-08-2017 03:08 AM
Do you mean you want the waveform to move in time? If so, you're going to have a much easier time if you ditch the Express VI and use the "Basic Function Generator" function in the Waveform Generation palette.
One way to do what I think you want is as follows:
I'm posting an image, rather than a snippet or VI, to allow you to recreate it yourself. This is unnecessarily difficult of me, since I already have a working VI, but I guess you don't mind since this is a learning opportunity 😉
06-08-2017 07:14 AM
Hi cbutcher!
I guess it would've been helpful to explain what exactly I was trying to accomplish in my original post.. 🙂
You know how a function generator has buttons to select which waveform a user wants to see (like the photo attached)? I'm trying to re-create something like that in LV.. where, I have a signal going, and if the user wants to switch from a sine wave to a square wave or sawtooth wave, they're able to do by pushing a corresponding button. In the VI that I attached, I'm able to switch the waveforms by clicking on a button, but the waveform isn't moving.. sort of like it's triggered, and I'm trying to un-trigger it.
I hope I explained that well.. does that make sense?
06-08-2017 07:37 AM
like this?
note, that this will only act on value change
(drag and drop on block diagram)
06-08-2017 07:44 AM
for continuuous updating you should put the waveform generation inside the timeout case and read from the enum-control.
i guess you wouldnt even need a event-structure for that
06-08-2017 07:57 AM
the standing wave comes from the how waveforms work (initial timestamp, delta t, and values)
and also, that you will generate same amount of samples which will then be displayed in the waveform graph (which doesn't keep a history).
try to replace the graph with a chart
06-08-2017 08:38 AM
06-08-2017 08:41 AM
@cbutcher .. think you need to backsave to 2016