Go to Post step it up, stop trying to validate mediocrity - Aren_Hill [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 01-02-2010, 13:45
ssmith2 ssmith2 is offline
Registered User
FRC #1737
 
Join Date: Feb 2010
Location: Excelsior Springs, MO
Posts: 7
ssmith2 is on a distinguished road
Solenoid code not working

Hi. I am hoping you all can help me. I have coded up a real simple solenoid for this year's robot and I did it just like I did last year and it just doesn't seem to work.

Details:
In the begin.vi I have code (see attachments) to open the solenoid and to assign it to the registry. I then get it from the registry in the teleop.vi and set the "value" of it based on joystick button value. When we deploy it and run it, it just does not trip the solenoid nor do any of the lights on the 9472 (the thing that plugs into the cRIO) come on. I have even tried removing the button value and just hard coded a boolean constant of "true" to the solenoid value input of the "solenoid set" but to no avail.

Any thoughts or help?

-Team 1737 programming mentor
Attached Thumbnails
Click image for larger version

Name:	solenoid_begin.JPG
Views:	70
Size:	50.6 KB
ID:	8461  Click image for larger version

Name:	solenoid_teleop.JPG
Views:	53
Size:	47.8 KB
ID:	8462  
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2010, 14:48
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,113
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: Solenoid code not working

The code looks good at first glance. Do the vi front panel indicators work as you expect?

Do you have power to the solenoid breakout?

How are you deploying and running this? Describe your process step by step, and maybe we'll notice something you're leaving out or something you can do more simply.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2010, 16:22
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Solenoid code not working

Aren't Solenoid Channel and Solenoid Module enumerated types?
Using a direct index like you do it seems like one or the other (module/channel) would be 1 off from what it should be.
e.g., an index of 8 might be interpreted as Module 9 if you start index counting at zero.
Attached Thumbnails
Click image for larger version

Name:	SolenoidOpen.jpg
Views:	40
Size:	5.8 KB
ID:	8466  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 01-02-2010 at 16:26.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2010, 16:50
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,113
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: Solenoid code not working

Quote:
Originally Posted by Mark McLeod View Post
Aren't Solenoid Channel and Solenoid Module enumerated types?
Oh, good catch! I'm so used to right-clicking on the input and choosing "create constant" from the popup menu that I didn't even consider that someone might have made a numeric constant and wired it to the input. Check out those little red dots where the constants are wired to the input of the solenoid open. They're telling you that there's a data type mismatch that is being coerced into shape.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2010, 17:09
ssmith2 ssmith2 is offline
Registered User
FRC #1737
 
Join Date: Feb 2010
Location: Excelsior Springs, MO
Posts: 7
ssmith2 is on a distinguished road
Re: Solenoid code not working

Thanks, I will try it out with the enumerated constants. It worked like this last year but since the framework has changed some maybe it won't now. Believe it or not, the module number was 1-based even though the channel was zero based (such that channel 1 was really 0).

I will change it and try it out and let you know. It will probably be tomorrow night before I can get my hands on the physical system to test it though.
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2010, 17:27
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Solenoid code not working

Quote:
Originally Posted by ssmith2 View Post
Believe it or not, the module number was 1-based even though the channel was zero based (such that channel 1 was really 0).
Maybe they fixed that discrepancy
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2010, 10:11
ssmith2 ssmith2 is offline
Registered User
FRC #1737
 
Join Date: Feb 2010
Location: Excelsior Springs, MO
Posts: 7
ssmith2 is on a distinguished road
Re: Solenoid code not working

Believe it or not, they must have fixed that discrepancy. After simply changing from the hard coded numeric constants to the built-in enumerations it works!!!!

Thanks to all for the help.
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
C++ Sample Code not working... hm29168 CAN 5 27-01-2010 20:59
Solenoid Not Working professorX Pneumatics 7 15-02-2009 23:20
Camera Code not Working in Autonomous? Mikesername Programming 6 28-01-2009 10:14
Incrementation Code not working benhulett Programming 6 12-02-2007 17:39
Camera code not working.... DemonYawgmoth Programming 5 11-02-2006 09:21


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

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