All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yogi A. Patel" <yapatel@gatech.edu>
To: Jorge Ramirez Ortiz <jro@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] analogy calibration issue(s)
Date: Mon, 17 Aug 2015 00:11:07 -0400	[thread overview]
Message-ID: <55D15EDB.4060107@gatech.edu> (raw)
In-Reply-To: <55C9EAA6.6030503@gatech.edu>


>> please pull again from 
>> http://git.xenomai.org/xenomai-jro.git/log/?h=devel
It took some time, but I was able to get the process to *run* - but not 
work.

I had to make the following modifications to the calibration.c file to 
get this to work on 3 different machines:

diff --git a/lib/analogy/calibration.c b/lib/analogy/calibration.c
index b50cb2f..d062a00 100644
--- a/lib/analogy/calibration.c
+++ b/lib/analogy/calibration.c
@@ -105,7 +105,10 @@ static inline int read_int(int *val, struct 
_dictionary_ *f, const char *subd,

         *val = iniparser_getint(f, str, 0xFFFF);
         if (*val == 0xFFFF)
+       {
+               *val = -1;
                 ret = -ENOENT;
+       }
         free(str);

         return ret;
@@ -226,7 +229,7 @@ int a4l_read_calibration_file(char *name, struct 
a4l_calibration_data *data)
                 if (nb_elements < 0 ) {
                         /* AO is optional */
                         if (!strncmp(subdevice[k], AO_SUBD_STR, 
sizeof(AO_SUBD_STR)))
-                            break;
+                               return 0;
                         return -1;
                 }

I get why these modifications are necessary and why it works now. I 
don't understand how it worked for you before.

Now the problem is that when I run:

$ ./insn_read -R 0 -c 3 -d analogy0 -y /home/yapatel/file
Calibrated values:
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000

without calibration, it works fine:

$ ./insn_read -R 0 -c 3 -d analogy0
Non Calibrated values:
4.837873
4.838788
4.839094
4.838788
4.839094
4.838483
4.838483
4.838178
4.836957
4.836652

Also, the calibration file output has another error. The channel values 
are all "-1". I've attached my newest calibration file from a machine 
with an NI-6250 card (no AO).

Can you send me a file that has worked for you?
-------------- next part --------------
[platform] 
driver_name = analogy_ni_pcimio;
board_name = pci-6250;

[analog_input] 
index = 0;
elements = 7;
[analog_input_0] 
channel = -1;
range = 0;
expansion_origin = 6.95294e-310;
nbcoeff= 4;
coeff_0 = 6.36599e-314;
coeff_1 = 6.95294e-310;
coeff_2 = 4.94066e-324;
coeff_3 = 6.91753e-310;
[analog_input_1] 
channel = -1;
range = 1;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = -0.000646698;
coeff_1 = 0.000162018;
coeff_2 = -1.50544e-11;
coeff_3 = -6.47918e-16;
[analog_input_2] 
channel = -1;
range = 2;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = -0.000225658;
coeff_1 = 6.46977e-05;
coeff_2 = -6.01158e-12;
coeff_3 = -2.58729e-16;
[analog_input_3] 
channel = -1;
range = 3;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = -8.87597e-05;
coeff_1 = 3.24157e-05;
coeff_2 = -3.012e-12;
coeff_3 = -1.29632e-16;
[analog_input_4] 
channel = -1;
range = 4;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = -1.8853e-05;
coeff_1 = 1.61998e-05;
coeff_2 = -1.50525e-12;
coeff_3 = -6.47836e-17;
[analog_input_5] 
channel = -1;
range = 5;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = 2.17638e-05;
coeff_1 = 6.49031e-06;
coeff_2 = -6.03067e-13;
coeff_3 = -2.59551e-17;
[analog_input_6] 
channel = -1;
range = 6;
expansion_origin = 32767;
nbcoeff= 4;
coeff_0 = 3.60315e-05;
coeff_1 = 3.24112e-06;
coeff_2 = -3.01158e-13;
coeff_3 = -1.29614e-17;

  reply	other threads:[~2015-08-17  4:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05  3:01 [Xenomai] analogy calibration issue(s) Yogi A. Patel
2015-08-05  5:00 ` Jorge Ramirez Ortiz
2015-08-05  5:13   ` Yogi A. Patel
2015-08-05 12:54     ` Jorge Ramirez Ortiz
2015-08-06 19:00 ` Jorge Ramirez Ortiz
2015-08-06 20:30   ` Yogi A. Patel
2015-08-06 20:47     ` Jorge Ramirez Ortiz
2015-08-07  1:57       ` Yogi A. Patel
2015-08-07 11:26         ` Jorge Ramirez Ortiz
2015-08-07 12:43           ` Yogi A. Patel
2015-08-07 13:00             ` Jorge Ramirez Ortiz
2015-08-07 14:13             ` Jorge Ramirez Ortiz
2015-08-07 20:15               ` Yogi A. Patel
2015-08-07 20:32                 ` Jorge Ramirez Ortiz
2015-08-07 20:35                   ` Yogi A. Patel
2015-08-07 20:47                     ` Jorge Ramirez Ortiz
2015-08-07 20:48                       ` Yogi A. Patel
2015-08-07 21:27                         ` Jorge Ramirez Ortiz
2015-08-11 12:29                           ` Yogi A. Patel
2015-08-17  4:11                             ` Yogi A. Patel [this message]
2015-08-17 13:22                               ` Jorge Ramirez Ortiz
2015-08-17 13:39                                 ` Jorge Ramirez Ortiz
2015-08-17 14:29                                   ` Jorge Ramirez Ortiz
2015-08-17 14:22                                 ` Yogi A. Patel
2015-08-20 14:15                                   ` Jorge Ramirez Ortiz
2015-08-07 21:28                     ` Gilles Chanteperdrix
2015-08-11 12:22                       ` Yogi A. Patel
2015-08-11 15:49                         ` Gilles Chanteperdrix
2015-08-07 12:53           ` Jorge Ramirez Ortiz
2015-08-06 20:56     ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55D15EDB.4060107@gatech.edu \
    --to=yapatel@gatech.edu \
    --cc=jro@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.