Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Specifying Axis for Motor (http://www.chiefdelphi.com/forums/showthread.php?t=138216)

2386programming 19-09-2015 17:22

Specifying Axis for Motor
 
So our team is currently trying to make the transition of programming in java to programming in LabVIEW. It isn't too complicated currently, but I was wondering how I would specify what axis is controlling a motor. Because there is code for a drive train which requires 2 of the 4 axis we have. If any help could be given here please do.

Thank You

Alan Anderson 20-09-2015 15:36

Re: Specifying Axis for Motor
 
The function to read from a joystick provides several outputs. One output is an array of values representing all the axes. The most straightforward way to get the value of the axis you are interested in is to use an Array Index function. The result is a single number that you can use for whatever you want, including as the input of a Motor Set function.

Array Index can return multiple individual outputs at the same time if you want to get more than one axis from a joystick.

2386programming 22-09-2015 10:21

Re: Specifying Axis for Motor
 
That is starting to make sense. The only question that I have about that is, do I have to use a numeric constant connected to the index part of the array to specify what number axis I want to use?

Alan Anderson 22-09-2015 11:39

Re: Specifying Axis for Motor
 
A constant is usually appropriate. You could also use a LabVIEW control, or anything else that gives an integer. You can leave index inputs unconnected and let them use the default, but it is most often best to wire a number to the array index explicitly.


All times are GMT -5. The time now is 03:56.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi