Hello Guest it is December 21, 2024, 08:47:54 AM

Author Topic: XBox360 Controller Plugin New User Info  (Read 203180 times)

0 Members and 3 Guests are viewing this topic.

Re: XBox360 Controller Plugin New User Info
« Reply #30 on: May 05, 2010, 09:25:45 PM »
Hi Lee,
      i am trying to use your plug-in with ajaxcnc  plug-in. everything works fine except continuous jogging. can you tell me how your plug-in performs continuous jogging? is there a way to read the continuous jogging From  vb or brains? in the ajax plug-in the jogging keys are mapped in brains to the hardware. thanks for any help.
thanks
Eric
« Last Edit: May 05, 2010, 09:34:55 PM by eric282000 »

Offline Leed3

*
  •  162 162
Re: XBox360 Controller Plugin New User Info
« Reply #31 on: May 05, 2010, 10:06:10 PM »
Hi Eric,

I am not familiar with ajaxcnc.  I assume you are talking about jogging with the thumbsticks.  If the thumbstick position is above a minimum value then  I send the following to Mach ---- Code("DOJOG");------

The plugin SDK conatains example plugins.  I used those (especially the joystick plugin) as a basis to develop my code.  The actual lines sent to Mach are:

Engine->Axis[CurrentAxis].Dec = false;
Engine->Axis[CurrentAxis].Jogging = true;
Engine->Axis[CurrentAxis].JoggDir = Direction;  
Code("DOJOG");

Direction is determined by evaluating which way the Thumbstick is pushed.

Hope that answers your question,


Lee
Re: XBox360 Controller Plugin New User Info
« Reply #32 on: May 06, 2010, 09:29:24 PM »
Hi Lee,
   I tried reading Engine->Axis[0].Jogging and Engine->Axis[0].JoggDir
to tell if the controller was jogging. I works as long a you are using the printer port driver.
When I switch to my hardware from ajaxcnc.com their plugin does the motion and
Engine->Axis[0].Jogging always stay false even if I jog with the keyboard.
Is their any way to have you modify a plugin that when you do continious jog you
Use the folowing commands?

Engine->InSigs[29].Activated=true; // for jogging x positive
Engine->InSigs[29].Activated=false; // to stop jogging x positive
Engine->InSigs[30].Activated=true; // for jogging x negative
Engine->InSigs[30].Activated=false; // to stop jogging x negative
Engine->InSigs[31].Activated=true; // for jogging y positive
Engine->InSigs[31].Activated=false; // to stop jogging x positive
Engine->InSigs[32].Activated=true; // for jogging y negative
Engine->InSigs[32].Activated=false; // to stop jogging x negative
Engine->InSigs[33].Activated=true; // for jogging z positive
Engine->InSigs[33].Activated=false; // to stop jogging x positive
Engine->InSigs[34].Activated=true; // for jogging z negative
Engine->InSigs[34].Activated=false; // to stop jogging x negative

And when either of the lower triggers are pulled use the following commands?

Engine->InSigs[35].Activated=true; // for fast jog
Engine->InSigs[35].Activated=false; // for slow jog
Or the source for the driver and I can modify.
Thanks
Eric

Offline Leed3

*
  •  162 162
Re: XBox360 Controller Plugin New User Info
« Reply #33 on: May 07, 2010, 12:21:16 AM »
Hi Eric,

First of all, the source is not available - Sorry.  Second, I have uploaded a file to the Yahoo group Files section -VS2005-VS2008 Lee's Files.  It is named AjaxVer.zip.  It contains the XBox360Controller.DLL that I have modifiied to include using INSIGS.  Give it a try and see how it works.  Copy the DLL into the Mach3\Plugins folder and try it.  Let me know how it goes.

Lee
Re: XBox360 Controller Plugin New User Info
« Reply #34 on: May 07, 2010, 08:28:05 AM »
hi Lee,
       i gave it a quick try this morning and every thing appears to be working fine.
i will test more this evening.

thank you
Eric
« Last Edit: May 07, 2010, 08:30:28 AM by eric282000 »
Re: XBox360 Controller Plugin New User Info
« Reply #35 on: May 07, 2010, 02:50:01 PM »
Hi lee,
   After further testing this is what I have found. Axis reversal does not work on sticks when in incremental jogging. It works fine on thumb pad and sticks in continuous jogging. When right stick up and down is set to z axis and you jog and release machine continues to jog. If you jog the other direction both jogging outputs stay on. Maybe a dead band problem. If you set right stick side to side to z axis it works fine.
Thanks
Eric

Offline Leed3

*
  •  162 162
Re: XBox360 Controller Plugin New User Info
« Reply #36 on: May 07, 2010, 06:58:12 PM »
Hi Eric,

If we look at jogging problem only, what code is neccessary to shift in and out of jog?  I use:

Engine->IncrementalJog = true;
and I get the MainPlanner->m_Increment to determine the amount to Incrementally Jog
I also use Block.Format("G91G1 %s %.4f, CurrentLeftVertAxis,increment);
Code(Block);
if(WasG90) Code("G90");

Thanks
Lee
Re: XBox360 Controller Plugin New User Info
« Reply #37 on: May 07, 2010, 09:28:55 PM »

Hi Lee,
      May be you miss understood incremental jogging works fine. just when you select the axis reversal in the config it reverses incremental jogging from thumb pad and reverses continuous jogging from sticks.
if you press down on sticks to go to incremental jogging the axis are not reversed any longer or if you switch to incremental jogging in mach the incremental jogging from the sticks are not reversed.

Offline Leed3

*
  •  162 162
Re: XBox360 Controller Plugin New User Info
« Reply #38 on: May 07, 2010, 11:02:56 PM »
Hi Eric,

Thank you for pointing that problem out.  I have posted a new version for you to test.  It is in the same place as before and is named AjaxVer2.zip.  Please give it a try.  Besides responding to your jogging concerns, i made a couple of other mods to the INSIGS code.

Let me know what you find.

Lee
Re: XBox360 Controller Plugin New User Info
« Reply #39 on: May 08, 2010, 08:10:06 AM »
hi Lee,
       that took care of the problems. thanks for your fast replies and great work.

Eric