Go to Post Too many hours of robotics and too little sleep causes me to forget things.... - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-04-2016, 08:34
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Exclamation Analog Pressure Sensor Labview Programming

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?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-04-2016, 08:47
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Analog Pressure Sensor Labview Programming

Can you post a link to which sensor you are using? Also, are you sure the analog sensor is wired up correctly?
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-04-2016, 09:20
Pi Fighter's Avatar
Pi Fighter Pi Fighter is offline
Insert Monty Python Reference Here
AKA: Trevor
FRC #1718 (Fighting Pi)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2008
Location: Armada, MI
Posts: 34
Pi Fighter has a spectacular aura aboutPi Fighter has a spectacular aura about
Re: Analog Pressure Sensor Labview Programming

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.

Datasheet: http://www.revrobotics.com/wp-content/uploads/2015/11/REV-11-1107-DS-00.pdf

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.

Hope this helps!
Attached Files
File Type: vi Volts to PSI (subVI).vi (10.5 KB, 17 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 03-04-2016, 07:34
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Re: Analog Pressure Sensor Labview Programming

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.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-04-2016, 10:21
Landonh12's Avatar
Landonh12 Landonh12 is offline
270 points
AKA: Landon Haugh
FRC #0364 (Team Fusion)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Gulfport, MS
Posts: 211
Landonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud of
Re: Analog Pressure Sensor Labview Programming

Quote:
Originally Posted by s5511 View Post
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.
What are the three colors of the wire? It could be possible that the wire is flipped the wrong way in the RoboRIO.
__________________
Team Fusion 364 - Driver/Programmer 2012-2015; Controls Mentor 2016-Present
Reply With Quote
  #6   Spotlight this post!  
Unread 04-04-2016, 09:54
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Analog Pressure Sensor Labview Programming

Quote:
Originally Posted by s5511 View Post
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.
You're getting negative voltages? That doesn't seem right. There is no way you should be getting negative voltages from the RoboRIO.

Here is a link to the VI that we're using to convert the voltage to a pressure.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 04-04-2016 at 09:58.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi