newbie parallel port woes

More
02 Nov 2015 20:24 #64613 by rodw
Hi guys.

Not quite sure where to go here so any pointers would be appreciated. Installed the latest build onto a Jetway Via card in a MinBox case that has a parallel port on the motherboard. Made up a ribbon cable to bring the par port out of the case. Connected a BOB with the 25 pin cable that came with it but the BOB had no life in it at all.
Alignment with motherboard header is correct as pin 1 is marked on the motherboard and pin 26 on the header is not present... (yes I know the red stripe on the ribbon is for pin 1)
I decided I better troubleshoot the parport frm the PC forward as there was no holding torque on the steppers.
Made sure the port was enabled at 0x378 IRQ7 and downloaded the parport test program and played with it and a multimeter but can't see any voltages on the par port between the GND pins and signal pins
Checked that the par port appears in dmesg (which it does)

I'm at a bit of a loss with where to go now. Any Ideas?

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

More
02 Nov 2015 21:19 #64616 by cncbasher
Replied by cncbasher on topic newbie parallel port woes
without knowing the specifics of the bob and how you wired it , we would need a crystal ball

check that the parport is at the address you think it is $ cat /proc/ioports is one way to see if the parport is loaded

your not looking for voltages as such the pulses are too fast , so try testing for an io pin and toggle that high and low . using hal configuration ..

post more information of your connections and details of your bob , and lets see
The following user(s) said Thank You: rodw

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

More
02 Nov 2015 22:18 #64617 by andypugh
Replied by andypugh on topic newbie parallel port woes

I decided I better troubleshoot the parport frm the PC forward as there was no holding torque on the steppers.


No holding torque means that the drives are not enabled.

Are the drive enable pins wired to the BoB? It might be that those need to be activated by the parallel port pin going low. (This will depend on the BoB)
The following user(s) said Thank You: rodw

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

More
02 Nov 2015 23:37 #64619 by ArcEye
Replied by ArcEye on topic newbie parallel port woes

Connected a BOB with the 25 pin cable that came with it but the BOB had no life in it at all.


Does the BOB require a power supply?

You have not said which distro you have installed, or even if that is what you have done.

Don't know when you tested the parport, if not after starting Linuxcnc, there will be nothing there.
If you did start Linuxcnc and did not get any errors, there is nothing wrong with the parport.

If you are doing this from stepconf and your BOB requires a charge pump signal, the [Test Axis] button
very often will not do anything, you have to test the resultant configuration, not test from within stepconf

Lot more info needed to know what you have done and what could be the problem

regards
The following user(s) said Thank You: rodw

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

More
03 Nov 2015 00:58 #64622 by rodw
Replied by rodw on topic newbie parallel port woes
Thanks guys, a few ideas to try.

I installed from the hybrid ISO and since upgraded to V 2.8.
I tested the Par port with this test program on your site wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester
LinuxCnc was not running when testing with this utility. I assumed it was not required as it is a HAL program.
I do not get any errors when LinuxCNC runs (but some of the samples error out)
Just want to use a basic stepconf program initially before building a custom config.
cat /proc/ioports says parport0 is at Address 0x378 so it looks like there is a parallel port there.

I'll check out how the drives are enabled. Its been a while since I wired it all up. Thanks for the tip but it might take me a while to report back on this as life is busy!
The BOB has 5v going to it and LED's lights up without a PC connected to it.
The BOB is nothing special and comes from Longs Motor and I am using their DM542a stepper drivers with a 48V power supply. I've used these before under Arduino control.
I did think of getting an ethernet Mesa card but Peter was out of stock at the time I asked and I had this BOB so I thought I'd start here.

I don't understand what is a charge pump but saw it in some configs.

I really wanted to tick off that I had a valid parallel port that was working before moving on to checking the CNC hardware. I knew it was a big ask for everything to work on first power up. It looks like I do have a parallel port in the system from the cat listing. It would be nice to be able to confirm the signals are working with a multimeter or some LED's and a test program before connecting the BOB. What is the best way to do that?

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

More
03 Nov 2015 01:07 #64624 by ArcEye
Replied by ArcEye on topic newbie parallel port woes
From a terminal run
lsmod | grep parport

If it reports something like

parport_pc 20567 0
parport 20654 lp,ppdev,parport_pc


you have the printer driver installed which will claim the parport and prevent Linuxcnc addressing it

If you get nothing back, you have the opposite problem, the low level parport driver has not been loaded by udev, because it does not think any other modules need it.

See what you get.

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

More
03 Nov 2015 01:51 #64629 by rodw
Replied by rodw on topic newbie parallel port woes
I get this:
parport_pc 21896 1
parport 35208 3 lp,ppdev,parport_pc

Thanks.

Its 4:00am so it'll be a while before I am back here :)

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

More
03 Nov 2015 02:05 #64633 by ArcEye
Replied by ArcEye on topic newbie parallel port woes
This thread covers it, to save repeating

www.linuxcnc.org/index.php/english/forum...-card-disabled#60754

You can probably leave lp and ppdev and just remove parport_pc and the parport should be accessible.

This shows how to blacklist a module, which is what you need to do with parport_pc
wiki.debian.org/KernelModuleBlacklisting

You probably will need to load lp ( put it in /etc/modules ) at startup, because if no module using the parallel port is loaded at startup,
udev has a nasty habit of not creating the device /dev/lp0 and thus the low level driver parport is not loaded either and you end up with no port accessible, despite physically having one.

regards
The following user(s) said Thank You: rodw

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

More
03 Nov 2015 02:05 - 03 Nov 2015 02:07 #64634 by cncbasher
Replied by cncbasher on topic newbie parallel port woes
ok just a heads up , they tend to show the 5v grounded and switch the 5v + sides of the opto's from the parallel port , infact reversing this is far better .

and to start with dont connect the enable to the steppers , it will only confuse to start with .
get it working first , then connect the enable if you wish , if it then does not work you need to invert the enable output .

you dont need a chargepump with those ,
post your config as an archive too
Last edit: 03 Nov 2015 02:07 by cncbasher.
The following user(s) said Thank You: rodw

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

More
03 Nov 2015 18:13 #64677 by rodw
Replied by rodw on topic newbie parallel port woes
Guys, I really appreciate your willingness to help me.

I've followed as much as what I could understand and am now loading lp in the etc/modules file.
I found a file LinuxCnc.conf in /etc/modprobe.d
I uncommented the single line in this file that indicated was regarding to the parport issue in the comments.
After a clean boot, lsmod | grep parport gave me this.

parport 35208 2 lp,ppdev

I assumed that I needed to get rid of the ppdev module.

After using the fake install method to blacklist ppdev in etc/modprobe.d with this command
install ppdev /bin/true

I now get this on a reboot using lsmod | grep parport
parport 35208 1 lp

So then with LinuxCNC running, I decided to repeat the lsmod | grep parport dump and got this
hal_parport 16727 0
probe_parport 12446 0
hal_lib 39487 7 thc,probe_parport,trivkins,encoder,hal_parport,stepgen,motmod
rtapi 34887 7 thc,probe_parport,encoder,hal_parport,stepgen,hal_lib,motmod
parport 35208 2 lp,hal_parport


I think that is progress. Now the parallel port tester HAL program at wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester
fails to run with error "Could not open File ptest.hal"

It would be able to use the test program.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum