Call a C program in a C program

Moderators: TomKerekes, dynomotion

Post Reply
cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Call a C program in a C program

Post by cemoa9 » Sat May 29, 2021 8:09 pm

Hello Tom,

I have been trying to call a program in a program, from some examples I see I need to include "KMotionDLL.h" the but I always get a message error :

Image

If I copy the file in the folder then I get that :

Image

I must be missing something...
Attachments
Capture2.PNG
Capture1.PNG

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Call a C program in a C program

Post by TomKerekes » Sat May 29, 2021 8:34 pm

KMotionDLL.h is for a C++ Class for code that runs on the PC under Microsoft Windows. It can not be used in a C Program that runs on KFLOP.

Could you describe more specifically what you are trying to do?
Regards,

Tom Kerekes
Dynomotion, Inc.

cemoa9
Posts: 82
Joined: Mon Jun 01, 2020 11:01 am

Re: Call a C program in a C program

Post by cemoa9 » Sun May 30, 2021 6:08 am

Hello Tom,

I have specific program for the homing of the spindle, and I would like to call it during my toolchange program.

Cordially

Francois

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Call a C program in a C program

Post by TomKerekes » Sun May 30, 2021 4:09 pm

Hi Francos,

Convert the Program into a function. Put the function into a file. #Include the file in the Tool Change Program. Call the function from the Tool Change code wherever required.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply