|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Help program.
How do you program the POV on the Logitech joystick to move one motor using lab view?
|
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
Re: Help program.
How do you get to the joystick block?
|
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
|||||
|
|||||
|
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.
Last edited by Mark McLeod : 17-02-2016 at 21:55. |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||||
|
|||||
|
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 |
|
#9
|
|||
|
|||
|
Re: Help program.
How do you connect the POV to PWM 4?
Last edited by ICE_Bear : 19-02-2016 at 17:53. |
|
#10
|
|||||
|
|||||
|
Re: Help program.
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.
|
|
#11
|
|||
|
|||
|
Re: Help program.
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|