Go to Post For a good time, call 1-800-GOFIRST - Wayne Doenges [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 19-09-2015, 17:22
2386programming 2386programming is offline
Registered User
FRC #2386 (Trojans)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Burlington
Posts: 34
2386programming is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 20-09-2015, 15:36
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: 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.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-09-2015, 10:21
2386programming 2386programming is offline
Registered User
FRC #2386 (Trojans)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Burlington
Posts: 34
2386programming is an unknown quantity at this point
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 22-09-2015, 11:39
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: 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.
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 21:31.

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