How to Merge Init file with external buttons file.


Results 1 to 6 of 6

Thread: How to Merge Init file with external buttons file.

  1. #1
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default How to Merge Init file with external buttons file.

    Hi everyone,

    I need help in merging these 2 c programs attached below.

    One is Initialisation file or Init file for 8 axis Kflop Controller.

    And second is External Buttons.c File for enabling FEED HOLD, CYCLE START, STOP, ESTOP buttons.

    Please help me in merging both into one file, i am new to c and c++ so no idea of merging it. And i don't want to run hit and trials on it because it can damage the board itself.


    Thank You
    AMIT KUMAR

    Similar Threads:
    Attached Files Attached Files
    Regards

    Amit Kumar


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

    Default Re: How to Merge Init file with external buttons file.

    Hi Amit,

    Its not really that hard. Give it a try at least. It is only C code not C++. Wrong code is not likely to damage the board. Post the merged file and we can check it for you.

    You might read:
    KFLOP C Programs - Dynomotion

    Actually the forever loop in your Init program is for enabling/disabling KStep. I don't believe you are using KStep. So that isn't even needed. All you really need to do is to be able to find the loop and replace it. Also add the called functions.

    If you don't have time or can't configure/program your machine yourself we can connect in and help you do this. But for this we charge a fee.

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to Merge Init file with external buttons file.

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Its not really that hard. Give it a try at least. It is only C code not C++. Wrong code is not likely to damage the board. Post the merged file and we can check it for you.

    You might read:
    KFLOP C Programs - Dynomotion

    Actually the forever loop in your Init program is for enabling/disabling KStep. I don't believe you are using KStep. So that isn't even needed. All you really need to do is to be able to find the loop and replace it. Also add the called functions.

    If you don't have time or can't configure/program your machine yourself we can connect in and help you do this. But for this we charge a fee.

    Regards
    Thanks tom

    I will give it a try.

    And post here for checking it.

    Sent from my Lenovo K50a40 using Tapatalk

    Regards

    Amit Kumar


  4. #4
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to Merge Init file with external buttons file.

    Quote Originally Posted by TomKerekes View Post
    Hi Amit,

    Its not really that hard. Give it a try at least. It is only C code not C++. Wrong code is not likely to damage the board. Post the merged file and we can check it for you.

    You might read:
    KFLOP C Programs - Dynomotion

    Actually the forever loop in your Init program is for enabling/disabling KStep. I don't believe you are using KStep. So that isn't even needed. All you really need to do is to be able to find the loop and replace it. Also add the called functions.

    If you don't have time or can't configure/program your machine yourself we can connect in and help you do this. But for this we charge a fee.

    Regards

    Hi Tom,

    Thanks for your reply.

    I merged these 2 files accordingly for init button with external buttons file.

    So can you please check it for me if it doesn't have any problems in the code after i run into kmotion board.

    Thank You

    AMIT KUMAR

    Attached Files Attached Files
    Regards

    Amit Kumar


  5. #5
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: How to Merge Init file with external buttons file.

    Just a couple minor issues with the merged file.
    You need to add a close bracket just before the DoPCFloat function (add it on line 578).
    And you need to remove one of the close brackets from the end of the file.



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

    Default Re: How to Merge Init file with external buttons file.

    Hi Amit,

    Looks good except the added functions were pasted inside the main function rather than outside the main function.

    If you would have tried to compile the code the compiler would show the error. Compiling doesn't do anything to the KFLOP board.

    HTH
    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

How to Merge Init file with external buttons file.

How to Merge Init file with external buttons file.