NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC Advanced Configuration M100 to M199 User Defined Commands

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: M100 to M199 User Defined Commands

M100 to M199 User Defined Commands 15 Jun 2012 23:36 #20986

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???
The administrator has disabled public write access.

Re:M100 to M199 User Defined Commands 16 Jun 2012 02:18 #20988

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1336
  • Thank you received: 102
  • Karma: 129
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
The administrator has disabled public write access.

Re:M100 to M199 User Defined Commands 16 Jun 2012 04:16 #20992

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4139
  • Thank you received: 141
  • Karma: 130
M101 and M102 seem to be writing to different parports. I suspect that is an error,
The administrator has disabled public write access.

Re:M100 to M199 User Defined Commands 16 Jun 2012 10:09 #21010

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?
The administrator has disabled public write access.

Re:M100 to M199 User Defined Commands 16 Jun 2012 10:15 #21011

YOU are absolutely RIGHT !!! What a blunder, I should not be writing this
stuff at 1:00 AM.

Thanks much
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.066 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.