Go to Post Gracious Professionalism, it's hard to describe, but I sure know when I'm not living up to it. - rsisk [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 04-02-2009, 07:41
martin417's Avatar
martin417 martin417 is offline
Opinionated old goat
AKA: Martin Wilson
no team
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Buford, GA
Posts: 720
martin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond repute
Question Labview questions, using motor and pot as a servo

Since there is no FORTRAN compiler for the cRIO , I am trying to do some programming in Labview. I have a motor attached to a 10 turn pot, and want to use it like a servo. Has anyone written a sub-vi that will take as input a desired pot reading and move the motor as required to achieve that reading? If so, would you be willing to share it?

Also, I am using a PID vi to track the target with the camera, and would like to set a larger deadband (the turret "hunts" back and forth trying to center the target, and I want it to stop when it's "close enough".) I have played with the PID constants, but can't stop the hunting, and there doesn't seem to be a deadband constant.
__________________
Former Mentor Team 1771
Former mentor Team 4509
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2009, 08:41
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: Labview questions, using motor and pot as a servo

I don't believe a deadband icon shipped. I build a simple one for the servos on the gimbal that you could use or look at. I'd say take a shot at doing the math and building it as your first subVI. You can even drop down a forumla node if that makes you feel more comfy.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2009, 09:47
Jim Wagner Jim Wagner is offline
Registered User
FRC #1676 (Pascack Pi-oneers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Pascack Pi-oneers
Posts: 8
Jim Wagner is an unknown quantity at this point
Send a message via Yahoo to Jim Wagner
Re: Labview questions, using motor and pot as a servo

Hi Martin,

We are implementing this exact control probably within the next few days, we will be happy to share our experience with you. Sounds like you will have a similar control as we have, a pot with a motor. We will also have a 10 turn pot as feedback.

However, you also mentioned in your posting that you had hunting issues while tracking a target with the camara. We experienced this as well and found that the apparent hunting was due to a slow response of our control loop. We are using the target tracking example provided by WPI for Labview. And we found that although the fps of the camera was set to 30 initially, the actual fps was about 3, therefore an undersireable 330ms delay existed in our loop response. When we decreased the image resolution, the fps increased by a factor of 2 to between 6 and 8 fps, this resulted in a more acceptable (not noticable) loop response of about 120ms. We are in the process of determining how we can speed up the camera image processing to avoid this. If you have any info in this area, it would be greatly appreciated.

jim
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2009, 11:09
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: Labview questions, using motor and pot as a servo

How was the 8fps measured? Are there VI panels open? The overhead to update panel data is pretty substantial. Before worrying too much about it, you may want to check the frame rates with panels closed in a more realistic build. There is also a bit of overhead to having the video turned on for the dashboard.

If you continue to have problems with frame rate, please describe any thoughts or questions you have and I'll do what I can to help.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 05-02-2009, 12:26
Jim Wagner Jim Wagner is offline
Registered User
FRC #1676 (Pascack Pi-oneers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Pascack Pi-oneers
Posts: 8
Jim Wagner is an unknown quantity at this point
Send a message via Yahoo to Jim Wagner
Re: Labview questions, using motor and pot as a servo

The fps is calculated in the camera demo example. there is a fps vi in the lower right hand corner of the example. this is where the fps is calculated.

Yes, we also had VI panels opened with video turned on, so I will test without the front panel tonight to see if it is improved, I'm sure it will be.
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2009, 15:14
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: Labview questions, using motor and pot as a servo

I posted somewhere else, but I don't mind saying it again.

I discovered a couple new issues for performance just today.

1. Make sure you have run the setup tools on the camera. If you don't have an FRC/FRC account, the camera will still work, but will not be as efficient, especially on LV.
2. Make sure that your jpeg compression is set to moderate values. Values near zero or near 100 will both cause the camera to lower the frame rate. The camera default is 30. I typically set it to 20.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 05-02-2009, 15:29
Jim Wagner Jim Wagner is offline
Registered User
FRC #1676 (Pascack Pi-oneers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Pascack Pi-oneers
Posts: 8
Jim Wagner is an unknown quantity at this point
Send a message via Yahoo to Jim Wagner
Re: Labview questions, using motor and pot as a servo

Hi Greg,

pardon my ignorance, but I'm not sure what "setup tools on the camera" is referring to, is it something special I need to do? Also, I don't understand what "an FRC/FRC account" is?

Thanks so much.

jim
Reply With Quote
  #8   Spotlight this post!  
Unread 05-02-2009, 16:43
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: Labview questions, using motor and pot as a servo

The bechtop test steps should have had you connect the camera to a computer, change the PC IP to 192... and run a utility to image the camera.

An alternative is to change to a compatible IP, open a web browser to 102.168.0.90, log in to the camera, and use the camera's settings editing pages to add an account or FRC for user and FRC for password.

If you can already log into the camera using FRC, FRC, you are done. This utility is by the way a reasonable way to experiment with settings on the camera, but beware of the side effects such as my coworker who set his compression to zero.

Greg McKaskle
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
Labview servo motor PWM correlation to set VI mbone206 NI LabVIEW 4 30-01-2009 14:58
Tracking Servo motor with drive motor in Labview mbone206 Technical Discussion 5 28-01-2009 17:32
Autonomous questions (Labview) and some general issues Daniel_H NI LabVIEW 15 08-01-2009 21:07
[FTC]: FTC Servo-Motor Problem with Labview dnhansen FIRST Tech Challenge 1 26-10-2008 00:43
Students build SEGWAY in 3 months using Labview and the cRIO neutrino15 Programming 31 27-04-2008 22:08


All times are GMT -5. The time now is 21:12.

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