First Time Help
(It is a bit tricky to test without the actual hardware)
Save the attached file somewhere, then use comp to install it:
comp --install /path/to/where/the/file/is/pcl720.comp
Then, in the HAL file load it rather like hal_parport in the sample configs.
loadrt pcl720 ioaddr=0x300
(If you had a second card at 400 hex then it would be loadrt pcl720 ioaddr=0x300,0x400)
Then add it to the base thread with
addf pcl720.0.write base-thread
addf pcl720.0.read base-thread
That will create 32 input pins with names like pcl720.0.pin-00-in and 32 output pins with names like pcl720.0.pin-31-out
You then connect those as required, eg
net x-dir stepgen.0.dir => pcl720.0.pin-00-out
net x-step stepgen.0.step => pcl720.0.pin-02-out
and so on.
I would be astonished if it worked without a few more iterations.
Please Log in or Create an account to join the conversation.
What is the protocal for the parallel port? for instance how does I/O card know when an address is sent vs data, also how does it know when to "read" or "write"
Next, how often does the transaction occur?
I understand most all of your file with 1 exception:
pin in bit pin-##-out[32] "output pins";
pin out bit pin-##-in[32] "input pins";
I get the array part, but why pin IN bit pin-##-OUT? and vice-versa on the next line.
Is it IN from HAL then OUT to the card?
Please Log in or Create an account to join the conversation.
This driver does not use the parallel port, it uses the ISA bus.What is the protocal for the parallel port? for instance how does I/O card know when an address is sent vs data, also how does it know when to "read" or "write"
However, the principle is much the same. If you send the data to (typically) 0x378 then the data bytes appear at the parallel port. In this case sending them to 0x300 will send them to the ISA bus, and to the pcl720 card. The low-level hardware stuff is done by a magic that we don't need to understand.
Every time the pcl720.N.read and pcl720.N.write function is called by the realtime system. That depends on the thread it is attached to. Typically that is every 1mS for the servo thread, and every 20uS for a base-thread on a low-latency machine.Next, how often does the transaction occur?
Yes, exactly that (or IN to the card and OUT of the connector). I got it wrong first time round writing the driverI get the array part, but why pin IN bit pin-##-OUT? and vice-versa on the next line.
Is it IN from HAL then OUT to the card?
Please Log in or Create an account to join the conversation.
Ok, so if doing this with a Parallel port, I assume we would use the port as a real port and maybe there are read/write bits on the port. Back to google to help to dig up OLD memories of how the parallel port communicates.
I'll be back when I brush up on it a bit
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai'
CC [M] /tmp/tmpUprtGT/pcl720.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_export_funct" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_pin_bit_newf" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "rtapi_snprintf" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "rtapi_print" [/tmp/tmpUprtGT/pcl720.ko] undefined!
CC /tmp/tmpUprtGT/pcl720.mod.o
LD [M] /tmp/tmpUprtGT/pcl720.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
cp pcl720.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
cp: cannot create regular file `/usr/realtime-2.6.32-122-rtai/modules/emc2/pcl720.ko': Permission denied
make: *** [install] Error 1
Did I do something wrong?
Please Log in or Create an account to join the conversation.
When I ran comp this is what was spit out.
WARNING: "hal_init" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpUprtGT/pcl720.ko] undefined!
WARNING: "hal_export_funct
Ah, yes.
The problem is that it can't compile the module without some header files which define some of the functions it uses.
(Which I have, of course, so didn't notice the problem)
I will need to have a look on my reference installation tonight to see if the files exist in a standard installation. The other alternative is to download the full EMC2 source code, but that seems like a lot of trouble.
You probably need to usecp pcl720.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
cp: cannot create regular file `/usr/realtime-2.6.32-122-rtai/modules/emc2/pcl720.ko': Permission denied
make: *** [install] Error 1
sudo comp --install pcl720.comp
so that you temporarily have read/write rights to the kernel modules directory.
(it will ask for a password)
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
Then using the basic stepper configuration as a model I tried to set something up, but I am not getting any movement.
Something needs a little more tweaking, but I am to much of a noob to have a clue.
I am not even sure what information to give to ask for help.
Please Log in or Create an account to join the conversation.
Bear with me, I will look into it.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.