Mach3/Kflop/Pokeys MPG conflict


Results 1 to 12 of 12

Thread: Mach3/Kflop/Pokeys MPG conflict

  1. #1
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default Mach3/Kflop/Pokeys MPG conflict

    Working on getting my MPG working with in Mach3 and have nailed it down to a conflict between the kflop plugin and pokeys plugin. I have also posted this in the Mach3/pokeys forum.

    New Pokeys plugin MPG setup help.

    Just seeing if there is something I can disable on the kflop side. The pokeys mfg is suggesting that the kflop may be over writing the mpg register.

    I could run the MPG off the kflop/kanalog but would like to avoid having to run another wire from my panel to my main electrical box.

    Thanks
    -Wes

    Similar Threads:
    Last edited by Snipes44; 10-18-2012 at 03:31 PM.


  2. #2
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Wes,

    I suspect that is a problem on our end. Rather than it being a matter of us overwriting anything, I think maybe our Plugin is supposed to read the Pokeys MPG position from somewhere and cause axes to move.

    Normally an MPG is connected directly to KFLOP. This makes the response instantaneous. That is really the purpose of KFLOP to remove the real-time requirements from the PC/Windows/Mach3/Plugin.

    I think for the trouble of adding another cable it will be well worth it to have better response.

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Tom,

    Been thinking about this today and was wondering if I would end up having a lag similar to the feed hold lag.

    I well just run another wire. I have both a couple encoder inputs and general inputs. Does it matter which I use? I would think that the encoder one would work better.



  4. #4
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Wes,

    I don't really understand the question about the feedhold lag. If you use KFLOP's hardware feedhold it will have guaranteed instant response just like the MPG.

    Yes it is best to use a hardware encoder input if possible. I've attached a version of the MPGSmooth.c example modified to use a hardware encoder rather than the software technique.

    HTH

    Regards
    TK http://dynomotion.com


  5. #5
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Tom,

    Sorry about not explaining myself better. I was just using the feedhold lag as an example of lag that I might have seen if I had run the MPG through pokeys instead of running it through kflop.

    I have already looked into moving my feedhold button to kflop since there is a 2-3 sec delay before motion is stopped. Right now I have it run through pokeys. Going to have to run another wire for that one. I well be starting another thread with a couple question I have on that one later.

    Thanks for the C program for the MPG I well be trying to get the MPG done this weekend.

    Also thanks for the great support Tom.

    NOTE: Not seeing the C program attachment on your last post. :-)

    Last edited by Snipes44; 10-19-2012 at 09:44 PM.


  6. #6
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Response moved to appropriate thread

    Last edited by TomKerekes; 10-24-2012 at 02:25 PM. Reason: Response moved to appropriate thread
    Regards
    TK http://dynomotion.com


  7. #7
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Wes,

    Opps looks like I might have gotten my threads crossed from your two posts.

    Here is also that attachment that didn't get attached.

    Regards

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  8. #8
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom,

    I have been looking through the MPG smoothing C program that you post and I noticed that it has the axis selection and scale factor in the code. Can this part be handled by Mach3? If not then I have a bunch more wires to reroute back the the kflop.

    Also I don't have axis encoders connected to the kflop. My output signal is step/dir to my drives. So how does having the MPG connected to kflop get back to Mach3 when I move an axis with the MPG?

    Thanks
    -Wes

    Last edited by Snipes44; 10-24-2012 at 09:04 PM.


  9. #9
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Yes all the MPG controls should be connected directly to KFLOP.

    I suppose there may be some clever way to read them into Mach3 and the send them to KFLOP with a "brain" or something, but it would be far more straightforward to connect them directly to KFLOP.

    One of the main purposes of KFLOP is to remove all real-time responsibilities from the PC/Windows/Mach3/USB/Plugins. Anything involving the PC and Windows will not have real-time response. Most of the time the response will be good, but sometimes there will be large latencies (up to several seconds). The exception to this is the Mach3 Parallel port Kernel Driver which attempts to maintain a real-time 100KHz interrupt but that causes other issues. Having KFLOP handle all real time activities: Motion, MPG, Limits, Homing, and so forth is a significant deviation from the original design intent of Mach3 so sometimes things work differently. KFLOP is not intended to simply be a parallel port replacement.

    In the case of an MPG with KFLOP, KFLOP performs all motion independent of Mach3. This allows instant, reliable response without Mach3 being involved. Mach3 using our Plugin will update the current position in the DRO's as possible under Windows (if the DRO's freeze momentarily once in a while - no big deal). Mach3 will be sure to re-sync to the current position before running any GCode and planning any trajectory.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  10. #10
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom,

    Thanks for the reply. I'm going to have to rewire some stuff to get all the MPG controls running from the kflop.

    One other question. Are the MPG controls always on since they are not run through Mach3. If they are I would like to setup a condition were I have to be in a certain mode Mach3 for the MPG to work, such as having the fly-out mpg screen active to use the hardware MPG.

    Thanks



  11. #11
    Registered
    Join Date
    Oct 2003
    Location
    USA
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default

    Looked at rewiring my mpg axis selection and scale switches down to my kflop/kanalog I would need another 7 inputs. I noticed that I don't have any inputs left to use. I can get 8 more inputs if I buy another breakout board for around $40 so that I have access to the pins on kanalog JP12.

    I would rather looking at trying to have kflop read some USERLEDS in Mach3 so that it knows which axis to move and on what scale.

    I did a little bit of searching but didn't find anything that looked related. I must not be searching for the correct terms.

    How do you send signals too kflop from Mach3 when they are not standard signals or how do you read values in Mach3 from kflop?



  12. #12
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default

    Hi Wes,

    KFLOP can't read Mach3 LEDs directly. You would need to write CB code in Mach3 to write the LED's to Virtual Output Bits in KFLOP. Bits 48-63 are available as Virtual IO Bits that Mach3 can write to and KFLOP can read. I believe you could use the Mach3 macropump feature to execute periodically and write the LEDs to the Output bits. Or use custom buttons in Mach3 to both set the LEDs and the Outputs at the same time.

    Regards

    Regards
    TK http://dynomotion.com


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Mach3/Kflop/Pokeys MPG conflict

Mach3/Kflop/Pokeys MPG conflict