585,763 active members*
4,191 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > MoveExp() function include WaitNexTimeSlice() ?
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    25

    MoveExp() function include WaitNexTimeSlice() ?

    Hi,

    Somewhere in example code have seen comment that MoveExp() function includes WaitNexTimeSlice(). Is that true?
    And if so - which other functions include WaitNexTimeSlice()?
    Would need to know this for time planning - i.e. correct velocity calculations based on TIMEBASE number.

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: MoveExp() function include WaitNexTimeSlice() ?

    Hi funding33,

    The motion functions: MoveExp, Move, MoveRel, MoveAtVel, MoveRelAtVel, and Jog perform a WaitNextTimeSlice to avoid being interrupted while starting a new motion, but only while a previous motion is in progress and the new motion is being calculated (and blended). MoveExp is the only function that should be called at a rapid enough rate for it to matter. The other mentioned functions (other than MoveExp) should not be called continuously (not more often than every 4ms) as it takes some time for the new trajectory to be calculated and to begin to have an effect.

    HTH
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Aug 2006
    Posts
    25

    Re: MoveExp() function include WaitNexTimeSlice() ?

    Hi Tom,

    Thanks. Can you suggest how is better to implement plasma Torch Height control of the Z axis vs Voltage:
    I have voltage signal as quadrature encoder to one spare axis Input(~700kHz) and would need to be able to switch it somehow to control Z axis -which is not part of coord motion.
    Should I constantly read Pos and call MoveExp() in loop? Or may be better to write new Destination of Z - but will it regard Jerk Accel and Velocity then?
    Also the input signal is noisy - is there a way to use built in IIR filter on input? Or better leave it as is and filter Z output later?

  4. #4
    Join Date
    May 2006
    Posts
    4045

    Re: MoveExp() function include WaitNexTimeSlice() ?

    Hi funding33,

    Can you provide more details? Does the 700KHz encoder signal vary in frequency depending on plasma voltage?

    Is your Z axis a servo with encoder feedback?

    A common approach is to use an extra KFLOP axis to form a "dual loop". The inner loop controls the Z axis position based on the encoder. The outer loop uses the voltage feedback and outputs a velocity to command the inner loop, See the DualFeedbackLoop.c example which performs:

    ch0->Dest += ch2->Output; // move ch0 at speed of ch2 output

    The nice thing about this is that you have all the features of a KFLOP axis to control the loop (PID, Filters, Max Limits, etc).

    You can create MCodes to switch between normal Z position mode where the Z axis is included in the Coordinated Motion System and dual loop mode where Z is excluded.

    HTH
    Regards
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Aug 2006
    Posts
    25

    Re: MoveExp() function include WaitNexTimeSlice() ?

    Hi,

    The system has X,A and Z axes. That is a 3D tube cutter simlar to this: https://www.youtube.com/watch?v=mDO9sx8NiPA
    X,A axes are part of coord motion while Z is not. Control software is written new, just used KMotion and Interpretter dll's from example.
    Z axis controlled via (BUF, ReadBitxx), (BUF, SetBitxx) commands only. All axes are servos with encoders. Drives take Step/Dir input so placed in to closed loop Setp mode on Kflop.
    The voltage is converted by external ADC and CPLD in to quadrature encoder signal which fed to spare axis encoder input, that way "encoder" position value seen on KFlop is the actual voltage(scaled).
    Yes, suggested dual loop seems to be good idea, will try that.

    Thanks

Similar Threads

  1. Anything I forgot to include for this enclosure
    By mioduz in forum Tormach Personal CNC Mill
    Replies: 11
    Last Post: 06-24-2014, 10:52 AM
  2. MoveExp
    By CAROLIVAR in forum Dynomotion/Kflop/Kanalog
    Replies: 2
    Last Post: 07-17-2012, 05:41 PM
  3. Things to include in an M06 macro
    By vandal968 in forum G-Code Programing
    Replies: 3
    Last Post: 05-08-2012, 07:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •