We are trying to use the Analog Pressure sensor to display the pressure of the pneumatic system of the robot during the match. We are using LabVIEW robot code, and the sensor is plugged into the Analog Ports on the roboRIO. We used the AI Open.vi and the AI Get Value.VI in LabVIEW to retrieve the data. However, it is returning values between 398-402. How do we fix this issue and get the correct value from the sensor?
If you’re using the REV Robotics Analog Pressure Sensor, their datasheet has an equation to convert the voltage measured by the analog channel to the pressure measured by the sensor.
I don’t have access to an FRC version of LabVIEW today, but I made a quick subVI that calculates the pressure from a given voltage (The VI is just the equation in the datasheet).
You should be able to use the AI Open.vi in begin to name the reference, then use the AI Get Raw Voltage.vi in teleop (or autonomous) and wire that value right to the subVI to get the pressure.
I used the Get Voltage.Vi and plugged the output into the Volts to PSI.vi, and printed that value, but now I am getting values between -.5 and -.3… Is there anything that I could be doing wrong? The yellow wire on the sensor is plugged into the Signal port on the roboRIO’s Analog 0 port.