Go to Post Search is amazing. Give it a try. It's 10,000 lines of code that gets lonely if it's not played with often. - Brandon Martus [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 07-02-2011, 15:54
captainking's Avatar
captainking captainking is offline
Level 85 Programmer
FRC #0168 (MIB)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: North Miami Beach
Posts: 41
captainking is an unknown quantity at this point
Light Sensor Problems

So we wired up our photosensors (Brown and Blue to + and -, white signal on pwm, and black unused), they turn on and the lights change on them when the light source changes, I plugged them into the same DIO ports I assigned them in LabVIEW, yet they all return false no matter what.

I've provided my code just in case it's that, but any help would be appreciated.
Attached Thumbnails
Click image for larger version

Name:	light tracker begin.JPG
Views:	35
Size:	20.7 KB
ID:	10016  Click image for larger version

Name:	light tracker teleop.JPG
Views:	19
Size:	22.2 KB
ID:	10017  
__________________
Integrity first
Service before self
Excellence in all we do
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2011, 16:32
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Light Sensor Problems

Your code has two problems.

The name you assign to the refnum is case-sensitive. You have lowercase "light" where you get the refnum, but you used uppercase "Light" when you set it. Fix them to match exactly.

The other problem is something I can't pin down exactly right now, as I don't have access to LabVIEW. Notice those little red dots on your DIO Open? They're telling you that what you have connected to the function doesn't match the kind of thing it's expecting. It's possible that you accidentally wired up the DIO number constant to the module number input.
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 09:14.

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