2011/4/11, Rando Sauvage <[email protected]>:
> For now, I finally achieved to remote control my machine by using "halcmd"
> as suggested too. I have done 2 scripts called emc_pause & emc_resume. Both
> scripts can pause & resume a running program, and also deals with the
> spindle & the coolant flood (that's great!).
> Here is the *emc_pause* script:
> #!/bin/sh
> halcmd setp halui.program.pause 1;
> sleep 0.1
> halcmd setp halui.program.pause 0;
> sleep 1
> halcmd setp halui.spindle.stop 1;
> sleep 0.1
> halcmd setp halui.spindle.stop 0;
> halcmd setp halui.flood.off 1;
> sleep 0.1
> halcmd setp halui.flood.off 0;
> echo Machine paused.
>

Hello,

You may remember that I use the above script to pause emc2 (and stop
spindle / coolant) from Linux command line (remote control of my
machine).

I need again your help: today I have mapped the program pause to one
of my joystick button with this instruction in custom.hal file:
net programPause input.0.btn-thumb => halui.program.pause

It is working fine, but, my above script called "emc_pause" doesn't
work anymore, it fails with the following error "<commandline>:0: pin
'halui.program.pause' is connected to a signal"


Question: how to connect 'halui.program.pause' to both my joystick
button AND my external script called "emc_pause" ?


I have tried to do a logical "OR" with hal components in my custom.hal
file, but it doesn't works since my "emc_pause" script doesn't address
a real "pin" anymore ...

Below is my attempt (placed in custom.hal):
"
loadrt or2 count=1
addf or2.0 servo-thread

net programPause => halui.program.pause

net pause-joystick or2.0.in0 <= input.0.btn-thumb
net pause-console or2.0.in1
net programPause <= or2.0.out
"

I have then modified my emc_pause script as follow:
"halcmd setp pause-console 1;"
But it fails with this error: "<commandline>:0: parameter or pin
'pause-console' not found", because pause-console is a signal name
with no pin associated ...

Please help !

Thanks,
Xavier

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to