Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

trying to integrate a counter into a VI and USB joystick as a velocity control

Hello,
I am trying to integrate a Reddington Micro-switch counter and a Thrustmaster USB joystick as a velocity control into LabVIEW. The joystick will be controlling the X and Y direction for a M.A.X. shear wear testing machine. I have successfully got LabVIEW to recognize the joystick, but now I need to control and display the velocity.
0 Kudos
Message 1 of 10
(4,058 Views)
How are you going to control the machine? Does it use analog voltage levels or are you using a National Instruments' motion control board? More details on your application will greatly help us help you.
0 Kudos
Message 2 of 10
(4,052 Views)
We are using national instruments' DAQ and flex motion control boards. The control boards sends output to motion amp, 0-10V, controlling speed and position. We want the joystick to be able to control how fast/slow the machine moves in the X-Y positions. Want the machine to move faster the further away from center position the joystick is moved. Now the machine takes commands from the keyboard. A min/max velocity and/or X-Y positions can be entered and the machine moves accordingly. Would like for buttons to be able to do various options: can't move joystick w/o pressing trigger, bring up X-Y graph. Also, is it possible to use the POV hat as "fine tune" movement. You press up on the POV hat and it moves up pre-define increments. Thanks.
0 Kudos
Message 3 of 10
(4,032 Views)
This would be completely possible. You said you already have the joystick working in LabVIEW, so now you just need to take the values that are coming from the joystick, scale them, and send them to the motion control board.

If you go to www.ni.com and search "entire site for "joystick motion" (without quotes) you will find many examples on how to program this. The first one that comes up is a LabVIEW 7.0 example for motion control with a USB joystick.

Nicholas C
National Instruments
0 Kudos
Message 4 of 10
(4,027 Views)
Thanks for all the great advice. This is my very first project using LabVIEW. I am also trying to integrate a Micro-switch counter into labVIEW. The counter is iterated when the machine moves in either direction and comes in contact with the metal whip which depresses the close-contact button. I want to be able to acquire the data from the Micro-switch counter, load it on one of the analog or digital inputs and display it to the user.
0 Kudos
Message 5 of 10
(4,016 Views)
You said that you are using National Instruments DAQ, so I am assuming you have a multifunction DAQ board. If you do, you can probably use a counter on the DAQ board to count pulses coming from your Redington counter. Look for the example that says, "Count Digital Events".
What exact Redington counter are you using? Does it put out a 5V pulse train?
What DAQ board are you using?

Nicholas C
National Instruments
Applications Engineering
0 Kudos
Message 6 of 10
(4,007 Views)
We are using a Redington Model 53 with a Micro-switch BZ-2RL2-A2 and a PCI-6031E DAQ board. Would it be advantageous to use the flex motion board over the DAQ board?
0 Kudos
Message 7 of 10
(4,004 Views)
What is the voltage level you are using to trigger counts on the Redington Model 53? If it's 5 volts, then your 6031E will work perfectly to count pulses coming from your micro switch. If it's greater then 5 volts, then you are going to have to attenuate it somehow. The motion control board does not have a counter on it that you can use, so you are going to have to use the DAQ board to count these pulses.
The counts are JUST being displayed on the user interface, correct? I want to make sure you aren't using the microswitch pulses as the feedback to close your motion control loop.

Nicholas C
National Instruments
Applications Engineering
0 Kudos
Message 8 of 10
(3,998 Views)
It is 5 volts. The switch is only being used to iterate the counter to keep record of how many revolutions the machine makes.
0 Kudos
Message 9 of 10
(3,996 Views)
Awesome! Then just use the "count digital events" example with one of the counters on your 6031E board and you should be set.
0 Kudos
Message 10 of 10
(3,987 Views)