Need Help! custom board


Results 1 to 6 of 6

Thread: custom board

  1. #1
    Registered
    Join Date
    May 2018
    Location
    Belgium
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default custom board

    Hi,

    I want to design my own custom board to interface with the KFLOP board (a sort of custom kanalog). Is there any info about how to interface a DAC ? Is this done by I2C, SPI ...bus ?

    Kind regards

    Similar Threads:


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

    Default Re: custom board

    Hi LucV,

    Probably SPI would be the best choice as it lends itself well to software clocking. You might see the SPI V6.c example. That code sends/receives an 8 bit byte in ~13us. So it wouldn't be possible to update multiple DACs every 90us Servo Sample like Kanalog does. For most servos this might not be a major issue.

    Our KNozz has an SPI interface for the Dual ADC. So that is a source for another example. It is somewhat simpler but isn't written to be fast as heaters are so slow anyway. See attached. See the int SPI_IN function that performs a 16-bit SPI transfer.

    Regards

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


  3. #3
    Registered
    Join Date
    May 2018
    Location
    Belgium
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: custom board

    Hi Tom,

    Thanks for quick response. However, I want to use my custom board to drive 3 interpolated axes (DC - servo motors -10..10V), the same as kanalog does...
    At this moment I have configured the KFLOP to drive 3 steppermotors. I have written some code a using PIC that counts the steps from KFLOP, read the position of the motor with a quadrature encoder and drive drives the motor so that these 2 values are equal (PID controller).
    It have to do this as my servo drives only accept +- 10V.
    Of course I can use drives that accept step/dir signals or I can buy a kanalog, but if I could use the same DAC's as kanalog this would be better

    Apart from the 3 axes (DAC and encoder inputs), there is a small PIC based PLC onboard that shares vars with kflop using modbus and can be programmed in ladder.


    Kind regards


    Luc Vercruysse



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

    Default Re: custom board

    Hi Luc,

    I don't really understand your response. Why not replace your PIC with 3 DACs that you command with SPI? Is your goal to eliminate the PIC?

    The communication to the Kanalog DACs is fairly complex and fast as it is interrelated to all the IO on so that all the IO on Kanalog can be updated using only a few pins and every 90us.

    Regards

    TK
    http://dynomotion.com


  5. #5
    Registered
    Join Date
    May 2018
    Location
    Belgium
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: custom board

    Correct Tom, my goal is to eliminate the PIC's. I have found a 12bit DAC with parallel interface (4 bit data, 3 adresses) wich is faster than SPI.
    In KMotionDef.h there is an array (
    DAC_Buffer[]). I supose this are the values of the DAC's that are updated using DMA ?

    My question : Is the global variable
    DAC_Buffer[] updated every cycle during interpolation. With other words can I write the value is this variable to my dac ?

    Kind regards.



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

    Default Re: custom board

    Hi LucV,

    I think it would be better to use the chx->Output which is updated every servo sample. Set the Axis Output mode to "No Output" and write the output to your DAC yourself. See the techniques that output to PWMs for a similar example.

    HTH

    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

custom board

custom board