Go to Post ... boundless mentory goodness ... - pfreivald [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 15-02-2016, 20:44
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Help program.

How do you program the POV on the Logitech joystick to move one motor using lab view?
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2016, 21:24
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
Re: Help program.

On your joystick block, there should be an output for "POVs" which returns an array of integers. Index the first element of that array, and it'll give you the angle that the POV is being pressed. If nothing is being pressed, the value is -1.

Up is 0
Right is 90
Down is 180
Left is either -90 or 270; I don't remember
__________________
Head Programmer / Driver
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2016, 17:45
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

How do you get to the joystick block?
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2016, 22:45
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,844
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: Help program.

It's one of the outputs available on the regular Joystick Get Values.
The same vi you use to get the axis and buttons in Teleop.vi.
Attached Thumbnails
Click image for larger version

Name:	POV.jpg
Views:	43
Size:	20.2 KB
ID:	20092  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2016, 20:19
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

How do you program the POV to move a motor up and down? sorry we don't have much experience with lab view.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2016, 21:45
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,844
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: Help program.

I don't have a joystick with a HAT in the shop I'm in right now, so I won't be able to test this until tomorrow at the earliest, but this is the idea.
Attached Thumbnails
Click image for larger version

Name:	POV-LV-sample.png
Views:	32
Size:	23.6 KB
ID:	20100  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-02-2016 at 21:55.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-02-2016, 21:00
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

What is the box at the bottom of the diagram labeled POV and how do you add it?

Last edited by ICE_Bear : 18-02-2016 at 21:06.
Reply With Quote
  #8   Spotlight this post!  
Unread 18-02-2016, 21:24
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,844
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: Help program.

That's not actually necessary.

It is called an indicator and just gives us a display on the front panel of the live values of POV when you run the code in Debug.

You get it by right-clicking on the wire or output node on the vi and choosing Create->Indicator
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #9   Spotlight this post!  
Unread 19-02-2016, 17:15
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

How do you connect the POV to PWM 4?

Last edited by ICE_Bear : 19-02-2016 at 17:53.
Reply With Quote
  #10   Spotlight this post!  
Unread 19-02-2016, 19:34
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: Help program.

Quote:
Originally Posted by ICE_Bear View Post
How do you connect the POV to PWM 4?
The snippet Mark posted shows how to control any motor you like. He called it "Motor 1" in his example. You can call it whatever you want in the string wired to the Refnum Get. Just Open it as PWM4 in Begin, and wire the device reference to a Refnum Set with the same name.
Reply With Quote
  #11   Spotlight this post!  
Unread 19-02-2016, 20:01
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

Quote:
Originally Posted by Alan Anderson View Post
The snippet Mark posted shows how to control any motor you like. He called it "Motor 1" in his example. You can call it whatever you want in the string wired to the Refnum Get. Just Open it as PWM4 in Begin, and wire the device reference to a Refnum Set with the same name.
how are you supposed to do that in Begin.vi?
Reply With Quote
  #12   Spotlight this post!  
Unread 19-02-2016, 21: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: Help program.

Quote:
Originally Posted by ICE_Bear View Post
how are you supposed to do that in Begin.vi?
Do it the same way you open any resource.
Attached Thumbnails
Click image for larger version

Name:	put in Begin.png
Views:	12
Size:	13.9 KB
ID:	20123  
Reply With Quote
  #13   Spotlight this post!  
Unread 19-02-2016, 21:42
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

Sorry if i came off rude. The program still isn't working, is there anything we may not have done?
Reply With Quote
  #14   Spotlight this post!  
Unread 19-02-2016, 22:18
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: Help program.

Quote:
Originally Posted by ICE_Bear View Post
The program still isn't working, is there anything we may not have done?
There are many things you might not have done. Instead of having us go through all the things detailed in the Screensteps documentation, though, how about you showing us what you have done? Posting your code for us to look at will be a lot faster than going back and forth with "did you do this? and this? and this too?"
Reply With Quote
  #15   Spotlight this post!  
Unread 19-02-2016, 22:40
ICE_Bear ICE_Bear is offline
Registered User
FRC #5875 (ICE)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Northern Nevada
Posts: 72
ICE_Bear is an unknown quantity at this point
Re: Help program.

Thank you for all your help. we just forgot to plug in the PWM.
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:07.

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