How start write new GUI?
25 Apr 2011 16:49 #9311
by Vic
How start write new GUI? was created by Vic
I am sorry for my english.
I start to study EMC.
I take ini file with parameters:
And copy file mini.tcl to mini2.tcl and change setting in ini file:
And recive error:
I don't change any text in file mini.tcl, only copy it:
What I have to do to start new GUI?
I start to study EMC.
I take ini file with parameters:
[DISPLAY]
DISPLAY = mini
And copy file mini.tcl to mini2.tcl and change setting in ini file:
[DISPLAY]
DISPLAY = mini2
And recive error:
Starting EMC2 DISPLAY program: mini2
Can't execute DISPLAY program mini2
Shutting down and cleaning up EMC2...
I don't change any text in file mini.tcl, only copy it:
-rwxr-xr-x 1 1006 root 137462 2011-04-19 15:22 mini2.tcl
-rwxr-xr-x 1 1006 root 137462 2011-04-19 15:22 mini.tcl
What I have to do to start new GUI?
Please Log in or Create an account to join the conversation.
25 Apr 2011 22:38 #9313
by BigJohnT
Replied by BigJohnT on topic Re:How start write new GUI?
AFAIK you need to try that with a git checkout and rebuild after making your changes. I'd assume that changing the name of mini will fail as it will not get built unless you modify the make/submake files and you have to be pretty good to do that. So the easy option is just get a git checkout and modify mini then rebuild.
Do a search for git on the wiki site for instructions on getting a git checkout.
John
Do a search for git on the wiki site for instructions on getting a git checkout.
John
Please Log in or Create an account to join the conversation.
26 Apr 2011 06:55 #9318
by Vic
Replied by Vic on topic Re:How start write new GUI?
Thanks
Now I make my GUI with name 'mini' and test it.
I thought program take GUI name from ini file and use it
But your way is complex for me now
Now I make my GUI with name 'mini' and test it.
I thought program take GUI name from ini file and use it
But your way is complex for me now
Please Log in or Create an account to join the conversation.
26 Apr 2011 10:56 #9328
by alex_joni
Replied by alex_joni on topic Re:How start write new GUI?
yes it takes the GUI name from the ini file.
BUT
the mini interface (and tkemc) are special interfaces, as they are tcl/tk interfaces. As such you cannot execute them by themselves. So the runscript looks for known names (tkemc and mini) and starts tclsh (the tcl shell) with mini.tcl as the program which needs to be executed.
So your easiest way to do it is to work on mini.tcl, and keep the name.
Otherwise you need to edit 'emc' the runscript and add your interface name to the list of recognized tcl/tk GUIs.
Regards,
Alex
BUT
the mini interface (and tkemc) are special interfaces, as they are tcl/tk interfaces. As such you cannot execute them by themselves. So the runscript looks for known names (tkemc and mini) and starts tclsh (the tcl shell) with mini.tcl as the program which needs to be executed.
So your easiest way to do it is to work on mini.tcl, and keep the name.
Otherwise you need to edit 'emc' the runscript and add your interface name to the list of recognized tcl/tk GUIs.
Regards,
Alex
Please Log in or Create an account to join the conversation.
26 Apr 2011 10:57 #9329
by andypugh
Replied by andypugh on topic Re:How start write new GUI?
I think that Tcl is interpreted not compiled, so it might not be necessary to recompile.
The first test I would do would be to edit mini.tcl in some minor way (change the spelling of a button) for example and see if that change happens when you start the program
The first test I would do would be to edit mini.tcl in some minor way (change the spelling of a button) for example and see if that change happens when you start the program
Please Log in or Create an account to join the conversation.
26 Apr 2011 20:13 #9348
by Vic
Replied by Vic on topic Re:How start write new GUI?
Now I create my small interface and it work
Yes, i name it 'mini.tcl'
But I found one bad thing:
( so bad thing is in axis GUI )
when I work in manual mode and want continuous movement, program ( and connected device ) move to some distance ( 8mm for me ) and stop movement ( i press button on interface and not stop pressing )
My code work like:
bind [set "button"] <ButtonPress-1> "emc_jog $axisToJog $jogSpeed "
bind [set "button"] <ButtonRelease-1> "emc_jog_stop $axisToJog"
Does anyone seen this behavior?
Yes, i name it 'mini.tcl'
But I found one bad thing:
( so bad thing is in axis GUI )
when I work in manual mode and want continuous movement, program ( and connected device ) move to some distance ( 8mm for me ) and stop movement ( i press button on interface and not stop pressing )
My code work like:
bind [set "button"] <ButtonPress-1> "emc_jog $axisToJog $jogSpeed "
bind [set "button"] <ButtonRelease-1> "emc_jog_stop $axisToJog"
Does anyone seen this behavior?
Please Log in or Create an account to join the conversation.
27 Apr 2011 05:00 #9358
by Vic
Replied by Vic on topic Re:How start write new GUI?
Now I found sring which run mini intarface in emc.in ( Am I right? ):
but not test it yet with my GUI name
case $EMCDISPLAY in
tkemc|mini)
# tkemc and mini are in the tcl directory, not the bin directory
if [ ! -x $EMC2_TCL_DIR/$EMCDISPLAY.tcl ] ; then
echo "Can't execute DISPLAY program $EMC2_TCL_DIR/$EMCDISPLAY.tcl $EMCDISPLAYARGS"
Cleanup
exit 1
fi
$EMC2_TCL_DIR/$EMCDISPLAY.tcl -ini "$INIFILE" $EMCDISPLAYARGS
result=$?
;;
but not test it yet with my GUI name
Please Log in or Create an account to join the conversation.
27 Apr 2011 09:42 #9365
by andypugh
Replied by andypugh on topic Re:How start write new GUI?
That looks like the error message you saw, and looks like an explanation.
Please Log in or Create an account to join the conversation.
Time to create page: 0.099 seconds