Go to Post Clearly and clearly, the go-to place is Chief Delphi. It connects all the dots. - JaneYoung [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 16-02-2013, 12:24
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Trouble with spike and camera

URGENT
We are a rookie team working on labview for the first time.

We are having trouble with the camera. We managed to get an image from the camera for a few seconds but it is really blurry. After a few seconds, the image just freezes and our camera does not update the image. Is it a problem with our code or our camera?

Also, we are having trouble with the spike. We are using the spike with our pneumatics to activate a piston. I am not sure how to word this but we are using a double solenoid with our spike...
After copying some examples that we found on the internet, we tested it but our spike does not sense any input.

Any help is greatly appreciated.
Attached Thumbnails
Click image for larger version

Name:	Double Solenoid.PNG
Views:	32
Size:	138.8 KB
ID:	14039  Click image for larger version

Name:	camera.PNG
Views:	32
Size:	159.7 KB
ID:	14040  

Last edited by hasin5 : 16-02-2013 at 12:32.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2013, 14:13
TogetherSword8 TogetherSword8 is offline
Registered User
FRC #0888 (Robotiators)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Glenelg High School
Posts: 85
TogetherSword8 is an unknown quantity at this point
Re: Trouble with spike and camera

Ok, sorry, but i dont know camera code very well, but i am an expert with solenoid code (it is very simple)

Your problem is that you need to control the solenoid through a relay (spike) or the pneumatics slot on your crio. there is an entire slot (9472) devoted to pneumatics, with a blue connector on top that on the side is labeled relay. Ill find a picture after i post this to help you out.

If you control it through a spike, then you are going to have to use relay in your code.

If you control it through solenoid (which is the 9472 slot) then it is your code, except you choose pneumatics board 1 in the other blue slot in the beginning. and your double solenoid needs to have a case structure. Ill make a code for you and post in here once i am done. It is a simple code, probably will take you 10 minutes since you already know where the solenoids are located.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2013, 14:38
TogetherSword8 TogetherSword8 is offline
Registered User
FRC #0888 (Robotiators)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Glenelg High School
Posts: 85
TogetherSword8 is an unknown quantity at this point
Re: Trouble with spike and camera

Here is the coding if you are using the 9472.

The slot third from the left is the 9472 with the connector in it. plug in the two pins into the top part, and your 12 volts (assuming you use 12 volt solenoids, if it is 24, connect the relay part of the solenoid slot to 24) and then the code should work.

If you cant get it to work, post a picture of your wiring and i will tell you what you did wrong.
Attached Thumbnails
Click image for larger version

Name:	Solenoid begin.jpg
Views:	26
Size:	14.1 KB
ID:	14042  Click image for larger version

Name:	Solenoid case 0.jpg
Views:	25
Size:	68.0 KB
ID:	14043  Click image for larger version

Name:	Solenoid case 1.jpg
Views:	22
Size:	62.4 KB
ID:	14044  Click image for larger version

Name:	Solenoid case 2.jpg
Views:	16
Size:	64.9 KB
ID:	14045  Click image for larger version

Name:	Solenoid case 3.jpg
Views:	13
Size:	64.6 KB
ID:	14046  

Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2013, 14:40
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: Trouble with spike and camera

The Spike can only be used to control 12v solenoids.
The Solenoid Breakout can be used for either 12v or 24v solenoids, but you have to choose one voltage. It can't do both voltages at the same time.

The more typical Kit solenoid, like the double Festo, is a 24v solenoid.

Make sure which type you have.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2013, 17:25
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: Trouble with spike and camera

For the camera, you don't mention what kind, but the 206 and M1013 have a black bezel on the front that rotates to focus it. You may try adjusting the size and framerate to lower the network usage.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 19-02-2013, 00:00
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Re: Trouble with spike and camera

we have an M1013 Camera but it doesnt have a rotational focus on the front.
Reply With Quote
  #7   Spotlight this post!  
Unread 19-02-2013, 04:54
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: Trouble with spike and camera

I don't have access to that camera, but page four of the manual calls the black ring the focus ring and states that it is a manual focus lens. It also says that it is preset and you don't need to adjust it unless the image is blurry.

If you post an image taken with the camera, I can give my opinion as to what is causing the blur.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 19-02-2013, 11:29
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Re: Trouble with spike and camera

we're not using the 9472 port so we need to set up a relay.... can you help out with that?
Reply With Quote
  #9   Spotlight this post!  
Unread 19-02-2013, 13:25
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: Trouble with spike and camera

Quote:
Originally Posted by hasin5 View Post
we're not using the 9472 port so we need to set up a relay.... can you help out with that?
There's a built-in LabVIEW example to tell you everything you need to know.

When you launch LabVIEW you should see the "FRC 2013 Getting Started" window. On the left side of that window are a number of tabs. Select the "Support" tab. One of the options is "Find FRC Examples..." Click it, and the example finder will open.

You want the Relay.lvproj example. It's in the "Actuators" subfolder under the "FRC Robotics" folder.
Reply With Quote
  #10   Spotlight this post!  
Unread 19-02-2013, 15:20
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Re: Trouble with spike and camera

Hey, thanks for the great advice. We managed to access the relay file but we don't understand what the "visible" means... can you please elaborate on this?
Reply With Quote
  #11   Spotlight this post!  
Unread 19-02-2013, 15:35
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: Trouble with spike and camera

Quote:
Originally Posted by hasin5 View Post
...we don't understand what the "visible" means...
I'm sorry, I don't know what you are referring to.
Reply With Quote
  #12   Spotlight this post!  
Unread 19-02-2013, 15:37
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Re: Trouble with spike and camera

In the relay example, with in the case structure, there are two blocks that say visible.... What are those? And if you don't see that... Then what in general is in that case structure? -Its called the property node
Reply With Quote
  #13   Spotlight this post!  
Unread 19-02-2013, 15:47
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: Trouble with spike and camera

That case structure is only providing visual feedback on the example's front panel. It plays games with the LED indicator on the picture of the Spike so it can have more than two states. Don't worry about it, and certainly don't copy it to your code.

All you need are the Relay Open and a RefNum Set in Begin.vi, and a RefNum Get and a Relay Set in Teleop.vi (or wherever you need to set the state of the relay).
Reply With Quote
  #14   Spotlight this post!  
Unread 19-02-2013, 16:20
hasin5 hasin5 is offline
Registered User
None #4777
 
Join Date: Jan 2013
Location: Canada
Posts: 20
hasin5 is an unknown quantity at this point
Re: Trouble with spike and camera

Quote:
Originally Posted by Alan Anderson View Post
That case structure is only providing visual feedback on the example's front panel. It plays games with the LED indicator on the picture of the Spike so it can have more than two states. Don't worry about it, and certainly don't copy it to your code.

All you need are the Relay Open and a RefNum Set in Begin.vi, and a RefNum Get and a Relay Set in Teleop.vi (or wherever you need to set the state of the relay).
We would like to be able to set the spike so that it goes forward when we click a button and then it reverses when we release the button. How would we go about programming this?
Reply With Quote
  #15   Spotlight this post!  
Unread 19-02-2013, 16:23
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: Trouble with spike and camera

Here's one way, ignore the name given to it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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 22:53.

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