LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Slow Graphs in LabVIEW with Arduino/Redboard PWM

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):

 

Smurphinator_0-1575417288121.png

0 Kudos
Message 1 of 2
(2,109 Views)

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?

0 Kudos
Message 2 of 2
(2,063 Views)