Problem with user defined MCode

More
08 Nov 2012 03:15 #26351 by REEEN
Hello,
I use user defined Mcodes (M101 and M102) to activate my pallet changer.

M101 is side 1 and M102 is side 2

This Mcodes wait for a pin to be true so I used the wait for script to manage the queue buster thing.

The Mcode script sets a start signal true and waits for another Pin to be true via wait for script and then the Mcode script sets the start signal back to false.

The Code works fine but sometimes the M101 or M102 Signals are not set to false and the Pallet changer does not work.

This only happens when I use it in a Gcode programme. It never happens when I use this mcodes as mdi command.

Can anyone explain why this happens and what I can do against that?

I think there's something with the M30 command. ...

Thank you very much!

Greets Rene

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

More
08 Nov 2012 08:32 #26355 by andypugh

This Mcodes wait for a pin to be true so I used the wait for script to manage the queue buster thing.


Can you be more specific about this "wait for script"? Where did you find it?

Perhaps you can attach the M101 and M102 files to the reply message?

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

More
08 Nov 2012 18:02 #26365 by Rick G
You may also want to attach a example of the G code that causes the problem.

Rick G

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

More
08 Nov 2012 20:19 #26368 by BigJohnT
Why don't you use Classicladder to run your pallet changer?

John

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

More
09 Nov 2012 02:26 - 09 Nov 2012 02:27 #26389 by REEEN
I come from Germany I'm a mechatronics trainee my exames are next week so I'm very busy this week, so I have no acces to my machine Iam going to post the Files and everything else on saturday.

I created a comp file to control my Pallet changer ( I don't mean the toolchanger).

Hal Pins are not accesible through Gcode so I defined this Mcodes to set the start signal and I used this wait for script to to set the start Signal back to false after turning the Pallet changer.

If this Signal is not set to false the switch in the comp file won't switch back to case 1 it will wait forever for the start pin to be set false first.

If I wouldn't wait for the Pin to be set true my Pallet changer would turn again and again and again...

This works for most of the time within Gcodes and it always works as Mdi command !


I'll gonna show you the files ;)


Some Information on my machine I have a Chiron Fz16 with a Table turning Pallet Changer like this one:

Chiron Fz16 running with Linuxcnc

The machine in the video is exactly the same. You can also see the Pallet changer in action in this video. It works with various sensors and pneumatic actors.

I'm going to post my Pallet changer component too.

But the variables and pins have german names and comments.

Thank you !

Greets REEEN
Last edit: 09 Nov 2012 02:27 by REEEN.

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

More
09 Nov 2012 07:19 #26392 by BigJohnT
I think I understand now what your doing... I do hope you do well on your exams next week.

John

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

More
11 Nov 2012 09:44 #26446 by andypugh

IHal Pins are not accesible through Gcode

A way round this is to link the pins to analog or digital G-code inputs.
www.linuxcnc.org/docs/html/gcode/m-code....ec:M66-Input-Control

It would be nice to be able to use something like #<hal.motion.spindle-speed-out> in the G-code though.
I have half a feeling that it has been done at least experimentally.

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

More
11 Nov 2012 17:36 #26451 by REEEN
It has been done read chapter 18-20:
link

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

Time to create page: 0.179 seconds
Powered by Kunena Forum