Go to Post Past success does not guarantee future results.... - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 13-01-2009, 09:18
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Using the analog sensor .vi's

So after 6 hours of troubleshooting, my programming team and I have finally found out why the analog sensors vi's weren't working in labview. First of all, when the "open" vi asks for a channel and slot input, instead of just putting in 1, 2, etc... we needed to put in "slot one" and "AI 1" for slot one channel one. Secondly, since we didn't have any analog output devices we decided we would just use channel 8 in slot one, which should have given us a modified battery voltage response. The only problem is that it seems that there is a conflict with this situation. I believe that since the DS is also trying to read the battery voltage from this channel, and so there is some sort of a programming conflict and the battery voltage won't show up in labview. I don't know if there is any work around to this problem, I just thought I would let other teams know in case there were in the same situation as ours.
__________________
Relax! It's only ones and zeros!
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2009, 09:32
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using the analog sensor .vi's

The first part of that, using 1 instead of the enum "AI 1" will result in a coercion dot, and will work as long as you know the encoding. This is sometimes useful when casting between enums or when using a loop to get all values. So in other words, this isn't really an error, but when doing constants, it is much more readable to use the specific ones.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2009, 17:38
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Re: Using the analog sensor .vi's

Quote:
Originally Posted by Greg McKaskle View Post
The first part of that, using 1 instead of the enum "AI 1" will result in a coercion dot, and will work as long as you know the encoding. This is sometimes useful when casting between enums or when using a loop to get all values. So in other words, this isn't really an error, but when doing constants, it is much more readable to use the specific ones.

Greg McKaskle
Hm, i'm really interested to know where I could have read about this beforehand.
__________________
Relax! It's only ones and zeros!
Reply With Quote
  #4   Spotlight this post!  
Unread 13-01-2009, 20:47
BLAQmx's Avatar
BLAQmx BLAQmx is offline
Software Engineer
no team (National Instruments)
Team Role: Engineer
 
Join Date: Sep 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 100
BLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of lightBLAQmx is a glorious beacon of light
Re: Using the analog sensor .vi's

When make controls and constants for in LabVIEW (especially for WPILib) it will help you greatly if you right-click on the input terminal and select Create » Constant/Control. This will ensure the constants and controls are the correct data type(s) etc.
__________________
NI FIRST Community: Where to go for LabVIEW, Wind River, cRIO-FRC, and NXT support.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2009, 22:49
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using the analog sensor .vi's

Anytime you are given a subVI that you intend to use, I recommend looking at the front panel. You will usually get a better sense of what the author intended to have wired in. You can then copy/paste, or from the icon create control or constant. The create... is a short cut to opening and copy/paste.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2009, 22:57
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Using the analog sensor .vi's

Quote:
Originally Posted by BLAQmx View Post
When make controls and constants for in LabVIEW (especially for WPILib) it will help you greatly if you right-click on the input terminal and select Create » Constant/Control. This will ensure the constants and controls are the correct data type(s) etc.

I call that action the "easy button" with my team.

I can't beleive there isn't a hotkey for "create constant"
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Analog Inputs as Digital (on the OI) Guy Davidson Control System 16 10-03-2008 17:17
pic: Robostang's Analog Sensor test software Robostang 548 Extra Discussion 11 23-12-2007 09:55
Using gyro.c with other analog sensors no go Astronouth7303 Programming 17 03-01-2006 21:04
Using gyro with other analog sensors...again demerski Programming 0 19-02-2005 08:23
Using and Coding an ultrasonic sensor Jaine Perotti General Forum 14 06-08-2004 14:13


All times are GMT -5. The time now is 22:46.

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