M19 does not work in auto mode

More
10 Apr 2016 16:30 #73058 by perra_e
I have a for me strange problem.
M19 works fine in when I execute it in the MDI window, but in auto mode (runing a program) the spindle does not turn and no error messages.
The program I have tried is very simple:
M19 R180
M19 R0
M2

I don't even know where to start searching for this problem.

I use master branch from february this year.

Any suggestion would be apreciated!

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

More
11 Apr 2016 06:56 #73088 by Rick G
Have you tried with the Q parameter?
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m19

I have never used M19, but there has been some discussion of this in the past. From the docs it seems Q is necessary.

Rick G

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

More
11 Apr 2016 07:18 #73089 by perra_e
I have not tried that in auto mode, but it for sure make sense. I will try it tonight and it feels like it will solve the problem.

I report back when I have tested.
thanks!
--Per

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

More
11 Apr 2016 11:10 #73092 by cncbasher
check that any spindle encoder is in the correct mode and is switching in the correct sense i.e false to true when triggered
and not true and changing to false on triggering . if that makes sense

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

More
11 Apr 2016 11:51 #73095 by perra_e
If the Q parameter dosn't make it I will check that. It could be the problem because I have changed from the index puls on the servo to an external Proxy switch on the spindle throu an opto coupler. Index-enable works as expected, but I have not checket exact position.

And when I'm writing this I realise it must be wrong since I ground the index input pin (IDX5, TB4-pin23) on the 7i77 card when I got a signal from the Proxy switch. I read that the 7i77 has an internal pullup on this pin so grounding it on the input puls was most logical to me. I have to invert this.

Does any one know if a pull down of lets say 470 ohm on that pin to ground be sufficient to get it low ?
I will in that case connect +5V throu the optocopuler instead of grounding throu it.

--Per

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

More
11 Apr 2016 14:47 #73110 by andypugh

I have to invert this.


If it is just triggering in the wrong sense, then you can just use the inverted version of the input pin value.

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

More
12 Apr 2016 06:39 #73146 by perra_e
The Q parameter solved the problem. I have to start the spindle once before M19 works (both MDI- and auto-mode), but that is no big deal and can be solved during startup.

I didn't have time to check on the index signal. It looks like I shall use: setp hm2_7i77.0.encoder.05.index-invert 0, but since it works I can probably leave it as it is.

--Per

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

More
12 Apr 2016 09:22 #73147 by andypugh

The Q parameter solved the problem. I have to start the spindle once before M19 works (both MDI- and auto-mode), but that is no big deal and can be solved during startup.


For M19 to work the spindle needs to be "homed" to the encoder index.

I do have this on my list of thigns that it would be nice to do, ie add spindles to theaxis homing sequence. Unfortunately this is one of those jobs that grows in scope when you look at it. You end up having to create parameter storage for spindle homing data analogous to axis data, and then you start down the path of multiple-spindle support and suddenly it isn't a simple change any more.

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

More
12 Apr 2016 09:58 #73149 by perra_e
Yes, thats right, and quite obvious if one think.

I will try something like you have described in this post . I have used this with the mux2 already for switching between position and velocity mode. Or if the G33 works in startup code I might use that.

--Per

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

Time to create page: 0.094 seconds
Powered by Kunena Forum