Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-22 Thread Rando Sauvage
2012/6/21, John Kasunich jmkasun...@fastmail.fm:

 On Thu, Jun 21, 2012, at 04:11 PM, Rando Sauvage wrote:

 2012/6/21, John Kasunich jmkasun...@fastmail.fm:
 
  On Thu, Jun 21, 2012, at 02:19 PM, Rando Sauvage wrote:
 
  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 ...
 
  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 ...
 
  As Andy has already pointed out, you could setp the input pin
  of the OR gate:
halcmd setp or2.0.in1 1;
 
  You could also retain the readability benefits of the named
  signal by using the sets command, which lets you set a signal
  instead of a pin:
halcmd sets pause-console 1;
 
  --
John Kasunich
jmkasun...@fastmail.fm
 
 Thanks both for your answers.

 I am quite sure I tried halcmd setp or2.0.in1 1; and it didn't work
 (it failed with a message pin already in use or something like
 this).

 Wasn't aware of the existence of the sets command, great!

 I will get a try again in a couple of hours and let you know.

 Xavier


 Oh, right - it won't let you set the pin because there is a signal
 connected to it.  If you delete the line net pause-console or2.0.in1
 then the pin would be free, and setp would work.  But personally
 I would keep the signal and use sets.  That way you have a nice
 readable signal name when you are studying the HAL file five
 years from now.


You know what ? You are 100% right here ! I have tested the 2
solutions, and yes, both work.

To sum-up the two solutions:
1) *** using setp ***

- custom.hal contains:
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 programPause = or2.0.out

- and my emc_pause script is modified as follow (we address directly
the second input of the OR gate):
#!/bin/sh
halcmd setp or2.0.in1 1;
sleep 0.1
halcmd setp or2.0.in1 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.


2) *** better solution: use sets (set signal) ***

- custom.hal contains:
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

- and the beginning of my emc_pause script is modified as follow (this
time we address the signal that is connected to one of the input of
the OR gate):
#!/bin/sh
halcmd sets pause-console 1;
sleep 0.1
halcmd sets pause-console 0;
sleep 1
...

Obviously, I did the same for the emc_resume script / button. The only
difference is that we declare two OR gates (loadrt or2 count=2) and
the second one is addressed with the name or2.1.

Note for those who are looking for more info: the html documentation
doesn't contain all the commands (eg I think that sets is missing), so
take a look at the man page of halcmd (man halcmd).


Thanks again for your help :-)

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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-21 Thread Rando Sauvage
2011/4/11, Rando Sauvage rando.sauv...@gmail.com:
 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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-21 Thread andy pugh
On 21 June 2012 13:19, Rando Sauvage rando.sauv...@gmail.com wrote:

 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 .

Your script could use
halcmd setp or2.0.in0 1
ie, it can drive the input pin of the or2 function directly as long as
nothing is wired to that pin.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-21 Thread John Kasunich


On Thu, Jun 21, 2012, at 02:19 PM, Rando Sauvage wrote:

 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 ...

 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 ...

As Andy has already pointed out, you could setp the input pin
of the OR gate:
  halcmd setp or2.0.in1 1;

You could also retain the readability benefits of the named
signal by using the sets command, which lets you set a signal
instead of a pin:
  halcmd sets pause-console 1;

-- 
  John Kasunich
  jmkasun...@fastmail.fm


--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-21 Thread Rando Sauvage
Thanks both for your answers.

I am quite sure I tried halcmd setp or2.0.in1 1; and it didn't work
(it failed with a message pin already in use or something like
this).

Wasn't aware of the existence of the sets command, great!

I will get a try again in a couple of hours and let you know.

Xavier

2012/6/21, John Kasunich jmkasun...@fastmail.fm:


 On Thu, Jun 21, 2012, at 02:19 PM, Rando Sauvage wrote:

 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 ...

 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 ...

 As Andy has already pointed out, you could setp the input pin
 of the OR gate:
   halcmd setp or2.0.in1 1;

 You could also retain the readability benefits of the named
 signal by using the sets command, which lets you set a signal
 instead of a pin:
   halcmd sets pause-console 1;

 --
   John Kasunich
   jmkasun...@fastmail.fm


 --
 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
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
http://rando-sauvage.info

--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2012-06-21 Thread John Kasunich


On Thu, Jun 21, 2012, at 04:11 PM, Rando Sauvage wrote:
 Thanks both for your answers.
 
 I am quite sure I tried halcmd setp or2.0.in1 1; and it didn't work
 (it failed with a message pin already in use or something like
 this).

Oh, right - it won't let you set the pin because there is a signal
connected to it.  If you delete the line net pause-console or2.0.in1
then the pin would be free, and setp would work.  But personally
I would keep the signal and use sets.  That way you have a nice
readable signal name when you are studying the HAL file five 
years from now.

 
 Wasn't aware of the existence of the sets command, great!
 
 I will get a try again in a couple of hours and let you know.
 
 Xavier
 
 2012/6/21, John Kasunich jmkasun...@fastmail.fm:
 
 
  On Thu, Jun 21, 2012, at 02:19 PM, Rando Sauvage wrote:
 
  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 ...
 
  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 ...
 
  As Andy has already pointed out, you could setp the input pin
  of the OR gate:
halcmd setp or2.0.in1 1;
 
  You could also retain the readability benefits of the named
  signal by using the sets command, which lets you set a signal
  instead of a pin:
halcmd sets pause-console 1;
 
  --
John Kasunich
jmkasun...@fastmail.fm
 
 
  --
  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
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users
 
 
 
 -- 
 http://rando-sauvage.info
 
 --
 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
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users
-- 
  John Kasunich
  jmkasun...@fastmail.fm


--
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-12 Thread Ed Nisley
On Mon, 2011-04-11 at 09:51 -0700, Kirk Wallace wrote:
 a page on the wiki covering the making of bellows.

For those of us with Sherline mills and no flood coolant, plain old
paper works surprisingly well. You don't form a deep emotional
attachment to it, so throwing it out when it gets really crusty doesn't
hurt at all...

http://softsolder.com/2010/02/26/improved-sherline-way-bellows/

-- 
Ed
http://softsolder.com



--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-12 Thread gene heskett
On Tuesday, April 12, 2011 08:26:12 PM Ed Nisley did opine:

 On Mon, 2011-04-11 at 09:51 -0700, Kirk Wallace wrote:
  a page on the wiki covering the making of bellows.
 
 For those of us with Sherline mills and no flood coolant, plain old
 paper works surprisingly well. You don't form a deep emotional
 attachment to it, so throwing it out when it gets really crusty doesn't
 hurt at all...
 
 http://softsolder.com/2010/02/26/improved-sherline-way-bellows/

Thanks Ed.  If I can figure out how to tape it to the well soaked with 
various oils metal on my micromill on steroids, which does have a mister 
head when I load the reservoir, it will come in quite handy.  I have some 
bellows material on hand, but haven't really set down with a sharp pair of 
scissors and a tape measure  figured out how much I need and where.  First 
addition I suspect would be some sort of a small bracket for the rear of 
the saddle that wouldn't restrict its toward the post motion if it can be 
helped, just to get a flat surface to lay a strip on  sandwich the 
material in place.

This should be fun.  ;-)

-- 
Cheers, Gene
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
http://tinyurl.com/ddg5bz
http://www.cantrip.org/gatto.html
The value of marriage is not that adults produce children, but that 
children 
produce adults.
-- Peter De Vries

--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-11 Thread Rando Sauvage
2011/4/7 Stephen Wille Padnos spad...@sover.net:

 Rando Sauvage wrote:
 Hi,


 I am an EMC2 user and currently I am doing some pieces which take
 several hours to mill.
 So, I would like to run my CNC while I am not at home (eg while I am
 at work), but still want to take an eye on my CNC through an IP camera
 + *get the possibility to remote control the AXIS GUI* (this is the
 important part ;-))

 Basically what I would need is:
 1) Remotely pause and continue a running GCode program.

 2) While the program is paused, I need to be able to stop the spindle
 and the lube (these one are important because eg if the mill broke, I
 need to stop the spindle ASAP. but I don't know if it is possible
 since I can't stop the spindle from AXIS while a program is paused)

[...]
 You don't need any IP cameras or other hoo-ha to remote control EMC.  Of
 course, if you want to see the actual machine, an IP camera is a
 reasonable way of doing that.

 EMC has been designed from the start to allow multiple user interfaces,
 which can be on a remote machine if you like.  This is in addition to
 the option of running a remote X session, or remote desktop software
 such as VNC.

 The NML messaging system allows you to set up channels as being remote.
 I believe there are sample server.nml and client.nml files in the sample
 configs directory (maybe in common/ or something).

 You can run AXIS on the EMC machine and start a program running.
 When you get to work or wherever, fire up Axis, tkEMC, mini, emcrsh -
 whatever, and if the NML file is configured correctly, you will connect
 to the remote machine.  Both UIs will be running, and either could take
 control - if someone at home smells smoke and hits ESC on that keyboard,
 the machine will stop.  You will see the change in machine state on your
 remote UI.  Similarly, you can hit ESC to stop the machine, and the UI
 on the PC controlling the machine will show what you have done.

 There are a couple of caveats to this:
 1) I'm pretty sure that nothing bad happens, but you should experiment
 with running a part and then starting another UI.  Specifically, try
 AXIS - I don't know whether it will happily connect to a running EMC or
 if it will load its splash file and stop the machine.
 2) Specific to AXIS, you would need a command-line option to disable the
 creation of HAL pins on the remote control PC.  That machine isn't
 likely to (and doesn't need to) run an RT kernel, and besides you don't
 want HAL running on your machine at work, since it's not connected to
 the machine anyway.
 3) File handling is a little weird with remote machines.  You need to
 have the loaded file available at the same path on all machines you want
 to run UIs on.  NML doesn't transfer the file, and the status buffer has
 the full path name to the file, so if you want to see the code as it's
 executing, you'll need to make sure you have the same file in the same
 location on the remote PC.

[...]

Hi everyone,

Sorry for the late reply and thanks a lot for your detailed answers !

I am not a big fan of VNC that I consider of a last resort solution.

Running 2 UI in parallel is a really interesting and powerful feature. I
have not tested yet, but I could run a light UI in parallel to Axis.
According to what you explained to me, I think it will be simpler to run
this UI on the EMC computer and export the display through SSH (as you
proposed). This solution also has the advantage of not needing any software
installation at work.

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.

And the *emc_resume* script (there are some delays for the coolant flood and
the spindle to restart):
#!/bin/sh
halcmd setp halui.flood.on 1;
sleep 0.1
halcmd setp halui.flood.on 0;
sleep 3
halcmd setp halui.spindle.start 1;
sleep 0.1
halcmd setp halui.spindle.start 0;
sleep 3
halcmd setp halui.program.resume 1;
sleep 0.1
halcmd setp halui.program.resume 0;
echo Machine restarted.


Last is a picture of my machine controlled by EMC2:
http://www.usinages.com/files/t_img_7895_vue_ensemble_147.jpg

Thanks again,
Xavier
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-11 Thread Igor Chudov
Awesome commands to pause and resume, I saved them for later use!!!

The joystick on the wood router is also a nice touch. I use a joypad.

i


On Mon, Apr 11, 2011 at 7:35 AM, Rando Sauvage rando.sauv...@gmail.comwrote:

 2011/4/7 Stephen Wille Padnos spad...@sover.net:
 
  Rando Sauvage wrote:
  Hi,
 
 
  I am an EMC2 user and currently I am doing some pieces which take
  several hours to mill.
  So, I would like to run my CNC while I am not at home (eg while I am
  at work), but still want to take an eye on my CNC through an IP camera
  + *get the possibility to remote control the AXIS GUI* (this is the
  important part ;-))
 
  Basically what I would need is:
  1) Remotely pause and continue a running GCode program.
 
  2) While the program is paused, I need to be able to stop the spindle
  and the lube (these one are important because eg if the mill broke, I
  need to stop the spindle ASAP. but I don't know if it is possible
  since I can't stop the spindle from AXIS while a program is paused)
 
 [...]
  You don't need any IP cameras or other hoo-ha to remote control EMC.  Of
  course, if you want to see the actual machine, an IP camera is a
  reasonable way of doing that.
 
  EMC has been designed from the start to allow multiple user interfaces,
  which can be on a remote machine if you like.  This is in addition to
  the option of running a remote X session, or remote desktop software
  such as VNC.
 
  The NML messaging system allows you to set up channels as being remote.
  I believe there are sample server.nml and client.nml files in the sample
  configs directory (maybe in common/ or something).
 
  You can run AXIS on the EMC machine and start a program running.
  When you get to work or wherever, fire up Axis, tkEMC, mini, emcrsh -
  whatever, and if the NML file is configured correctly, you will connect
  to the remote machine.  Both UIs will be running, and either could take
  control - if someone at home smells smoke and hits ESC on that keyboard,
  the machine will stop.  You will see the change in machine state on your
  remote UI.  Similarly, you can hit ESC to stop the machine, and the UI
  on the PC controlling the machine will show what you have done.
 
  There are a couple of caveats to this:
  1) I'm pretty sure that nothing bad happens, but you should experiment
  with running a part and then starting another UI.  Specifically, try
  AXIS - I don't know whether it will happily connect to a running EMC or
  if it will load its splash file and stop the machine.
  2) Specific to AXIS, you would need a command-line option to disable the
  creation of HAL pins on the remote control PC.  That machine isn't
  likely to (and doesn't need to) run an RT kernel, and besides you don't
  want HAL running on your machine at work, since it's not connected to
  the machine anyway.
  3) File handling is a little weird with remote machines.  You need to
  have the loaded file available at the same path on all machines you want
  to run UIs on.  NML doesn't transfer the file, and the status buffer has
  the full path name to the file, so if you want to see the code as it's
  executing, you'll need to make sure you have the same file in the same
  location on the remote PC.
 
 [...]

 Hi everyone,

 Sorry for the late reply and thanks a lot for your detailed answers !

 I am not a big fan of VNC that I consider of a last resort solution.

 Running 2 UI in parallel is a really interesting and powerful feature. I
 have not tested yet, but I could run a light UI in parallel to Axis.
 According to what you explained to me, I think it will be simpler to run
 this UI on the EMC computer and export the display through SSH (as you
 proposed). This solution also has the advantage of not needing any software
 installation at work.

 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.

 And the *emc_resume* script (there are some delays for the coolant flood
 and
 the spindle to restart):
 #!/bin/sh
 halcmd setp halui.flood.on 1;
 sleep 0.1
 halcmd setp halui.flood.on 0;
 sleep 3
 halcmd setp halui.spindle.start 1;
 sleep 0.1
 halcmd setp halui.spindle.start 0;
 sleep 3
 halcmd setp halui.program.resume 1;
 sleep 0.1
 halcmd setp halui.program.resume 0;
 echo Machine restarted.


 Last is a picture of my machine controlled by EMC2:
 http://www.usinages.com/files/t_img_7895_vue_ensemble_147.jpg

 Thanks again,
 Xavier

 

Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-11 Thread Igor Chudov
Xavier.

I love your approach.

I rewrote my CNC functions (to which I added your great functions) to make
it easier to read and enhance in the future.

Here they are.

CNC_PressButton() {
local BUTTON=$1
local SLEEP=0.1


halcmd setp $BUTTON 1
sleep $SLEEP
halcmd setp $BUTTON 0
}

CNC_Estop() {
CNC_PressButton halui.estop.activate
echo Machine E-stopped.
}

alias estop=CNC_Estop

CNC_Pause() {
CNC_PressButton halui.program.pause
CNC_PressButton halui.spindle.stop
CNC_PressButton halui.flood.off
echo Machine paused.
}

CNC_Resume() {
CNC_PressButton halui.flood.on
CNC_PressButton halui.spindle.start

# Give time so that coolant starts running
# and spindle comes up to speed.
sleep 10

CNC_PressButton halui.program.resume
echo Machine restarted.
}
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-07 Thread Igor Chudov
I use a remote IP camera.

Screenshot of it is here:

http://igor.chudov.com/tmp/Netcam.png

http://igor.chudov.com/tmp/Netcam.pngComments below:

On Thu, Apr 7, 2011 at 11:53 AM, Rando Sauvage rando.sauv...@gmail.comwrote:

 I am an EMC2 user and currently I am doing some pieces which take
 several hours to mill.
 So, I would like to run my CNC while I am not at home (eg while I am
 at work), but still want to take an eye on my CNC through an IP camera
 + *get the possibility to remote control the AXIS GUI* (this is the
 important part ;-))


I do the same thing. I also can monitor this netcam on my Android cell
phone.


 Basically what I would need is:
 1) Remotely pause and continue a running GCode program.


I have only one command, Estop, implemented as a shell function.

If I log on to the CNC machine and type estop, the machine goes into
estop.

BLING::~/public_html/tmp==declare -f estop
estop ()
{
halcmd setp halui.estop.activate 1;
sleep 0.1;
halcmd setp halui.estop.activate 0;
echo Machine E-stopped.
}

It should give you an idea how to pause.



 2) While the program is paused, I need to be able to stop the spindle
 and the lube (these one are important because eg if the mill broke, I
 need to stop the spindle ASAP. but I don't know if it is possible
 since I can't stop the spindle from AXIS while a program is paused)


You can probably do this with halcmd. But I think that if end mill broke,
estop is the only reasonable alternative.


 I did some research but I am a bit lost ... I found that maybe I could
 use axis-remote or emcrsh ?
 Which one is should I use ? (remember that I want to keep axis running
 on my EMC2 machine).
 Can someone show me what to do to pause a running program ? (eg
 axis-remote --mdi ?)



Not sure how to pause, but see my above estop function.


 Note:
 - I have a SSH connection to the EMC2 computer
 - I could possibly wire a relay on the IP camera to control Axis but
 that's not my preferred solution and I don't even know If I can pause
 EMC2 from an external contact ?


You surely can pause EMC2 from a external contact, but you can do a lot with
shell and halcmd also.

i
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-07 Thread andy pugh
On 7 April 2011 17:53, Rando Sauvage rando.sauv...@gmail.com wrote:

 So, I would like to run my CNC while I am not at home (eg while I am
 at work), but still want to take an eye on my CNC through an IP camera
 + *get the possibility to remote control the AXIS GUI* (this is the
 important part ;-))

I do this with VNC.

-- 
atp
Torque wrenches are for the obedience of fools and the guidance of wise men

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-07 Thread Stephen Wille Padnos

Rando Sauvage wrote:
 Hi,


 I am an EMC2 user and currently I am doing some pieces which take
 several hours to mill.
 So, I would like to run my CNC while I am not at home (eg while I am
 at work), but still want to take an eye on my CNC through an IP camera
 + *get the possibility to remote control the AXIS GUI* (this is the
 important part ;-))

 Basically what I would need is:
 1) Remotely pause and continue a running GCode program.

 2) While the program is paused, I need to be able to stop the spindle
 and the lube (these one are important because eg if the mill broke, I
 need to stop the spindle ASAP. but I don't know if it is possible
 since I can't stop the spindle from AXIS while a program is paused)

 I did some research but I am a bit lost ... I found that maybe I could
 use axis-remote or emcrsh ?
 Which one is should I use ? (remember that I want to keep axis running
 on my EMC2 machine).
 Can someone show me what to do to pause a running program ? (eg
 axis-remote --mdi ?)

You don't need any IP cameras or other hoo-ha to remote control EMC.  Of 
course, if you want to see the actual machine, an IP camera is a 
reasonable way of doing that.

EMC has been designed from the start to allow multiple user interfaces, 
which can be on a remote machine if you like.  This is in addition to 
the option of running a remote X session, or remote desktop software 
such as VNC.

The NML messaging system allows you to set up channels as being remote.  
I believe there are sample server.nml and client.nml files in the sample 
configs directory (maybe in common/ or something).

You can run AXIS on the EMC machine and start a program running.
When you get to work or wherever, fire up Axis, tkEMC, mini, emcrsh - 
whatever, and if the NML file is configured correctly, you will connect 
to the remote machine.  Both UIs will be running, and either could take 
control - if someone at home smells smoke and hits ESC on that keyboard, 
the machine will stop.  You will see the change in machine state on your 
remote UI.  Similarly, you can hit ESC to stop the machine, and the UI 
on the PC controlling the machine will show what you have done.

There are a couple of caveats to this:
1) I'm pretty sure that nothing bad happens, but you should experiment 
with running a part and then starting another UI.  Specifically, try 
AXIS - I don't know whether it will happily connect to a running EMC or 
if it will load its splash file and stop the machine.
2) Specific to AXIS, you would need a command-line option to disable the 
creation of HAL pins on the remote control PC.  That machine isn't 
likely to (and doesn't need to) run an RT kernel, and besides you don't 
want HAL running on your machine at work, since it's not connected to 
the machine anyway.
3) File handling is a little weird with remote machines.  You need to 
have the loaded file available at the same path on all machines you want 
to run UIs on.  NML doesn't transfer the file, and the status buffer has 
the full path name to the file, so if you want to see the code as it's 
executing, you'll need to make sure you have the same file in the same 
location on the remote PC.

Remote X is an option, but it's probably not the best in the case you're 
talking about.  You could remote into the box and run another UI 
locally, you'd just see the window on the remote workstation.  This is 
equivalent to running two UIs on the same PC at the same time, so if you 
experiment with that on the EMC machine, it's the same as far as EMC is 
concerned when you access the UI from work.

VNC is the heaviest protocol for this, but has the advantage of running 
only one instance of the UI, and also requiring no configuration of EMC.

Hope this helps
-Steve


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-07 Thread Kirk Wallace
On Thu, 2011-04-07 at 18:53 +0200, Rando Sauvage wrote:
... snip
 So, I would like to run my CNC while I am not at home (eg while I am
 at work), but still want to take an eye on my CNC through an IP camera
 + *get the possibility to remote control the AXIS GUI* (this is the
 important part ;-))
... snip

In case it might help, here is a link to some remote control and
multi-interface information:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Running_Multiple_User_Interfaces 

This page really needs to be updated, but might provide be a decent start.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Monitor and control my CNC through an IP camera ?

2011-04-07 Thread Kirk Wallace
On Thu, 2011-04-07 at 10:54 -0700, Kirk Wallace wrote:
... snip
 In case it might help, here is a link to some remote control and
 multi-interface information:
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Running_Multiple_User_Interfaces 
 
 This page really needs to be updated, but might provide be a decent start.

Here are a couple more links:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EMCDisplayOnWindows 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Emcrsh 

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users