× Forum Header

Parallel port config? - probably

03 Apr 2018 15:27 - 03 Apr 2018 16:12 #108312 by Gr8funTargets
Hi all
I've been enjoying LinuxCNC for some years now.
My previous version was 2.6.x(I think) but due to a hardware fault I lost the motherboard and monitor, so now I'm rebuilding.
I have Gigabyte E3800n motherboard, as it has a built in parallel port
In the BOIS, the parallel port is set to SPP, but gave no indication what address it was on...

I've installed a fresh copy of linuxCNC 2.7.12 and all appeared to be going well - no errors.
I ran through StepConf with the settings attached (these were taken from the previous machine)
When all is saved and I start the machine I get no movement at all.
When I clicked the "test this axis" button I get the error attached - This did not worry me, as this feature did not work in my previous installation.

I have done some digging and wanted to start at the start, apparently lshw should tell me the hardware attached, but alas, I get a 'command not found', even with a "sudo" but I do get this...

lsmod | grep parport
parport_pc 21896 1
parport 35208 3 lp,ppdev,parport_pc

Any advice on how to move forward would be greatly received

Thanks in advance
Last edit: 03 Apr 2018 16:12 by Gr8funTargets.

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

03 Apr 2018 16:24 #108321 by Todd Zuercher
From the command line you could try this command to try to find the parallel port address.
cat /proc/ioports |grep parport

If nothing shows up the parallel port is probably disabled some how.

Do you have a backup copy of your old configuration. It should work with the new version of Linuxcnc with only minor modifications. (one line of hal code needs removed or commented out)
The following user(s) said Thank You: COFHAL

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

03 Apr 2018 17:53 #108328 by Gr8funTargets
Thanks for your prompt reply!
I really appreciate it.

From cat /proc/ioports |grep parport I get
0378-037a : parport0

..and from dmesg |grep parp I get
[ 11.100374] parport_pc 00:06: reported by Plug and Play ACPI
[ 11.100427] parport0: PC-style at 0x378, irq 5 [PCSPP,TRISTATE]
[ 20.127729] lp0: using parport0 (interrupt-driven).

and lsmod | grep parp provides..
parport_pc 21896 1
parport 35208 3 lp,ppdev,parport_pc

Which makes the port look promising.
Do I need to unload the parport_pc module or something?

I DO have a backup of the configs. What needs modifying?
Would it help to attach the files?


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

03 Apr 2018 18:07 #108330 by Gr8funTargets
Interestingly, when I run the command loadrt hal_parport cfg="0x378"
I'm informed the "loadrt: command not found"

Am I reading legacy documentation?

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

03 Apr 2018 19:16 #108333 by Todd Zuercher
Where did you type loadrt hal_parport cfg="0x378"?
(It won't work just from the command line, you would first need to start Halrun to get a halcmd prompt.)

To use your 2.6 parallel port config with 2.7 the only modification I think you need to make is to comment out or delete this line in your old hal file.
loadrt probe_parport

Why don't you give the old configs a try (with the nessisary modification) and if that still doesn't work, We will need to look more carefully at the error messages that are given when Linuxcnc fails to start.
The following user(s) said Thank You: Gr8funTargets

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

03 Apr 2018 20:29 #108336 by Gr8funTargets
Thanks Todd
I will be able to test it tomorrow.

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

04 Apr 2018 08:20 #108362 by Gr8funTargets
Morning all
I've copied the file Marvin.stepconf and the folder "Marvin" to the configs folder on the new machine.
Then edited the file Marvin.hal.
I added a # at the start of the line with "loadrt probe_parport"
Saved and tried it.

Still no change.
No movement of the axis, despite them moving on the screen.
I've powered off ALL devices including the BOB, power supply, drivers and PC and restarted them all.
Stil no change.
I was planning on changing the location of the PC so have a longer and new parallel cable, so I've swapped this out too just in case.
No change.

In case it is helpful, here is the Marvin.hal file
# Generated by stepconf at Sun Jul 13 21:22:44 2014
# 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

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
net spindle-cmd <= motion.spindle-speed-out
net spindle-on <= motion.spindle-on

net estop-out => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net ydir => parport.0.pin-03-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
setp parport.0.pin-08-out-invert 1
net zdir => parport.0.pin-08-out
net spindle-on => parport.0.pin-09-out
net xdir => parport.0.pin-14-out
net ystep => parport.0.pin-16-out
setp parport.0.pin-16-out-reset 1

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 50000
setp stepgen.0.dirsetup 50000
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 50000
setp stepgen.1.dirsetup 50000
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 50000
setp stepgen.2.dirsetup 50000
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

My logic is now pointing at the BOB, but I'm no expert here - hence me asking for help ;-)
Are there any tests I can perform?

Many thanks for your persistence with this.

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

04 Apr 2018 14:32 #108374 by Todd Zuercher
Well, the first thing I would check on your BOB; many of them require an external power source(s) such as by a USB cable to the computer. Do you have those connected?

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

04 Apr 2018 16:35 #108389 by Gr8funTargets
Hi Todd
Yup, I have power from the driver power supply into the micro USB. This has not changed since it was last working a couple of weeks ago (when the PC died).
It is a ZP5A-INT Breakout board

(This shows what I have, the pic was taken when I was first setting up, hence the lack of wires to the drivers etc )
The is one red LED lit to show it has power.
Interestingly, there are no LEDs lighting when the motors *should* be running, that suggests it is either not getting a signal or not processing it.

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

06 Apr 2018 12:33 #108494 by andypugh
Start LinuxCNC from the command line (with the command "linuxcnc") and see what output you get.

But if the UI loads and LinuxCNC starts it sounds like the software side of things is correct. So i would start to suspect hardware (including the parallel port hardware).

There are some suggestions here: www.cnczone.com/forums/stepper-motors-dr...driver-problems.html that the enable signals might be problematic. Perhaps the new MB can't quite source enough current to drive the enables?
Does anything else seem to work? Inputs (limit switches) would tell us a lot.
The following user(s) said Thank You: Gr8funTargets

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

Time to create page: 0.166 seconds
Powered by Kunena Forum