Parallel port Setup, address setting and port testing

More
02 Jan 2021 09:48 #193817 by NoJo
Good day all,
I am building a small CNC lathe from scratch, which will have a C axis - I find no affordable controller cards able to handle the C axis and have been convinced to go LinuxCNC, since it seems, with some considrable work, this 'may' be possible. As I know nothing about Linux and LinuxCNC, I am starting the learning curve with the basics - I have an ITX-Min-PC, with Intel duo-core 32bit cpu.
It has (on-board) 4 usb ports, 4 serial ports, two LAN ports. A PCi slot with a muliti-I/O card - ( 4 more serial..!.. and one parallel)

I have loaded V2.7.15.21 Wheezy, and all appears to run ok.

When I do a stepconf with the I/O card NOT inserted, and try run the CNC, I get an error report - most of which I do not yet comprehend, but near the start are errors indicating the obvious lack of the par port.

Inserting the card, and repeating stepconf, and then running Mill, or lathe ( I tried both) executes with no startup errors.
However, checking with a 'scope on the port pins, there is no activity, neither when running the axis test in stepconf, or when jogging an axis in mill or lathe.

The port was initially set as '0' in stepconf.
lspci -v shows:

03:0f.0 Communication controller: NetMos Technology PCI 9845 Multi-I/O Controller (rev 01) (prog-if 02)
Subsystem: LSI Logic / Symbios Logic 1P4S (1 Parallel / 4 16550A Serial Port Adapter)
Flags: medium devsel, IRQ 17
I/O ports at dc00
I/O ports at d880
I/O ports at d800
I/O ports at d480
I/O ports at d400
I/O ports at d080
Kernel driver in use: parport_serial

HAL must, I suppose , find the card as I do not get the 'missing par port' error when I start mill.
I read up the very many posts on par port issues and played around a lot..
In stepconf, I set the port address to 0x378/0x278 instead of '0' - in desperation...I believe that achieves nothing as I understand the PCi mapping is does not really work that way?

In one of the Linuxcnc getting started docs I found a reference to a Par Port test tool - Ptest.hal - run in a terminal as - halrun -I -f ptest.hal. Brings up a picture with all the port pins that you can then toggle, etc. Again with a scope I checked - nothing happening. I used stepconf to change the port address 0, 1 ( fails..) , 0x2/378, etc..

Sort of at a loss here - Could someone please assist/point me in the right direction ?

I am not conversant with Linux, so please treat me as dumb, and be explicit if you need me to dig around in linux!
Thank you.
Joe

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

More
02 Jan 2021 10:30 #193818 by tommylight

In stepconf, I set the port address to 0x378/0x278 instead of '0' - in desperation...I believe that achieves nothing as I understand the PCi mapping is does not really work that way?

Nope, that will not work and most probably will leave the parport driver hanging requiring a reboot of the PC.
Try the addresses you got from lspci, one by one, and if one does not work, reboot and try the other. The rebooting part is not required, but i had cases where it would hang, so to be sure reboot between each test.
BTW, add 0x in front of the address, like so:
0xdc00
0xd880
etc

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

More
02 Jan 2021 10:52 #193822 by NoJo
Thank you for your reply.
I tried each of them in stepconf- did not seem to solve the problem.
I found a doc in linux.org - parport.htm, in which it describes to change the line :
loadrt hal_parport cfg= 0x378 to = 0x ( my address) in the HAL file
I tried with 'my-address' = to each of the addresses in the lspci list, and 0xd400 worked!
All axes have pulses, and things are looking up!
What is strange is that during stepconf, the loadrt hal_parport cfg= xxxx statement did not reflect what I entered in the setup line ( entered being one of the addresses in my list)
I'm going to do that again, perhaps be a little more methodical, and see what is placed in the HAL file. - I suspect in my quandary, it ended up finger trouble..
Thank you
Joe
The following user(s) said Thank You: tommylight

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

More
02 Jan 2021 11:15 #193826 by tommylight
Nice.
Not sure about stepconf, hence i did not mention it, i use it rarely to create something usable and never test anything with it, save and edit manually everything.

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

Moderators: PCWjmelson
Time to create page: 0.352 seconds
Powered by Kunena Forum