Go to Post "Recycle Rush? What's that, some sort of charity marathon?" - Chak [more]
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-18-2017, 08:49 AM
pryland pryland is offline
Registered User
FRC #4336
Join Date: Oct 2015
Location: Lafayette, LA
Posts: 36
pryland is an unknown quantity at this point
Problem switching modes between Motion Magic and %VBus

Trying to expand upon the Labview Motion Magic example provided by CTR. (Yes the example works).

Situation: Rear Talons have encoders attached. (Quad).

Trying to create a drive with the option of pushing a button to go a set distance using MotionMagic.

If button is pressed (MotionMagic snippet), the drive will go a set distance.
Reset encoder, repeat, no problems.

If xbox joystick if pushed, talons will switch to %VBus and drive fwd, bckwd.
(I am using a Global which is set according to whether we want MM or %VBus)

(False conditions are empty on both snippets.)

So far, so good.

Problem: after driving with joystick (%VBus), if the Motion Magic button is pressed again, it will enter the MM snippet, generally bumping the talons a small amount and stay in the while loop without further change to position.
Checking the RoboRio Web server, shows the Talons are in Mode 15 when this occurs. When original MM was run, Talons are in Mode 7.

I am able to stop the while loop with a button, and drive the talons again using the joystick. HOWERVER: the rear Talon's (with encoders) do NOT respond. They are still in Mode 15.

In begin, I have broken the Talons out individually and also by the common "Drive".

Not sure of best practices.

Suggestions and feedback welcome.
Thanks in advance for any help.

Snippets attached:
Drive and MM are both in teleop tied to xbox buttons and joystick.
Attached Thumbnails
Click image for larger version

Name:	motionmagic.png
Views:	39
Size:	168.5 KB
ID:	22577  Click image for larger version

Name:	Begin.png
Views:	28
Size:	39.3 KB
ID:	22578  Click image for larger version

Name:	drive.png
Views:	22
Size:	68.9 KB
ID:	22579  
Reply With Quote
  #2   Spotlight this post!  
Unread 03-13-2018, 07:42 PM
matlac7 matlac7 is offline
Registered User
FRC #4638
Join Date: Jan 2017
Location: Maryland
Posts: 6
matlac7 is an unknown quantity at this point
Re: Problem switching modes between Motion Magic and %VBus

Hi, I was wondering if you ever solved this issue? I don't have a solution, and I know this is a year late but I have a similar problem at the moment and am looking for any sort of leads on a solution.

Reply With Quote
  #3   Spotlight this post!  
Unread 03-14-2018, 01:04 PM
jdaming jdaming is offline
Registered User
FRC #5013 (Trobots)
Team Role: Mentor
Join Date: Feb 2012
Rookie Year: 2007
Location: Kansas City, MO
Posts: 124
jdaming is on a distinguished road
Re: Problem switching modes between Motion Magic and %VBus

A lot of the framework has changed since this post was made. What problems are you running into now?

The mode is now chosen on the set VI. I think this will work just fine.

I would say be careful on how/if you exit out of motion magic when the joystick is used. For example say your button drives the robot 100 inches. If at 50 inches you move the joystick what happens?
Certified LabVIEW Architect
Reply With Quote

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 08:58 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi