Poblems configuring Parallel Port Pin 1,14,16 and

More
19 Mar 2016 22:48 #71916 by gadget
Hello,

I'm new to linuxcnc and have a general question on how to set up the parallel port correctly.
What I did so far is to configure linuxcnc with stepconf. So I tested all axis and found out that the x-axis (connected tp port 1 and 14) has no signal.
As next step I ran a CNC program on another computer using windows and it turned out, that the TB6560-3A controller using the parapallport is running fine.
I then stepped back to my linux computer with linuxcnc installed and used ptest to see if the parallel port works as expected.

According to /var/adm/messages, the parallel port (a startech 1 Port ExpressCard IEEE 1284, EC1PECPS) looks like this:
Mar 19 23:13:53 arsaCNC kernel: [    7.901463] parport 0x2000 (WARNING): CTR: wrote 0x0c, read 0x0b
Mar 19 23:13:53 arsaCNC kernel: [    7.901492] parport0: PC-style at 0x2000, irq 18 [PCSPP]
Mar 19 23:13:53 arsaCNC kernel: [    7.901500] parport0: irq 18 in use, resorting to polled operation
Mar 19 23:13:54 arsaCNC kernel: [   12.078001] lp0: using parport0 (polling).

So I changed the configuration in ptest.hal accordingly:
loadrt hal_parport cfg="0x2000 out"
loadusr -Wn PortTest pyvcp -c PortTest ptest.xml
loadrt threads name1=porttest period1=1000000
addf parport.0.read porttest
addf parport.0.write porttest
....

I then ran
halrun -I -f ptest.hal

As a result, the GUI Window opened and I could measure the output voltage on Ports 2 to 9 according to the buttons I pressed. E.g. pressing in the GUI on Pin 02 I could measure 3.3V at pin 2.
If did that for all pins, but for the pins 1, 14, 16 and 17, I measured only 0.04V.
I hope someone can help me what the expected output signals on those pins should look like.

best regards

gadget

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

More
20 Mar 2016 06:17 #71935 by Rick G
What mode do you have your parallel port set to?
Are you taking the voltage readings with the break out board connected or disconnected?

Will the TB6560-3a function with a 3.3 volt signal instead of a 5 volt signal?

Rick G

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

More
20 Mar 2016 13:00 #71944 by gadget
Rick, thanks for your quick reply.
To be honest I don't know what mode the parallel port is set to. How can I figure it out? What should it be set to?
I take the voltage readings without the board connected.
I'm not quite sure if the TB6560-3a will work with 3.3V, but as the Y and Z axis work fine, I assume it should work.
As I could get a pinout voltage on pin 2 to pin 9 of 3.3V, I was wondering why it doesn't work for pins 1, 14, 16 and 17.
Do those 4 pins have to behave differently?
According to this guide: linuxcnc.org/docs/2.4/html/hal_parallel_port.html the only difference is that pins 2 to 9 can be switched between input and output whereas pins 1,14,16, and 17 are always set to output ports.
So I should be able to turn them on using halrun, right?

gadget

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

More
29 Mar 2016 13:02 #72321 by andypugh
Pins 1, 14 16 and 17 are configurable as input or output.
It seems likely that you have the port configured for input. However LinuxCNC would not allow you to set the pins if it did not believe that the port was set for output.

So, it seems that the port has ignored the setting to output mode by LinuxCNC.

This might possibly be a BIOS setting that you can change.

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

More
17 Jul 2017 23:01 #95944 by wiegleyj
I have exactly the same problem. Using a Vantech 2-port PCIe parallel port card.

"BIOS" does not configure PCIe cards so there is no way to set input/output/EPP/ECP/SPP modes in BIOS settings as somebody suggested. (This would only be the case on obsolete motherboards with built-in parallel ports. PCI and PCIe are not configured through the BIOS menus.)

Only Pins 2-9 work as output on one of my cards as well. The bidirection pins and the strobe are not working as outputs by default. Identical behavior to what you describe.

What I discovered with a different card is that this is most likely caused by a card that linux only supports in ECP mode. type 'dmesg| grep parport' to see what your card reports as. My vantech appears as PCSPP,TRI-STATE,ECP and doesn't work with pins 1,14, 165 or 17 as outputs. My cheap WCH based card (which works if you desolder a single resistor to change the PCIe ID it reports as) reports as PCSPP,TRI-STATE,EPP and works perfectly.

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

More
18 Jul 2017 11:53 #95971 by andypugh
I think that LinuxCNC should be able to drive the parallel port pins in any mode. It certainly shouldn't require EPP.
However, some cards change the pull-up and current-drive capability of the port in EPP mode. I wonder if the not-working outputs would actually work with 1k pull-ups? Are they pins sitting low or high?

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

Time to create page: 0.908 seconds
Powered by Kunena Forum