586,112 active members*
3,232 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2014
    Posts
    52

    Programing with other header files?

    Hi

    I have made a small program to change/keep and store the toolchanges of the ATC in a txt file. I have written the program in C language and used another compiler than the one in Kmotion. Compiler Code::blocks.

    Is it possible to just load the .c file in Kmotion? If that is possible do i have to, somehow, copy the header files used in my C program. I have used stdio.h and stdlib.h. When loading the c file in Kmotion the compiler says that header file not found.

    /Lars

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: Programing with other header files?

    Hi Lars,

    It isn't clear if you understand the difference between programs running in the PC vs programs running in KFLOP. Both might be written in C, but the resources that they have available to do things are quite different. The PC has direct access to the video screen, disk files, and keyboard. KFLOP has none of those. So including stdio.h doesn't really make sense for a KFLOP C program.

    We do offer certain types of services to KFLOP which is printf (which sends data via USB to the PC to an App that might be running to display it in a Console Window). Also a simple form of fopen, fprintf, and fclose (which sends data via USB to open and write the data to a disk file as long as an App is running and causing KMotionServer to be running to perform this servic efor KFLOP).

    I'm guessing your program maintains a file to keep track of the tools loaded in your ATC? Actually I just searched for an example of how to include a PC data file in a KFLOP C program that I did for another User and it was you! See:
    http://www.cnczone.com/forums/dynomo...ml#post1623728

    Did you ever read that?

    Regards
    TK
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Feb 2014
    Posts
    52

    Re: Programing with other header files?

    Hi

    I knew i had i wrong somehow...

    Yes i read that post, but i never really tried it out. I did not understand the c code then. But now i have read up on file handeling in c abd then i started to write a program that stored to txt. Mostly using fscanf, fprintf, i hope it works simmilar i kflop/kmotion.

    I will go though the files in the eeprom thread. The reason i used a diffferent compiler was because i have the kflop wired at work and wanted to write the program at home and test it.

    /Lars

Similar Threads

  1. header flanges
    By modifiedwelding in forum Want To Buy...Need help!
    Replies: 0
    Last Post: 06-22-2014, 03:26 PM
  2. Add comment in header?
    By orion_134 in forum Mastercam
    Replies: 4
    Last Post: 09-04-2013, 01:51 PM
  3. looking for the name of a type of header
    By Smertrios in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 03-13-2013, 05:51 PM
  4. Online cnc programing/ offline cnc programing
    By grimantas in forum Polls
    Replies: 0
    Last Post: 11-28-2012, 02:03 PM
  5. Pin out for Header
    By Mr. LocoMartin in forum Stepper Motors / Drives
    Replies: 0
    Last Post: 12-08-2009, 04:32 AM

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
  •