Apparently I do not understand how the printf works..
I thought using kmotionserver I could have multiple PC programs communicate with KFLOP
1. Execute KMOTIONSERVER.EXE
2. Execure KMOTION, bring up the CONSOLE screen
2a. Test the console: click 'version'.. version sent from KFLOP as expected
3. Run KMOTIONCNC
3a. Tool Setup/ User Buttons
3b. Key 121, Button nams: Test, action: Execute Prog, Thread 4/ C File "print.c"
3c. OK/ exit to main screen
3d. Click the new 'Test' button
3e. Expected to see 'Hello World' on the KMOTION console screen.. but nothing..
3f. In the folder with print'c, there is not a print.out
where is the output going?
Where does C code printf output go?
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: Where does C code printf output go?
Hi skeitzer,
That should work. But you shouldn't run KMotionServer.exe. that should happen automatically. But I wouldn't expect it to normally cause a problem unless you are executing an improper KmotionServer.exe
Console messages are different from command responses. Unsolicited Console messages go to the last application that registered to receive the Console messages. Command responses go to the application that sent the command. So for example if 5 apps sent the Version command each app would receive the Version response. And if 5 apps executed a program to print, all prints would all go to the app last registered to receive console messages.
I assume you misstyped print'c but meant print.c ? print'c wouldn't work
Compiling print.c should create an executable print(n).out where n is the Thread it is compiled for.
Are you doing things or making changes that you are not telling us?
Regards
That should work. But you shouldn't run KMotionServer.exe. that should happen automatically. But I wouldn't expect it to normally cause a problem unless you are executing an improper KmotionServer.exe
Console messages are different from command responses. Unsolicited Console messages go to the last application that registered to receive the Console messages. Command responses go to the application that sent the command. So for example if 5 apps sent the Version command each app would receive the Version response. And if 5 apps executed a program to print, all prints would all go to the app last registered to receive console messages.
I assume you misstyped print'c but meant print.c ? print'c wouldn't work
Compiling print.c should create an executable print(n).out where n is the Thread it is compiled for.
Are you doing things or making changes that you are not telling us?
Regards
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Where does C code printf output go?
Thanks..
Console output in Kmotion from C program initiated in KmotionCNC is now working fine..
Don't know why.. maybe my starting KmotionServer manually was the issue..
Console output in Kmotion from C program initiated in KmotionCNC is now working fine..
Don't know why.. maybe my starting KmotionServer manually was the issue..