I/O with M64 and M65

More
16 Nov 2010 17:23 #5353 by sambuls
I/O with M64 and M65 was created by sambuls
Hello,

I'm trying to set a digital output via gcode.
In the stepconfig wizard I've set Pin 8 as 'Digital out 0'

When I restart Axis and execute M64 P0 of M65 P0 noting shows up on my voltage meter witch
is connected to ground and pin8.

What am I doing wrong?

This is my .hal file
# Generated by stepconf at Tue Nov 16 18:05:29 2010
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out  "
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt abs count=1

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf abs.0 servo-thread
net spindle-cmd <= motion.spindle-speed-out
net dout-00 <= motion.digital-out-00
net dout-01 <= motion.digital-out-01
net dout-02 <= motion.digital-out-02
net dout-03 <= motion.digital-out-03

net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net dout-00 => parport.0.pin-08-out
net dout-01 => parport.0.pin-09-out
net dout-02 => parport.0.pin-14-out
net dout-03 => parport.0.pin-16-out




setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Thanks

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

More
16 Nov 2010 17:36 #5354 by BigJohnT
Replied by BigJohnT on topic Re:I/O with M64 and M65
Monitor the parallel port pins with HAL Configuration Watch window to see if the code is changing the state of the pins.

www.linuxcnc.org/docview/html//hal_basic_hal.html

Your hal file looks ok after a quick glance.

John

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

More
19 Nov 2010 07:04 #5426 by sambuls
Replied by sambuls on topic Re:I/O with M64 and M65
The pins on the female connector have an other arrangement than the mail connector.
I was measuring on the wrong pins...

Thanks for your help!

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

Time to create page: 0.090 seconds
Powered by Kunena Forum