[solved]halui.program.run slow restart

More
19 Sep 2014 02:46 - 19 Sep 2014 15:45 #51319 by bkt
for me pik&place deltarobot project I thought of two different modes of operation: the easy way is to use a gcode, automatically rewriting it at every new item, and run it using halui.program.run. The hard way is send directly in hal all quotes at axis.n.motor-pos-cmd from a .comp that compute everythings.

So now I work around the use of halui.program.run way .... the work is finish, but I find that there is a long pause between the end of program and the relaunch of the program itself.

Keep in mind that to speed things up I cereate a component that rewrites a part of the gcode for each new position of withdrawal of pik & place and then run the program via a pin connected to halui.program.run out of mypik.hal .

all between the end of a program and its restart pass 0.2-0.4 sec ... a long time for me .... I tried to remove the part of the component that rewrites the gcode for verification . But times remain the same .

you can do something to shorten them ?

the gcode are around 20 rows .

The hard way..... compute and send is not a problem..... but send to axis.n.motor-pos-cmd is the only way?
Last edit: 19 Sep 2014 15:45 by bkt.

Please Log in or Create an account to join the conversation.

More
19 Sep 2014 03:13 #51322 by cncbasher
post your project code as an attachment , and lets see what can be done

Please Log in or Create an account to join the conversation.

More
19 Sep 2014 03:42 #51325 by newbynobi
@k1

What GUI are you using? Axis is checking the code before executing it, may be that is the delay.

Have you tried sending the commands as MDI instead of using a program? Could be done with a piece of python.
Or using linuxcncrsh

Norbert
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
19 Sep 2014 12:46 #51328 by bkt
Replied by bkt on topic halui.program.run slow restart
yes I use axis GUI.....

Have you tried sending the commands as MDI instead of using
a program? Could be done with a piece of python.
Or using linuxcncrsh

I can send 20 row of gcode in a single axis-remote --mdi command? but I read in somewhere that is no a better choice ... is not a truth? I need have G64 in my gcode ....

and using linuxcncrsh ...... I can make my work simply put in run my program without delay before the start? How can do it?

Please Log in or Create an account to join the conversation.

More
19 Sep 2014 16:04 #51333 by bkt
Replied by bkt on topic halui.program.run slow restart
I'm a fool ..... maybe I should get more sleep at night ... obviusly is possible run 200xxxx row gcode in mdi mode ..... if I call the program like a subroutine in ini file
[HALUI]
MDI_COMMAND = o<myprogram> call [xx] [xx]   /* <------------- halui.mdi-command-00*/
MDI_COMMAND = M147   /* <------------- halui.mdi-command-01*/
.......

it is also possible to say that a file.comp a subroutine in gcode is in operation...

the easy way to do ... example M120 for signal up and M121 for signal down

#!/bin/bash

halcmd setp mycomponent.mysignal1 1
#M120 set up mysignal1

exit 0



#!/bin/bash

halcmd setp mycomponent.mysignal1 0
#M121 set down mysignal1

exit 0


than in mycomponent.comp
pin in bit mysignal1 = 0
;;

.....

if (mysignal1){
/*do something*/
}


In this way is possible to run a soubroutine from mycomponent.comp using halui.mdi-command-xx in hal file connecting it to signal out from mycomponent and in the same time control if the soubroutine is in run.

THE FIRST QUESTION OF POST: using this solution I cancel the delay.
I wrote this as a punishment for having opened a post without really need. :laugh: :laugh: :laugh:

@newbynobi and @cncbasher thanks for the time spent

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum