Stránka 2 z 5

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:14
od uhy
skušal som aj tak ten istý výsledok

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:15
od packa
dej sem tvůj hal mrknu nato

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:22
od uhy
pre istotu som urobil konfiguraciu 0xcc00 pin9 enable a skusil výsledok:
test.png

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:27
od uhy
myslíš hal ktorým testujem, nešiel mi vložiť tak som dopísal .txt?
ptest.hal.txt
(1.17 KiB) Staženo 372 x

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:28
od packa
tak ten stepconf dojed do konce a spust tu konfiguraci a hod sem debug file

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:32
od uhy
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.1
Machine configuration directory is '/home/uhy/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/uhy/linuxcnc/configs/my-mill/my-mill.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2590
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/hal_parport.ko': -1 Device or resource busy
my-mill.hal:7: exit value: 1
my-mill.hal:7: insmod failed, returned -1
See the output of 'dmesg' for more information.
2590
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 8314.433333] I-pipe: Domain RTAI registered.
[ 8314.433354] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 8314.433358] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 8314.433370] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 8314.433374] PIPELINE layers:
[ 8314.433379] f86a8e20 9ac15d93 RTAI 200
[ 8314.433383] c085cb20 0 Linux 100
[ 8314.477374] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 8314.477697] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 8314.477708] RTAI[sched]: hard timer type/freq = APIC/6308905(Hz); default timing: periodic; linear timed lists.
[ 8314.477714] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2422582000 hz.
[ 8314.477719] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 8314.477898] RTAI[usi]: enabled.
[ 8314.701848] RTAI[math]: loaded.
[ 8314.848980] config string '0xcc00 out '
[ 8314.849016] PARPORT: ERROR: request_region(0xcc00) failed
[ 8316.018423] RTAI[math]: unloaded.
[ 8316.171400] SCHED releases registered named ALIEN RTGLBH
[ 8316.184494] RTAI[malloc]: unloaded.
[ 8316.284054] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 8316.292179] I-pipe: Domain RTAI unregistered.
[ 8316.292198] RTAI[hal]: unmounted.

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:37
od packa
tam ti to píše že ve tvé halu na řádku 7 je chyba , hod sem hal , přepiš ho na txt

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:44
od uhy
ak sa nemýlim je tam práve tá adresa.
my-mill.hal.txt
(3.57 KiB) Staženo 410 x

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 8:53
od packa
jo máš to tam zapsané dobře ,
ted jsem ještě jednou koukal do tvého prvního výpisu a tam je :
[ 0.126248] pci 0000:00:1f.2: reg 10 io port: [0xec00-0xec07]
[ 0.126258] pci 0000:00:1f.2: reg 14 io port: [0xe800-0xe803]
[ 0.126267] pci 0000:00:1f.2: reg 18 io port: [0xe400-0xe407]
[ 0.126276] pci 0000:00:1f.2: reg 1c io port: [0xe000-0xe003]
[ 0.126285] pci 0000:00:1f.2: reg 20 io port: [0xdc00-0xdc0f]
[ 0.126352] pci 0000:00:1f.3: reg 20 io port: [0xc00-0xc1f]

takže by to mohlo být 0xec00 ,
skvělý je nato prográmek na výpis hardware , ted nevím jak se celý jmeenuje ale je to něco system ...... a má ikonu šupléry , tam se tyhle adresy krásně zjištujou

Re: PCI karta inštalacia

Napsal: 20. 1. 2013, 9:05
od uhy
0xec00 tiež nefunguje budem hladať program, vdaka.

Re: PCI karta inštalacia

Napsal: 21. 1. 2013, 7:39
od uhy
páni tak na stránke: http://www.linuxcnc.org/index.php/engli ... port-cards" onclick="window.open(this.href);return false;

som nasiel nasledujuce len mi to stále nebehá:-(


PCI Parallel port cards
************************

A PCI parport card can be used to provide extra IO very cheaply, or even enable a computer without a parport to run Linuxcnc.
Dual headed (2 port) cards are very useful, especially where PCI slots are scarce.

There is an added safety net with a PCI card, shorting out the parport will not ruin the on-board port or even the whole MB.

For stepper systems the NetMOS / MosChip chipset works fine.
These are the most widely used chips by card manufacturers, irrespective of what the actual card is branded as.

Try to avoid the 9805 and 9815 chips which are quite old and were a bit flakey, often difficult to set as input.
The 9845, 9865 and 9901 chips (often designated MCS9845, MCS9865 and MCS9901) work fine

Other chipsets work too, described in the hardware link below.

EPP mode
*********
To communicate with other EPP interfaced FPGA cards, requires a parport card that properly supports EPP.
Moschip notoriously does not.
The Oxsemi (PLXTech now) OX16PCI954 is recommended by one of the major manufacturers of such FPGA cards.
EPP isn't needed for stepper systems as the input and output pins are in separate groups in the other modes.
(see also Oxford semiconductor link at footer)

Installing
**************

Run lspci -vv from a terminal once installed and you will get a print similar to the below for your card.

0000:01:0a.0 Communication controller: Netmos Technology PCI 9845 Multi-I/O Controller (rev 01)
Subsystem: LSI Losgic / Symbios Logic 2POS (2 port parallel adapter)
Flags: medium devsel, IRQ 5
I/O ports at b800
I/O ports at bc00
I/O ports at c000
I/O ports at c400
I/O ports at c800
I/O ports at cc00

This is a dual port card, some trial and error is required to establish which addresses are the ports and which the registers. Work your way through them, connecting in the hal file as below.

See link to Big JTs port tester as one option to test.
Another simple option is to move a known good signal wire (from a limit switch say), from the BOB connected to existing port, to new BOB and activate the switch whilst watching the relevant pins in Hal Configuration window.

On this card, 0xc000 was the port on the card and 0xb800 the port connected via the flyer ribbon cable.

Connecting up in .hal file
**************************

The example card is connected in the .hal file thus
loadrt hal_parport cfg="0x378 out 0xc000 in 0xb800 in"

0x378 being the computer port, used for stepper step/dir etc. pins 2-9 are output.
0xc000 and 0xb800 are set as input, which sets pins 2-9 as input, allowing many sensors, encoders, switches etc to be attached

The extra parports are addressed in the hal file by incrementing numbers
0x378 is parport.0, 0xc000 is parport.1 , 0xb800 is parport.2 etc.

Each extra parport needs to be attached to a thread ie.
addf parport.1.read base-thread
addf parport.1.write base-thread
addf parport.2.read base-thread
addf parport.2.write base-thread

The individual pins are addressed simply by their numbers, as per the base parport eg.
net anewsignal => parport.1.pin-03.in

Re: PCI karta inštalacia

Napsal: 22. 1. 2013, 11:25
od packa
mrkni tady na toto :

http://www.linuxcnc.org/docs/html/hal/p ... _port.html" onclick="window.open(this.href);return false;

Re: PCI karta inštalacia

Napsal: 22. 1. 2013, 5:34
od uhy
packa vdaka za pomoc, nakoniec som to rozluskol v podstate popisom popísaným vyššie:

lspci -v

zobrazil sa výpis:

02:02.0 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 18
I/O ports at b000
Memory at feafb000 (32-bit, non-prefetchable)
Memory at feafa000 (32-bit, non-prefetchable)
Capabilities: <access denied>

02:02.1 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 19
I/O ports at b400
Memory at feafd000 (32-bit, non-prefetchable)
Memory at feafc000 (32-bit, non-prefetchable)
Capabilities: <access denied>

02:02.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 32, IRQ 11
I/O ports at bc00
I/O ports at b800
Memory at feaff000 (32-bit, non-prefetchable)
Memory at feafe000 (32-bit, non-prefetchable)
Capabilities: <access denied>

02:03.0 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 19
I/O ports at a000 [size=8]
Memory at feaf5000 (32-bit, non-prefetchable) [size=4K]
Memory at feaf4000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>

02:03.1 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 16
I/O ports at a400 [size=8]
Memory at feaf7000 (32-bit, non-prefetchable) [size=4K]
Memory at feaf6000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>

02:03.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 32, IRQ 10
I/O ports at ac00 [size=8]
I/O ports at a800 [size=8]
Memory at feaf9000 (32-bit, non-prefetchable) [size=4K]
Memory at feaf8000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>

z čoho sa dali vyčítať adresy portov: 0xac00 a 0xbc00 čiže testovací hall som upravil:

loadrt hal_parport cfg="0x378 out 0xbc00 out 0xac00 out"
loadusr -Wn PortTest pyvcp -c PortTest ptest.xml
loadrt threads name1=porttest period1=1000000
addf parport.0.read porttest
addf parport.0.write porttest
addf parport.1.read porttest
addf parport.1.write porttest
addf parport.2.read porttest
addf parport.2.write porttest


net pin01 PortTest.btn01 parport.2.pin-01-out PortTest.led-01
net pin02 PortTest.btn02 parport.2.pin-02-out PortTest.led-02
net pin03 PortTest.btn03 parport.2.pin-03-out PortTest.led-03
net pin04 PortTest.btn04 parport.2.pin-04-out PortTest.led-04
net pin05 PortTest.btn05 parport.2.pin-05-out PortTest.led-05
net pin06 PortTest.btn06 parport.2.pin-06-out PortTest.led-06
net pin07 PortTest.btn07 parport.2.pin-07-out PortTest.led-07
net pin08 PortTest.btn08 parport.2.pin-08-out PortTest.led-08
net pin09 PortTest.btn09 parport.2.pin-09-out PortTest.led-09
net pin14 PortTest.btn14 parport.2.pin-14-out PortTest.led-14
net pin16 PortTest.btn16 parport.2.pin-16-out PortTest.led-16
net pin17 PortTest.btn17 parport.2.pin-17-out PortTest.led-17


net pin10 parport.2.pin-10-in PortTest.led-10
net pin11 parport.2.pin-11-in PortTest.led-11
net pin12 parport.2.pin-12-in PortTest.led-12
net pin13 parport.2.pin-13-in PortTest.led-13
net pin15 parport.2.pin-15-in PortTest.led-15


start

# loadusr halmeter

a testoval som po jednom porte, momentalne je hal nastavený na port 2 adresa 0xac00

hold záver mal som viac čítať a rozmýšlať :oops:

Re: PCI karta inštalacia

Napsal: 22. 1. 2013, 6:02
od packa
tak ale to vypadá že na ty kartě jsou dva paralelní porty , není na tý kartě na tistáku 26ti pinový konektor , podobný jako třeba na harddisku nebo disketovce , ale kratší ?
protože jestly jo tak je to další port LPT , já mám taky pci kartu kupovanou pro jeden LPT , ale na desce je tenhle konektor kam jsem dodělal kšandu a mám druhý zadara

Re: PCI karta inštalacia

Napsal: 22. 1. 2013, 6:45
od uhy
sorry za dezinformaciu pridal som dalsiu kartu čiže teraz mam tri paralelné porty a 5 seriovych to by mohlo stačiť na všetko :lol: