12-03-2019 05:55 PM
Me and a group are trying to code a system that can output a voltage between 0-5V using the LabVIEW interface, and then read and display the voltages at various points in a circuit graphically. The graphs were originally working fine when a constant 5V DC voltage was applied. However, in order to provide voltages to the circuit that are between 0 and 5V, we started using an Arduino PWM pin with a smoothing capacitor to translate the voltages to DC again. Unfortunately, when I use a PWM input, the graphs start retrieving data much faster than before (too fast to see). Workarounds I have attempted:
1. I thought maybe the system began updating the loop at the frequency that the PWM pin was operating (976 Hz for the PWM pin I was using), so I tried implementing a for loop that would only graph the last value every 976 passes. Did not help.
2. I thought maybe this was an issue with the Arduino board, but I had similar issues when using a Redboard instead.
Any help would be appreciated. I am pretty new to this, so I apologize for any obvious incompetence.
Here is a picture of my graphs being mean (Notice the time axis):
12-04-2019 01:21 AM
You don't have any graphs, these are charts. Quite different.
In order to have loops run at a desired rate (and no as fast as the hardware allows), one would place a small wait inside the loop. Have you tried that?