11-01-2017 01:38 PM
Hello, I'm new to VI. I'm trying to graph the blinking of an LED. For example, when the LED is on it'll have a max amplitude ( 1 for simplicity), when off, it'll go back to zero.The user is able to control the blink rate. I'm having trouble making the connection from controlling the LED to visualizing it on a graph.
Solved! Go to Solution.
11-01-2017
01:41 PM
- last edited on
10-05-2024
03:35 PM
by
Content Cleaner
boolean to 0,1 and wire the output to a chart indicator.
11-01-2017 01:49 PM - edited 11-01-2017 01:56 PM
Well I got something using that, but the graph is displaying incredibly fast. I cannot get a smooth graph.
11-01-2017 02:29 PM
What value are you using for the loop's wait? You probably want something in the 100 to 500ms range.
11-01-2017
02:40 PM
- last edited on
10-05-2024
03:36 PM
by
Content Cleaner
With that code you will only get 1 data point per cycle. You likely want to have it display some "time" on the graph so it looks like a square signal instead of a Dirac delta function.
Look into the Elapsed Time Express VI. Then you can set your loop delay to something constant (1ms or so), wire your knob into the target time, and only toggle your Boolean when it sees time has elapsed.
Edit: Something like this
11-01-2017 02:55 PM - edited 11-01-2017 02:57 PM
You can use two separate loops. One to display the waveform (consistent time-base/update) that operates with the lowest wait time desired and the other for the knob selector that controls the added delay for the frequency of change. The display should look like a slinky oscillating when you move the knob up then down again.