Re: [Emc-users] Two machine configurations -> g-code check

2024-04-28 Thread Stuart Stevenson
Tomaz,
Thanks for the video!

A possible solution:
Use a file naming suffix such as (.nc1), (.nc2).
Create a terminal script to read the file and choose the proper
configuration.

Another possible solution:
A switch on the rotary table to tell the control computer the table is in
place. (or a toggle switch on the control panel)
A terminal script sees the switch and chooses the proper configuration.

Another possible solution:
A rotary table switch. (or a toggle switch on the control panel)
The (.ini) configuration file sees the switch and chooses which
configuration section to read/omit to read.

I am having a hard time seeing a problem to solve.
If the rotary table is always connected then the machine will always run
the program.
I don't see a reason to have separate post processors.

Having a command in the .nc file seems too late.
The set up instructions should prescribe how the machine is set up.
If not, the problem is not solvable at the time of running the .nc file.

Just my two cents
regards
Stuart




I am having a hard time understanding the desire/need.






On Sat, Apr 27, 2024 at 10:39 AM Tomaz T.  wrote:

> That is correct, I don't use "B" axis on head/head in case/config where
> workpiece is rotating so in this config B axis is used for that and
> head/heads "B" axis is in this case/config as A axis and used only for
> homing. In g-code A is not programed in any case.
> If machine is used as classic 5-axis (with kinematics), then head/head is
> B/C and rotary (for workpiece) is removed from machine but not disconnected
> and is configured as A just for homing (I don't like to
> disconnect/connect cables many times)
>
> Here short video in 5-axis "mode":
> https://youtu.be/g2MSzw1MhYU?feature=shared=42
>
> > Tomaz,
> > I watched the video. Even at .25 speed I could not see the axis movement
> of
> > the head/head. I would like to see the head/head moving.
>
> > Do you sometimes run with the A axis rotary table unhooked from the
> control?
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Addressee is the intended audience.
If you are not the addressee then my consent is not given for you to read
this email furthermore it is my wish you would close this without saving or
reading, and cease and desist from saving or opening my private
correspondence.
Thank you for honoring my wish.

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-27 Thread andy pugh
On Sat, 27 Apr 2024 at 16:20, Tomaz T.  wrote:

> I did try your code for M100 (M100 is first line of g-code) but I guess
> something isn't ok, as there is no message to be seen
>

OK, so this time I have tested it, and it did take a bit of work to make it
work.

Here is the actual Python code that is working for me

#! /usr/bin/python3
import linuxcnc
import sys
s = linuxcnc.stat()
c = linuxcnc.command()
s.poll()
inifile = linuxcnc.ini(s.ini_filename)
print(inifile.find("EMC", "MACHINE"))
if inifile.find("EMC", "MACHINE")  != "MyCOnfig":
c.error_msg("This G-code is for a different config")
c.abort()



It might not work if /usr/bin/python3 isn't your Python version. I wanted
to use "#! /usr/bin/env python" but that wasn't working on my particular
machine.

First make sure that just typing ./M100 in the nc files directory works. It
will error-out, but should at least try to execute.

When that is working, then start LinuxCNC from the command line:

linuxcnc &

(The & means that you can carry on typing commands in the command line)

When LinuxCNC is loaded and homed then  you can try to run the M100 from
the command-line again

./M100

And this time it should work, or at least not error.

Then you can try running M100 from the command prompt, and that will work
if LinuxCNC can find the file.

If this all works, then you can finally try running the M100 from G-code.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-27 Thread Tomaz T .
That is correct, I don't use "B" axis on head/head in case/config where 
workpiece is rotating so in this config B axis is used for that and head/heads 
"B" axis is in this case/config as A axis and used only for homing. In g-code A 
is not programed in any case.
If machine is used as classic 5-axis (with kinematics), then head/head is B/C 
and rotary (for workpiece) is removed from machine but not disconnected and is 
configured as A just for homing (I don't like to disconnect/connect cables 
many times)

Here short video in 5-axis 
"mode":https://youtu.be/g2MSzw1MhYU?feature=shared=42

> Tomaz,
> I watched the video. Even at .25 speed I could not see the axis movement of
> the head/head. I would like to see the head/head moving.

> Do you sometimes run with the A axis rotary table unhooked from the control?


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-27 Thread Tomaz T .
I did try your code for M100 (M100 is first line of g-code) but I guess 
something isn't ok, as there is no message to be seen (at wrong config) and 
even at matched config, g-code is not executing forward no matter how many 
times I hit R...

> Did you try my M-code? If one PP inserts M100 and the other M101, then you
> should get what you want.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-27 Thread Stuart Stevenson
Tomaz,
I watched the video. Even at .25 speed I could not see the axis movement of
the head/head. I would like to see the head/head moving.

Do you sometimes run with the A axis rotary table unhooked from the control?


On Fri, Apr 26, 2024 at 3:09 PM Tomaz T.  wrote:

> Machine is 5-axis head-head, but now I have added rotary axis for
> workpiece turn which is also parallel to B axis, so in one configuration I
> use 5-axis knematics, for other I don't need to.
> Now I also have two post processors and I need to be careful to select the
> right one for the current job, and if I'm not, I need to prevent on machine
> that I run it on wrong configuration.
> Here you can see first tryout of added rotary axis, milling long speargun:
> https://youtu.be/Q-HBN2Rs0vE
> Configuration in my case is XYZABC as I need A in one or the other case to
> home "unused" axis.
>
> > How are the two machines configured?
> > Do you have XYZAB and XYZAC?
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Addressee is the intended audience.
If you are not the addressee then my consent is not given for you to read
this email furthermore it is my wish you would close this without saving or
reading, and cease and desist from saving or opening my private
correspondence.
Thank you for honoring my wish.

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-26 Thread andy pugh
On Fri, 26 Apr 2024 at 21:09, Tomaz T.  wrote:

>
> Now I also have two post processors and I need to be careful to select the
> right one for the current job, and if I'm not, I need to prevent on machine
> that I run it on wrong configuration.
>

Did you try my M-code? If one PP inserts M100 and the other M101, then you
should get what you want.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-26 Thread Tomaz T .
Machine is 5-axis head-head, but now I have added rotary axis for workpiece 
turn which is also parallel to B axis, so in one configuration I use 5-axis 
knematics, for other I don't need to.
Now I also have two post processors and I need to be careful to select the 
right one for the current job, and if I'm not, I need to prevent on machine 
that I run it on wrong configuration.
Here you can see first tryout of added rotary axis, milling long speargun: 
https://youtu.be/Q-HBN2Rs0vE
Configuration in my case is XYZABC as I need A in one or the other case to home 
"unused" axis.

> How are the two machines configured?
> Do you have XYZAB and XYZAC?



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-25 Thread Stuart Stevenson
How are the two machines configured?
Do you have XYZAB and XYZAC?


On Thu, Apr 25, 2024 at 5:03 PM andy pugh  wrote:

> On Tue, 23 Apr 2024 at 21:53, Tomaz T.  wrote:
>
> > I have created two configurations of LinuxCNC to be able to run may
> > machine in two different (mechanical) configurations. Now I would like to
> > prevent to run wrong g-code.
> > Is maybe there a custom M-code that I could use for that and it would
> > prevent further execution if it doesn't match with running configuration?
> >
>
> How would you decide which config the G-code was for?
>
>  If you want to put an M-code in the G-code, and that is what determines
> the target machine of the G-code, then maybe a custom M-code is the way, as
> you suggest.
>
> Something like M100 for one config, and M101 for the other.
>
> file: M100
>
> #! /usr/bin/env/ python
> import linuxcnc
> if inifile.find("EMC", "MACHINE")  != "LinuxCNC-HAL-SIM-AXIS":
> c = linuxcnc.command()
> c.error_msg("This G-code is for a different config")
> c.abort()
>
> Make the file executable, put it in the  nc_files directory, (or in the
> SUBROUTINE_PATH) and it will abort running the G-code when it runs M100 if
> the MACHINE entry in the active INI is not the specified string.
>
> Probably. I haven't tested it :-)
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is designed
> for the especial use of mechanical geniuses, daredevils and lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Addressee is the intended audience.
If you are not the addressee then my consent is not given for you to read
this email furthermore it is my wish you would close this without saving or
reading, and cease and desist from saving or opening my private
correspondence.
Thank you for honoring my wish.

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Two machine configurations -> g-code check

2024-04-25 Thread andy pugh
On Tue, 23 Apr 2024 at 21:53, Tomaz T.  wrote:

> I have created two configurations of LinuxCNC to be able to run may
> machine in two different (mechanical) configurations. Now I would like to
> prevent to run wrong g-code.
> Is maybe there a custom M-code that I could use for that and it would
> prevent further execution if it doesn't match with running configuration?
>

How would you decide which config the G-code was for?

 If you want to put an M-code in the G-code, and that is what determines
the target machine of the G-code, then maybe a custom M-code is the way, as
you suggest.

Something like M100 for one config, and M101 for the other.

file: M100

#! /usr/bin/env/ python
import linuxcnc
if inifile.find("EMC", "MACHINE")  != "LinuxCNC-HAL-SIM-AXIS":
c = linuxcnc.command()
c.error_msg("This G-code is for a different config")
c.abort()

Make the file executable, put it in the  nc_files directory, (or in the
SUBROUTINE_PATH) and it will abort running the G-code when it runs M100 if
the MACHINE entry in the active INI is not the specified string.

Probably. I haven't tested it :-)

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Two machine configurations -> g-code check

2024-04-23 Thread Tomaz T .
I have created two configurations of LinuxCNC to be able to run may machine in 
two different (mechanical) configurations. Now I would like to prevent to run 
wrong g-code.
Is maybe there a custom M-code that I could use for that and it would prevent 
further execution if it doesn't match with running configuration?


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users