585,589 active members*
3,706 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > How to Merge Init file with external buttons file.
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2017
    Posts
    112

    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
    Regards

    Amit Kumar

  2. #2
    Join Date
    May 2006
    Posts
    4045

    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
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Aug 2017
    Posts
    112

    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
    Join Date
    Aug 2017
    Posts
    112

    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
    Join Date
    Jun 2004
    Posts
    355

    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
    Join Date
    May 2006
    Posts
    4045

    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
    TK
    http://dynomotion.com

Similar Threads

  1. Merge NC Programs in one NC File
    By zreqi in forum PowerMILL
    Replies: 4
    Last Post: 03-11-2017, 12:46 PM
  2. FANUC10M LOAD FILE FROM EXTERNAL DIVICE/PC
    By suzukirmz in forum Fanuc
    Replies: 3
    Last Post: 06-19-2015, 01: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
  •