4th Axis on second Parport

More
26 Sep 2015 23:21 - 26 Sep 2015 23:38 #63030 by DaPeace
Hello, at the moment i use a 3-Axis TB6600-Board + 1 separate driver for 4 axis (2 stepper for x and one for y + z)
I want to add a rotary-axis now and use the pins of the second parallel-port for a-axis. Its not possible to use the 3-Axis-Ports because it has 3 relays on it the block the ports for another axis so i need to use another cnc-breakout.
Ive tried to add the stepper in stepconf without success. Everytime i add the second parport the parport-driver gets unavailable and i need a reboot to get the system working again. So i tried to get the system working by manually modify the hal + ini and i got it to work that axis 1-4 work again but axis 5 ( the newly added on parport2 ) is not working.

The driver needs an enable-signal and maybe that could be the problem. How do i add a second enable-signal for the A-Axis to the second parport-pin 14?
What do i need to do to add the signals for the parport2 to the servo and basic-threads? only add the parport or do i need to add any signals too?

If i use stepconf and only add the second parport and configure the enable-signal and step/dir the stepper is moving without problems..

Ive attached the 2 config-files. Maybe someone could give me a hint..

Thank you
Attachments:
Last edit: 26 Sep 2015 23:38 by DaPeace.

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

More
27 Sep 2015 03:17 #63037 by tommylight
Open a terminal and type:
sudo lspci -v
hit enter
look for parport driver, it should be something like : kernel driver in use: parport
above it look for addresses like 0xcf00 0xcd00 etc, if there are five of them usually the third one is the right one.
Also you need to remove the # in front of parport.1.read and parport.1.write in the hal file or the second parport will not work even when you have the right addresses.
Regards,
Tom

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

More
27 Sep 2015 13:52 #63050 by DaPeace
Replied by DaPeace on topic 4th Axis on second Parport
Ive already found the right address 0xcd00 for the new parport and 0xcf00 for the one where the rest is connected. I can configure the new parport with the stepper and it runs in stepconf. But when i try to add both parport stepconf is "killing" my parport-driver and i need a reboot to get it working again. I cant add the A-Axis to the second parport as well. Stepconf cant add additional axis to the second parport.. only to the first.

Ive uncommented the lines already. It was a mistake to upload the version with comments. I know that adding to the threads is a must..

Regards, Jan

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

More
28 Sep 2015 04:18 #63091 by andypugh
Replied by andypugh on topic 4th Axis on second Parport

The driver needs an enable-signal and maybe that could be the problem. How do i add a second enable-signal for the A-Axis to the second parport-pin 14?
What do i need to do to add the signals for the parport2 to the servo and basic-threads? only add the parport or do i need to add any signals too?


I don't know why the config isn't working, it looks OK at a first glance. (I might have missed something).

To set up the second parport enable, just copy this that you have
setp parport.0.pin-14-out-invert 1
net xenable => parport.0.pin-14-out

As
setp parport.1.pin-14-out-invert 1
net xenable => parport.1.pin-14-out

Though you can probably configure it in stepconf too. I am not the best one to help with Stepconf, I have never used it.

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

More
28 Sep 2015 14:20 #63114 by cmorley
Replied by cmorley on topic 4th Axis on second Parport
As it is stepconf doesn't allow the second parport to be used for step/direction signals.
This is just because I couldn't test if it works and it's quite a bit of work to add.

saying that - it should not crash if you select a second parport.

What was the difference between stepconf's HAL file and the one you modified to work?
The ones you supplied seem highly modified so it's had to pin point differences.
It may be easier to make a plain config to debug with first.

I would like to isolate the 'it crashes my paroprt driver' from 'it doesn't make my A axis move'

Chris M

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

More
28 Sep 2015 14:46 #63116 by DaPeace
Replied by DaPeace on topic 4th Axis on second Parport
Hello Chris,
ive read the wiki of stepconf again and i think the problem i had, is the field where the second parport-adress needs to be entered.
Its not really clear where the address of port 2 has to be entered unless you are reading the wiki line by line :laugh:

Is it right that i need to enter the address of port 2 in the port 2-layout where the 1 is entered by default (as in the attached file)?

If you need help with testing step/dir for the second parport i could help you.
I think many beginners would have it much easier with stepconf.

A question for the topic..
Ive tried to
net aenable => parport.1.pin-14-out
Tried to invert that signal too without any change.

Why do i need xenable?
xenable is already set for the first parport.
Is it possible to set it for the second as well or do 2 signals collide?

Ive tried to get the axis runing yesterday again and ive seen that the stepper is enabled already. I cant turn it by hand so the amp hast power and holds it..

Regards, Jan
Attachments:

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

More
28 Sep 2015 16:29 #63118 by andypugh
Replied by andypugh on topic 4th Axis on second Parport

A question for the topic..
Ive tried to
net aenable => parport.1.pin-14-out
Tried to invert that signal too without any change.

Why do i need xenable?
xenable is already set for the first parport.


You have already set up xenable, which is why I suggested using it for both parports.

In HAL you can choose any name you want for the signals, they don't mean anything specific. The "signal" is the first word after the "net" command.

You can use the same signal name in as many places in the HAL file as you like. In your config xenable is linked to motion.axis.0.amp-enable-out by
net xenable axis.0.amp-enable-out => stepgen.0.enable

I suggested using that for A as I always use a single enable signal. It isn't obvious but all the axis.N.amp-enable-out signals switch at the same time, so there isn't any real point bothering with separate signals for each axis.

Having said that, your config does create an aenable signal, so that ought to be working.

It might be worth running the parport tester with _just_ the second port to check things.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester
You need to edit the HAL file part of that tester to have the corrct base address for the port being tested.

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

More
28 Sep 2015 17:22 #63124 by DaPeace
Replied by DaPeace on topic 4th Axis on second Parport
Ok Thank you for the help.
I will try that out in a couple of hours. Need to get that working before i buy the real a-axis.. only have a single stepper on it and want to get sure everything is working.

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

More
28 Sep 2015 21:06 #63147 by cncbasher
parallel ports are numberd from 0 , so for 2 parallel ports you would have 0 & 1

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

More
28 Sep 2015 21:11 #63149 by DaPeace
Replied by DaPeace on topic 4th Axis on second Parport
Ive tried to make a plain new config for 4 axis and it worked. I entered both addresses of the parport (0xcf00 for the first breakoutboard and 0xcd00 for the second breakoutboard) and edited the pins for the 4th axis by hand and it worked. now the challenge is to find the difference between my config and the one ive created freshly.

So stepconf is ok and there is no "killing parport".

Thanks guys!

Regards, Jan

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

Time to create page: 0.315 seconds
Powered by Kunena Forum