PDP Voltage Feedback VI

I was wondering if it would be possible to make a VI that would take the voltage or power in general and convert it into a graph in LabVIEW. I’m not entirely sure if it is, but our team’s mentor suggested that we should try. Any response would be appreciated in advance!

There’s really two parts to your question:
Getting voltage or power from the PDP
Graphing a value

Which one are you struggling with?

Graphing a value

This is what I tried to do at first:

LabVIEW%20Snip%201

Also, would this VI be done in a LabVIEW project or Blank VI?

What you’re doing here is getting the value once when the program first runs, then updating the graph with that same value every time. You need to put the PDP Voltage VI inside the while loop so it gets the value again every time the loop runs.

And you’ll want to put this in an FRC code project so that it has all the right settings to run on the roboRIO.

Would I have to put anything in Begin.VI and Finish.VI? Or just in Periodic tasks?

What AriMB +

  1. You have the delay set to 100 ms which is 0.1 seconds not 1 second.
  2. If this code is in the TeleOp VI, you need to remove the delay and the while loop because the TeleOp VI is in a while loop already and is called every 20 ms (assuming you’re not dropping DS packets).
  3. Normally I would look at current, not necessarily voltage. There is a Get PDP Current VI. I don’t believe you need the math. If you want to look at Power in Watts then you would simply multiply Volts times Amps for the same PDP channel and graph that.
  4. It looks like your PDP numeric control is wired to select which PDP you’re reading from rather than which channel on a single PDP. Delete the control you have and create a control on the next input terminal down.
  5. You are currently using a “Waveform Chart” not a “Waveform Graph” there is technically a difference.
  6. If you want to chart multiple traces you just have to use a “Bundle” function.
  7. Just a tip: If you don’t want the scale on the graph to move all around on you while this VI runs, stop the VI, right click the chart on the front panel and deselect Y Scale -> AutoScale Y then you can set the scale just by replacing the scale numbers.

To use motors and other things, yes. But for the PDP itself, no.

Thanks, let me try this real quick

Thanks for all of your help! I think I’ll ask our mentor for more info now.

1 Like