Parport

More
09 Sep 2010 16:07 #4075 by Mike_Eitel
Parport was created by Mike_Eitel
Hi
I bought some pci parport cards for good money, including promised linux driver..

I installed new with latest 10.4 based iso, but I can not run installscript as file

install-p-80x86 is provocing errors. I think it's looking for the wrong directories

In windows inf I was able to identify CH352 chip from whc.cn


Has anyone an idea how I can proceede, beside the request ton whc, as i did already...

THX
Mike

P.S.
I wan't to implement a nice jogwheel box with some luxury ....

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

More
09 Sep 2010 16:25 #4076 by billykid
Replied by billykid on topic Re:Parport
First you need to type in the terminal "lspci-v"
address should appear.
Section parallel controller
greetings
Mauro

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

More
10 Sep 2010 17:15 #4103 by Mike_Eitel
Replied by Mike_Eitel on topic Re:Parport
sorry coming back again...
I must be too dump to understand. And i tried to read and experiment with all I found in the doc's.

1. Based on :
---In my case the address was the first one so I changed my .hal file from
---loadrt hal_parport cfg=0x378
---to
---loadrt hal_parport cfg="0x378 0xa800 in"
---Note the double quotes surrounding the addresses.
---and then added the following lines so the parport will get read and written to.
---addf parport.1.read base-thread
---addf parport.1.write base-thread

In this example I understand that the adress is replaced by A800
OK, BUT as he wants a second, and I think this command is only REPLACING the first parport.

2. As I was not able to run manufacturers installscript ... Can I use the card at all?

Here lspci -v and some code snipes

<<<<<<<<<<<<<<<<<<<<<<
cnc@cnc-T1:~$ lspci -v
00:12.0 Serial controller: Unknown device 4348:5053 (rev 10) (prog-if 02 [16550])
Subsystem: Unknown device 4348:5053
Flags: medium devsel, IRQ 5
I/O ports at 1018
I/O ports at 1010 [size=8
>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>Mini.hal <<<<<<<<<<<<<<<<<<

# Erstellt von stepconf am Fri Sep 10 18:39:41 2010
# Änderungen an dieser Datei werden beim nächsten
# Aufruf von stepconf überschrieben.

loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out "
setp parport.0.reset-time 500

loadrt hal_parport.1 cfg="0x378 0x1010 in "
# setp parport.1.reset-time 500
# addf parport.1.read base-thread
.......

3. Can you eventually copy a .hal file that has a second parport implemented.

THX Mike ( after some non succefull hours ) ;-()

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

More
10 Sep 2010 23:13 #4109 by BigJohnT
Replied by BigJohnT on topic Re:Parport
Take a look here to see if that helps you figure out your address

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Hooking_Up_A_MPG_Pendant

John

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

More
11 Sep 2010 09:37 #4117 by Mike_Eitel
Replied by Mike_Eitel on topic Re:Parport
Jorry John

In point 1. I sourced on that text.. tried to seprate by using signs ---

And I still have the problem that in this example the first parport is replaced by the second with the construct : --- loadrt hal_parport cfg="0x378 0xa800 in" ---
and / or how is decided that this should become second parport number and not first or third. ??

in Point 2. I listed the result : Adrresses 1080 and 1010
But trying them in my halfile did not help, just generated non-starting-axis caused by errors.

Mike

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

More
11 Sep 2010 13:43 #4120 by BigJohnT
Replied by BigJohnT on topic Re:Parport
You might want to read up on using hal_parport here as well as issues with some modern parallel ports:

www.linuxcnc.org/docview/html//hal_drivers.html

I'm sure that adding --- to the command line will cause an error.

Did lspci -v give you something similar to this:
 0000:00:10.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
        Subsystem: LSI Logic / Symbios Logic: Unknown device 0010
        Flags: medium devsel, IRQ 11
        I/O ports at a800 [size=8]
        I/O ports at ac00 [size=8]
        I/O ports at b000 [size=8]
        I/O ports at b400 [size=8]
        I/O ports at b800 [size=8]
        I/O ports at bc00 [size=16]

and did you try all the addresses?

It's really hard to understand your problem without the actual error message and or the results of dmesg attached as a text file.

Read about dmesg and how to make a text file and clear the boot up messages here:

www.linuxcnc.org/docview/html//common_Linux_FAQ.html#r1_6_6

John

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

More
11 Sep 2010 15:24 #4123 by Mike_Eitel
Replied by Mike_Eitel on topic Re:Parport
THX John

Things are getting better.

1. I had to understand that the parport is NOT under the control of linux kernel by excluding via /etc/modprobe.d/emc2

2. At least in my system playing around with "loadrt hal_port" in / out / x parameters needed power off...

3. I do not understand why but I found setp parport.1.reset-time 500 is preventing startup by error.. ???

Now I'm able to see in HAL-meter the pins and they react correctly when I pull them down to gnd.
Now i can do the next steps and try to solder my hw and go next steps to implement my jog wheel.

again THX John

P.S.
Once I understood it seems to be much easier than expected ;-()

Here the my mini.hal file.

# Erstellt von stepconf am Fri Sep 10 18:39:41 2010
# Änderungen an dieser Datei werden beim nächsten

# Aufruf von stepconf überschrieben.
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

loadrt probe_parport
# loadrt hal_parport cfg="0x378 out "
loadrt hal_parport cfg="0x378 out 0x1010 in "

setp parport.0.reset-time 500
# Additional for second parport
# setp parport.1.reset-time 500 <
causing error ---- why ????

loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out

addf parport.0.read base-thread
# Additional for second parport
addf parport.1.read base-thread

addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

# Additional for second parport
addf parport.1.write base-thread
addf parport.1.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= motion.spindle-speed-out
net spindle-on <= motion.spindle-on

net spindle-on => parport.0.pin-01-out
net xdir => parport.0.pin-02-out
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net astep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net charge-pump => parport.0.pin-16-out
net xenable => parport.0.pin-17-out

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 24000
setp stepgen.0.dirsetup 21000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 24000
setp stepgen.1.dirsetup 21000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 24000
setp stepgen.2.dirsetup 21000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

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

More
11 Sep 2010 16:47 #4124 by step4linux
Replied by step4linux on topic Re:Parport
Mike_Eitel wrote:

loadrt probe_parport
# loadrt hal_parport cfg="0x378 out "
loadrt hal_parport cfg="0x378 out 0x1010 in "

setp parport.0.reset-time 500
# Additional for second parport
# setp parport.1.reset-time 500 <


causing error ---- why ????


maybe because you specified 2nd port as "in" ?
There is no reset-time for inputs I guess

Gerd

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

More
11 Sep 2010 17:04 #4125 by Mike_Eitel
Replied by Mike_Eitel on topic Re:Parport
makes sense gerd

I was not sure as there are still some outports, which I will use for LED.

If everthing works , I'll publish ....

Mike

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

More
12 Sep 2010 03:14 #4135 by cmorley
Replied by cmorley on topic Re:Parport
.reset-time and .reset are used for stepper timing to get one step per period. ( a way to increase max veocity)
You don't need or want them on the second parport if you are not using it to control steppers.
I'm not sure why it errors. I have never heard of anyone using a second parport to run steppers.
but don't really see why not.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum