From 8253dc8d171130d329479ae4083d125407a377e6 Mon Sep 17 00:00:00 2001 From: watts Date: Wed, 8 Nov 2023 15:41:23 +0100 Subject: [PATCH] Update Orocos Configuration --- Orocos-Configuration.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Orocos-Configuration.md b/Orocos-Configuration.md index ab2e7d7..0b4cf79 100644 --- a/Orocos-Configuration.md +++ b/Orocos-Configuration.md @@ -14,7 +14,7 @@ The module names for your hardware can be found on the [Comedi website](https:// ## 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: +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): ``` [ 2.507480] comedi4: ni_660x: @@ -28,15 +28,18 @@ The device numbers assigned to each card can be found in the kernel message log, [ 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 command for identifying hardware include: +- `lspci` +- `comedi_board_info /dev/comedi0` (try with each device found with `ls /dev/comedi?`) -This corresponds to: +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 (n1231) assigned device number 3 - NI-6602 (ni_660x; used for reading the output of the Attocube interferometer) assigned device number 4 -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. +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. ## Editing start.ops @@ -85,7 +88,7 @@ DI1.deviceNr=2 ``` These assignments must be declared before the corresponding devices are configured with a command like `Sensor1.configure()`. -**WARNING** : There are currently some inconsistencies in the device number variable names and whether the "configure" and "start" functions use parentheses. The plan is to standardise on "deviceNr" and "configure()" +**WARNING** : There are currently some inconsistencies in the device number variable names and whether the "configure" and "start" functions use parentheses. The plan is to standardise on "deviceNr" and "configure()" | Device Type | Variable Name | Function Syntax | | ------ | ------ | ------ |