KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING


Results 1 to 6 of 6

Thread: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

  1. #1
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    Hello all,
    So i've retrofitted a old acer mill and built a pendent to control, using mach3 and Kflop/Kanalog.
    I'm not familiar with C programming so I've gotten myself in a pickle with Kflop so I'm looking for some help.

    I want to use an external poteniometer to control mach3's feed override, but I'm not sure of the inputs and code. I was thinking 5 volts, to Kanalog's JP6 and the same with the MPG. I've noted the examples in the C program directory but I cant really understand what the code means, though I've done some similar stuff with an arduino.
    What are the bit numbers to Kanalogs ADC JP6? is this to Kflop's Jp6? How do I code this into my Init file?

    A similar issue with a linear encoder to track the quill depth, this is just a 2 axis machine so it's okay if it's slow. Would the A/B of the encoder go to Kanalog's JP7 inputs?

    Any help is Appreciated!

    Thanks,
    T

    Similar Threads:


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

    Default Re: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    Hi T,

    Could we convince you to try KMotionCNC instead? Mach3 is obsolete and we have example code for this. See SSOwithPot.c and FROwithPot.c examples.

    Otherwise with Mach3 you might write a Notification C Program to read a Kanalog ADC and place the reading in a persist variable. In Mach3 write Basic code to send a notification to the plugin to upload the value to a Mach3 DRO. Then use the value to set the SSO.

    Regards
    TK http://dynomotion.com


  3. #3
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    370
    Downloads
    0
    Uploads
    0

    Default Re: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    +1 on using Kmotioncnc. It will do everything you want and works really well. More things to go wrong trying to integrate with mach 3.



  4. #4
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    Quote Originally Posted by TomKerekes View Post
    Hi T,

    Could we convince you to try KMotionCNC instead? Mach3 is obsolete and we have example code for this. See SSOwithPot.c and FROwithPot.c examples.

    Otherwise with Mach3 you might write a Notification C Program to read a Kanalog ADC and place the reading in a persist variable. In Mach3 write Basic code to send a notification to the plugin to upload the value to a Mach3 DRO. Then use the value to set the SSO.
    Okay, Thanks guys. I'll give Kmotion closer look.
    Still wondering where I can input these devices? And what bits to access them on Kanalog. JP6.

    Thanks



  5. #5
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    330
    Downloads
    0
    Uploads
    0

    Default Re: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    The ADCs don't have bit numbers. Bit numbers are only assigned to inputs/outputs that are digital (aka are only ever On/Off).

    To access the ADC's, within a C program, you use either ADC(x) where x is the channel number which returns the raw value in counts (-1023 to 1023 IIRC), or there is the option of using KANALOG_CONVERT_ADC_TO_VOLTS(ADC(x)), which will return the voltage. Which you use depends on what you're trying to achieve.

    To view the values in realtime, if you open KMotion, then click the Analog Status button (you'll need to make sure you have Kanalog selected in the Option menu), it will show the current values of all the ADC/DACs.


    Regarding the linear encoder, it should go to a suitable encoder input. It doesn't really matter what one, provided it's a matched A/B pair, as you'll need a bit C code to tell the KFlop how to handle the encoder, and you can use any channel for any axis.



  6. #6
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

    Thanks Tom,
    I'll experiment with the example codes and ADC inputs.



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

KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING

KANALOG TO MACH3: FRO POT, MPG, Z encoder INPUT AND CODING