Hello.
I'm running the kmotion version 434k.
I have put some custom buttons on the screen via screen editor.
I want those buttons, when pressed to execute a specific c program on thread 3 for example.
I have configure for example, the IDC_But20 as "Button", Var -1 and script action, "Program//run a KMotion User C program".
When i execute the c program from Kmotion environment, everything is ok, but when i execute via the button on the kmotionCNC, it brings an error
"Invalid thread number 0 Valid Range (1-7)"
Attached is the screen i have made and the c program.
Please advice what do i do wrong?
custom button want execute c program
Moderators: TomKerekes, dynomotion
custom button want execute c program
- Attachments
-
- Param_2.c
- (2.03 KiB) Downloaded 184 times
-
- 2AxisPlasmaOxy_PARAM_1024x768.scr
- (47.42 KiB) Downloaded 187 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: custom button want execute c program
Hi cnc_freak,
You don't seem to have anything configured for IDC_But20. Did you send the correct file? I see:
ID:IDC_But20,Type:PUSHBUTTON,X:615,Y:390,CX:100,CY:30,Show:1,Var:1064,Style:1,BitmapFile:;,Colors:;;;,Font:MS Sans Serif,FontSize:11,HotKey:-1,Bold:0,Italic:0,Text:Label,ToolTipText:,Script:
But the error is indicating your Thread number is 0 not valid Threads 1-7
You don't seem to have anything configured for IDC_But20. Did you send the correct file? I see:
ID:IDC_But20,Type:PUSHBUTTON,X:615,Y:390,CX:100,CY:30,Show:1,Var:1064,Style:1,BitmapFile:;,Colors:;;;,Font:MS Sans Serif,FontSize:11,HotKey:-1,Bold:0,Italic:0,Text:Label,ToolTipText:,Script:
But the error is indicating your Thread number is 0 not valid Threads 1-7
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: custom button want execute c program
Ok i send the wrong screen file.
Try to configure the button to execute the c program "param_2.c" at thread 3 and see what happens.
I try tomorrow to send the write screen file.
Try to configure the button to execute the c program "param_2.c" at thread 3 and see what happens.
I try tomorrow to send the write screen file.
Re: custom button want execute c program
Here are the two screen files.
- Attachments
-
- 2AxisPlasmaOxy_PARAM_1024x768.scr
- (47.9 KiB) Downloaded 188 times
-
- 2AxisPlasmaOxy_MAIN_1024x768.scr
- (47.61 KiB) Downloaded 176 times
Re: custom button want execute c program
I install the last version 435b and now everything works fine.
Thank you for you time.
Thank you for you time.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: custom button want execute c program
Great. Thanks for taking the time to post back.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.