M66 IF Request in Subroutine

More
2 years 11 months ago #286340 by MaHa
Replied by MaHa on topic M66 IF Request in Subroutine
g4 does only prevent axes from movement, for other, there is no effect. If you need a delay and increasing timeout does not work maybe try mcode,like:
Code:
#!/bin/bash sleep .5 exit 0

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

More
2 years 11 months ago #286345 by CNC_ANDI
My G4 P0.5 Works correct... the problem is the second if statement

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

More
2 years 11 months ago #286353 by rmu
Replied by rmu on topic M66 IF Request in Subroutine
so you say if you enter those commands in MDI it works but executing in one file it doesn't?

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

More
2 years 11 months ago - 2 years 11 months ago #286359 by CNC_ANDI
M66 P31 L3 Q1 ; check for drawbar
O104 if [#5399 LT 0]
(abort, failed drawbar not open)
O104 endif

M66 P29 L3 Q1 ; check for tool
O105 if [#5399 LT 0]
(abort, failed tool not clamped)
O105 endif

does not work. O105 dont write the parameter 5399 new

M66 P29 L3 Q1 ; check for tool
O105 if [#5399 LT 0]
(abort, failed tool not clamped)
O105 endif
In a single file it works

M66 P31 L3 Q1 ; check for drawbar
O104 if [#5399 LT 0]
(abort, failed drawbar not open)
O104 endif
In a single file it works
Last edit: 2 years 11 months ago by CNC_ANDI.

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

More
2 years 11 months ago #286363 by rmu
Replied by rmu on topic M66 IF Request in Subroutine
ok you have to describe in detail what the signal levels are when, what is expected and what is happening. i checked the thread, you only say "it works" or "it doesn't work".

i'm pretty sure the variable is written like it should, so something else is going on.

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

More
2 years 11 months ago - 2 years 11 months ago #286365 by CNC_ANDI
when O104 is not ok then -1 will be written
when O104 is ok then +1 will be written
when O105 is not ok +1 is written
when O105 is ok +1 is written

the 2 sensor are ok when it changes to high

sensor 1 high ok drawbar is open
sensor 2 high ok tool is clamped

but the drawbar (sensor 1) most be close before i can check sensor 2 (clamped tool)
Last edit: 2 years 11 months ago by CNC_ANDI.

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

Time to create page: 0.218 seconds
Powered by Kunena Forum