Yet another LinuxCNC noob with a PCI card as Port1 issue.

More
29 Mar 2025 13:38 - 29 Mar 2025 13:42 #325244 by B1gJ1mmy
Hi All. 

I apologise for posting this.  I'm sure the solution is out there somewhere but all the stuff I can find seems not to work.   

I want to run  a pci card as a second parallel port for my DIY cnc.   I want more inputs and some more outputs also. I am using a Generic breakout board that is identical to primary one I am using on Port 0. My board has a Parallel port on 0x378 This Port 0 in linux and works fine if I do in my hal file.

loadrt hal_parport cfg="0 out” or loadrt hal_parport cfg="0x378 out” 

The PCI Card is some sort of generic MOSCHIP based card and it is detected as Port 1 in linux.  It has two addressed associated with it 0xe480 & 0xe800I have tried the following in my Hal file

loadrt hal_parport cfg="0 out 1 out”  (port 0 works port 1 nothing)
loadrt hal_parport cfg="0 1 out”  (cant remember what this one did probably same as the rest)
loadrt hal_parport cfg="0x378 0xe480 0xe800 out “ (port 0 works port 1 nothing)
loadrt hal_parport cfg=”0x378 0xe480 out” (port 0 works port 1 nothing)
loadrt hal_parport cfg=”0x378 0xe800 out” (port 0 works port 1 nothing)
loadrt hal_parport cfg=”0x378 out  0xe480 out  0xe800 out “ (port 0 works port 1 nothing)
loadrt hal_parport cfg=”0x378 out 0xe480 out “ (port 0 works port 1 nothing)
loadrt hal_parport cfg=”0x378 out 0xe800 out “ (port 0 works port 1 nothing)

I have tried every variation I can think of but still get no output. I am testing using a multi-meter on two outputs on the port 1 breakout board had had set them to be amplifier enable and one output is inverted from the other just for the sake of testing.

I have also tried probing the cable it shows no changes when I press enable in linuxcnc. On port0 it works and hitting enable locks up the motors.

Can anyone point me the correct direction!  I feel like I’m going in circles.
Attachments:
Last edit: 29 Mar 2025 13:42 by B1gJ1mmy. Reason: formatting went weird.

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

More
29 Mar 2025 15:29 #325253 by HansU
Should be in the format
loadrt hal_parport cfg=”0x378 out 0xe800 out“

Further, a more lovingly taken picture of the lspci command would also help...
The following user(s) said Thank You: tommylight

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

More
29 Mar 2025 22:44 #325282 by B1gJ1mmy
Thanks for getting back to me. I feel like I have tried that but I will confirm later on today.

Also I apologise for the photo they were taken when I was starting to play with getting this going. They were not meant specifically for the forum post more just as a record that I could look up on my phone when I was editing the hal file so all I needed was the address.

Happy to provide further information and better photos. If anyone thinks it will help.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Mar 2025 22:49 #325284 by tommylight
Also do try just the add on card with
loadrt hal_parport cfg=”0xe800 out“

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

More
30 Mar 2025 09:45 #325309 by B1gJ1mmy
Thanks I tried both of these suggested configs. 

Still no output even when it is set as the only Parallel port for Linuxcnc.  The config itself worked because my motors no longer lock up when enabled as they are still connected to the 0x378 port.  Got no voltage changes on the 0xe800 breakout board even when it was configured as the only port in linuxcnc.

When both ports are specified port0 works but port1 still no output. 

I have taken some better photos of the lspci -vv and /proc/ioports plus a photo of the hal file so you can make sure I am not doing something dumb(this is likely). Sorry has to be photo as machine is not networked and usb ports are hard access currently. 

Starting to think maybe its the card.  I have another card but is is not working in linux. it is a sun1888 card it list in lspci but the drivers do not get assigned to it.  If there is an easy fix to getting this going it might be a good way to test.  (I'm a linux noob but willing to get into the weeds with good instructions) 

Thanks.

 
Attachments:

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

More
30 Mar 2025 11:41 #325315 by HansU
Ok let me compare that with my machine as I am using also two parallel ports.
I will get back to you next week when I have been been at my workshop.

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

More
31 Mar 2025 10:32 #325377 by B1gJ1mmy
Thanks. I look forward to your response. 

I was able to get the SUN1888 working to the same extent as the Moschip.  With the same results no output. So I'm guessing not the card. 

The only other thing that may be causing issues is my initial setup was in stepconf wizard using the dual parport setting and then setting the addresses for the parallel ports in there.  This seems to create a valid output in the hal of loadrt hal_parport cfg=”0x378 out 0xe800 out“ (when testing with the moschip card) 

from my limited understanding of the hal file  stepconf seems to setup the hal correctly it definitely works on a single breakout card. 

I have attached the photos for the sun1888 card just for your reference.  

 
Attachments:

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

More
31 Mar 2025 11:47 #325382 by B1gJ1mmy
just a note I also tried the port tester from here
forum.linuxcnc.org/18-computer/4743-parallel-port-tester

Still no output that I can see.

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

More
31 Mar 2025 12:11 #325388 by unknown
If you can use for all your card the following command
sudo lspci -vvnn > lspci.txt
sudo dmesg | grep parport > dmesg.txt
sudo ls /proc/ioports > ioports.txt

And as much it is a PITA copy the unedited txt files to a USB drive and attach them to your next post . Screenshots are difficult to work with.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Mar 2025 12:14 #325389 by tommylight
Remove the BOB, measure at the parallel port.
Or use the tester and a piece of wire inserted in the pin 10 or 11 or 12 or 13 and ground/metal case.

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

Time to create page: 0.169 seconds
Powered by Kunena Forum