Parport
- Mike_Eitel
- Topic Author
- Offline
- Platinum Member
- Posts: 1125
- Thank you received: 184
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.
- billykid
- Offline
- Platinum Member
- Posts: 507
- Thank you received: 79
address should appear.
Section parallel controller
greetings
Mauro
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Topic Author
- Offline
- Platinum Member
- Posts: 1125
- Thank you received: 184
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.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Hooking_Up_A_MPG_Pendant
John
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Topic Author
- Offline
- Platinum Member
- Posts: 1125
- Thank you received: 184
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.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
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.
- Mike_Eitel
- Topic Author
- Offline
- Platinum Member
- Posts: 1125
- Thank you received: 184
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.
- step4linux
- Offline
- Premium Member
- Posts: 94
- Thank you received: 5
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.
- Mike_Eitel
- Topic Author
- Offline
- Platinum Member
- Posts: 1125
- Thank you received: 184
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.
- cmorley
- Offline
- Moderator
- Posts: 7778
- Thank you received: 2074
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.