Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: TurboStew on August 24, 2008, 12:12:31 PM

Title: Trying to get gcode movement and motor tuning in BlankMovement
Post by: TurboStew on August 24, 2008, 12:12:31 PM
Hello,

I am trying to program a simple 2 line movement in Gcode, and watch the trajectory ring buffer.  It fills with 65 elements, but they are all 0.00 for the positions, The other problem is the motor tuning screen is wierd when running under the Blankdevice plugin.  It seems like there are some speed and accel limits on the tuning params that are set to 0.  I have searched but can't seem to find these.  I am an embedded engineer specializing in BLDC vector controls with DSPs and FPGAs, but this windows stuff is getting my goat! I think I will be off and running if I could see logical trajectory ring buffer values as well as understand the motor tuning hooks.

Thanks,
Kent
Title: Re: Trying to get gcode movement and motor tuning in BlankMovement
Post by: TurboStew on August 24, 2008, 05:02:17 PM
Well, I think I might have it.  I put these lines in SendholdingMovement() and now the motion make more sense and the motor tuning screen works.

MainPlanner->ExBufferHi = 350;
MainPlanner->ExternalType = EX_VMS; //EX_COMMAND;

for( int x = 0; x < 7; x++ )
   MainPlanner->ExternalPulseRates


Regards,
Kent
Title: Re: Trying to get gcode movement and motor tuning in BlankMovement
Post by: ART on August 24, 2008, 06:52:26 PM
Hi Kent:

Take note you have to set MachView->m_PrinterOn = false in the myInitControl function to indicate an external device plugin
as well as have set MainPlanner->ExternalType = EX_VMS; for variable ms timing, and set the MainPlanner->ExTime == .001 for 1ms timed waypoints..



 Then, you have to set the axis maximums , then motor tuning can work..

This woudl set the max to 75K steps/second for example.. The user can then tune the motors with the motor tuning..

for( int x = 0; x < 7; x++ )
  MainPlanner->ExternalPulseRates

Now if you command a move, the positions will be in the RingBuffer at
MainPlanner->Movements[Engine->TrajIndex].sx;   sy,sz..ect..

 I believe the ncPod plugin shows incremental motion from the .ex, .ey, .ez var's, and the sx, sy, sz vars show absolute position..

Art
Title: Re: Trying to get gcode movement and motor tuning in BlankMovement
Post by: TurboStew on August 25, 2008, 11:51:32 PM
Thanks Art :) :) :)

I now seem to have more things going, but I have another problem.

The G100 plugin in the SDK won't compile for me, it seems to be missing some files like:

G100Part.cpp
G100Helpers.cpp
G100Handler.cpp
G100Enumerator.cpp

I did research here and yahoo forum and nobody else seems to have a problem.  Any ideas?

Thanks again,
Kent

Title: Re: Trying to get gcode movement and motor tuning in BlankMovement
Post by: ART on August 26, 2008, 09:22:12 AM
Hi Kent:

  The g100 has proprietary code in it written by the developer of it, so I cant include a compilable plugin for the g100. The TCP
connection is their own , the ncPod plugin is compilable for usb side, but the g100 cannot be made complete to compilation stage..

Art