M100 to M199 User Defined Commands
- garymcrobertpdx
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 1
16 Jun 2012 06:36 #20986
by garymcrobertpdx
M100 to M199 User Defined Commands was created by garymcrobertpdx
Checked the instructions in the user manual for setting up for
M100 to M199 User Defined Commands. Copied the examples
and tweaked them for the port and pin I wanted.
M101 contains
#!/bin/sh
# file to turn on parport 1 pin 09 to open the collet closer
halcmd setp parport.1.pin-09-out True
exit 0
M102 contains
#!/bin/sh
# file to turn off parport 1 pin 09 to open the collet closer
halcmd setp parport.0.pin-09-out False
exit 0
These are executable and is in the correct directory
PROGRAM_PREFIX = /home/me/emc2/nc_files
But when I step through my test G code
G0 X-0.25 Y0.25
M0
M101
G0 X-0.5 Y0.5
M0
M102
G0 X-0.0 Y0.0
M2
HAL Meter shows no change on parport 1 pin 09
So what is missing???
M100 to M199 User Defined Commands. Copied the examples
and tweaked them for the port and pin I wanted.
M101 contains
#!/bin/sh
# file to turn on parport 1 pin 09 to open the collet closer
halcmd setp parport.1.pin-09-out True
exit 0
M102 contains
#!/bin/sh
# file to turn off parport 1 pin 09 to open the collet closer
halcmd setp parport.0.pin-09-out False
exit 0
These are executable and is in the correct directory
PROGRAM_PREFIX = /home/me/emc2/nc_files
But when I step through my test G code
G0 X-0.25 Y0.25
M0
M101
G0 X-0.5 Y0.5
M0
M102
G0 X-0.0 Y0.0
M2
HAL Meter shows no change on parport 1 pin 09
So what is missing???
Please Log in or Create an account to join the conversation.
16 Jun 2012 09:18 #20988
by ArcEye
Replied by ArcEye on topic Re:M100 to M199 User Defined Commands
Hi
Without your .hal file hard to guess.
Is parport.1.pin-09 an out pin, or was that second parport set up as "in"?
Is parport.1.pin-09 already linked to a signal?
See
regards
Without your .hal file hard to guess.
Is parport.1.pin-09 an out pin, or was that second parport set up as "in"?
Is parport.1.pin-09 already linked to a signal?
See
linuxcnc.org/docs/2.5/html/hal/basic_hal...setp_a_id_sub_setp_a
regards
Please Log in or Create an account to join the conversation.
16 Jun 2012 11:16 #20992
by andypugh
Replied by andypugh on topic Re:M100 to M199 User Defined Commands
M101 and M102 seem to be writing to different parports. I suspect that is an error,
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 1
16 Jun 2012 17:09 #21010
by garymcrobertpdx
Replied by garymcrobertpdx on topic Re:M100 to M199 User Defined Commands
Parport 1 is set for OUT and pin 09 is not linked to any other pin or signal.
Is there a posablity that I have to tell the Linux OS that it's OK to execute
these bash files?
Is there a posablity that I have to tell the Linux OS that it's OK to execute
these bash files?
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 1
16 Jun 2012 17:15 #21011
by garymcrobertpdx
Replied by garymcrobertpdx on topic Re:M100 to M199 User Defined Commands
YOU are absolutely RIGHT !!! What a blunder, I should not be writing this
stuff at 1:00 AM.
Thanks much
stuff at 1:00 AM.
Thanks much
Please Log in or Create an account to join the conversation.
Time to create page: 0.137 seconds