diff --git a/Orocos-Configuration.md b/Orocos-Configuration.md index db89552..6b31091 100644 --- a/Orocos-Configuration.md +++ b/Orocos-Configuration.md @@ -4,6 +4,18 @@ Orocos needs to be configured to your hardware, this involves: 2. Set the correct device numbers in the Orocos start.ops file 3. Load and use the correct hardware drivers in the Orocos start.ops file +## Agilent Interferometer PCI cards + +The Agilent PCI cards don't have a proper kernel driver any more and are now accessed by Orocos directly via the PCI slot. To configure access, use `lspci` to see which PCI address (number on the left) corresponds to your Agilent card and make sure that your `start.ops` includes lines similar to: + +``` +import("SensorAgilentPCI") +loadComponent("Sensor1","SensorAgilentPCI") +Sensor1.deviceName = "/sys/bus/pci/devices/0000:07:00.0/" +``` + +You should be able to see a directory in your file system that matches the `deviceName` string. + ## Identify Device Numbers The device numbers assigned to each card can be found in the kernel message log, which is printed with `dmesg` (might need `sudo dmesg`). There can be a lot of messages to sort through, so you can narrow it down with `dmesg | grep comedi`. This should produce output that includes lines like (example from PolLux): @@ -15,9 +27,6 @@ The device numbers assigned to each card can be found in the kernel message log, [ 2.544959] comedi2: ni_pcimio: [ 2.546311] comedi: cannot get unshared interrupt, will not use RT interrupts. [ 2.547515] comedi2: ni_pcimio: possible problem - never saw adc go busy? -[ 2.698319] comedi3: n1231: -[ 2.698331] comedi3: found n1231a at PCI bus 3, slot 0 -[ 2.698525] comedi3: N1231 now attached. [ 2.699254] comedi0: ni_660x: ``` We are looking for messages in the format of `comedi4: ni_660x:`, which tells us that an NI6602 card (with `ni_660x` kernel module) has been assigned the device number `4` by Comedi. Further information can often be found in the lines in between those containing "comedi" and you can use the timestamp on the left to quickly find the appropriate section of the message log. Some other useful commands for identifying hardware include: @@ -28,7 +37,7 @@ This corresponds to a PolLux configuration with: - NI-6602 (ni_660x) assigned device number 0 - NI-6289 (ni_pcimio) assigned device number 1 - NI-6733 (ni_pcimio) assigned device number 2 -- Agilent N1231 (n1231a) assigned device number 3 +- Agilent N1231 (n1231a) that the kernel (i.e. Comedi) doesn't see, but is observed in PCI slot 7 - NI-6602 (ni_660x; used for reading the output of the Attocube interferometer) assigned device number 4 If you have multiple cards using the same driver, then it can be a bit complicated to figure out which is which. As a rule, Comedi will tend to assign a smaller device number to the card with the higher PCI address. @@ -72,7 +81,7 @@ Take note of each `loadComponent` command where the imported object (second argu In this case, we should declare the following assignments: ``` -Sensor1.deviceNr=3 +Sensor1.deviceName = "/sys/bus/pci/devices/0000:07:00.0/" Sensor2.deviceNr=4 AO1.deviceNr=2 DO1.deviceNr=2