From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <55C19859.6040508@xenomai.org> Date: Wed, 05 Aug 2015 01:00:09 -0400 From: Jorge Ramirez Ortiz MIME-Version: 1.0 References: <55C17C8E.5000909@gatech.edu> In-Reply-To: <55C17C8E.5000909@gatech.edu> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Xenomai] analogy calibration issue(s) List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Yogi A. Patel" , "xenomai@xenomai.org" On 08/04/2015 11:01 PM, Yogi A. Patel wrote: > Hi - > > I am migrating a xenomai 2.5.4 application to the cobalt core. I have xenomai > 3.0-rc5 installed with 3.18.12. > > I have a NI PCI 6250 card that is attached via analogy_config. I can > successfully run the insn_read command that is installed with the user space > support by running: > > sudo ./insn_read -d analogy0 -c 3 -R 0 --verbose > > This prints out a set of values close to what I am expecting (5V) > > I then attempt to use the analogy calibration feature added to Xenomai 3 by > running: > > sudo ./analogy_calibrate --device=analogy0 --output=calvals.bin > > This prints out the following: > > 0"000.079| calibration output: calvals.binls > 0"004.427| calibrating device: analogy_ni_pcimio > 0"255.934| Polynomial : > 0"255.972| order = 3 > 0"255.995| expansion origin = 32767.000000 > 0"256.026| order 0 coefficient = 32867.5 > 0"256.051| order 1 coefficient = 0.949174 ... > > NOTE: there appears to be a print bug above (0"283.294| Calibrating AI: �m) apply the following: [jramirez@calypso ~ (master *)]$ git diff calibration_ni_m.c diff --git a/utils/analogy/calibration_ni_m.c b/utils/analogy/calibration_ni_m.c index c72a44d..6f9be6f 100644 --- a/utils/analogy/calibration_ni_m.c +++ b/utils/analogy/calibration_ni_m.c @@ -973,7 +973,7 @@ static int ni_m_calibrate_ai(void) * calibrate low, medium and high gain ranges */ for (i = 0; i < ARRAY_LEN(cal_info); i++) { - __debug("Calibrating AI: %s \n", cal_info[i]); + __debug("Calibrating AI: %s \n", cal_info[i].message); if (cal_info[i].range >= 0) goto calibrate; > > Has anyone successfully used the calibration feature? it seemed to work ok when I wrote the code some time ago on the 6220 I think it was. Please could you post the contents of the calibration file?