- From: Alfonso Fernández Vázquez <afernandez_at_simaupro.com>
- Date: Tue, 06 Apr 2004 09:27:21 +0200
Hi, I am getting familiar with comedi and my daqboard2000. I dont understand the results from the demo program inpn. I connected channel 8 to 5V and the result for range [-10, 10] is fine (5.18883V). My problem is that I dont know why the result for range [0, 10] is 7.59457V. I think comedi_data_read is ignoring the range parameter (and using always [-10,10]) and comedi_to_phys is using it. Please, can someone give me some clues? [root_at_imi demo]# inpn 0: 5.03044 2.51675 1.25906 0.629911 0.315166 0.157688 0.0787558 7.52529 3.76333 1.88209 0.941157 0.470674 0.23537 1: 1.21752 0.575036 0.279812 0.136854 0.0670348 0.0328784 0.0161082 5.50729 2.74929 1.37255 0.685264 0.342155 0.170834 2: 0.28397 0.136034 0.0663386 0.0326352 0.0159934 0.00786316 0.00385864 5.12154 2.55993 1.27947 0.639506 0.319648 0.159781 3: -0.00137331 0.000686656 0.000572213 0.000400549 0.000238422 0.000128748 7.37926e-05 5.00267 2.50134 1.25074 0.625391 0.312715 0.156353 4: 0.0273136 0.0128939 0.00652323 0.00318532 0.00159266 0.000786793 0.000392767 5.01259 2.50637 1.25307 0.626535 0.313258 0.156634 5: 0.0102235 0.00556954 0.00286107 0.00139239 0.00073434 0.00036717 0.000188052 5.00572 2.50286 1.25151 0.625753 0.312877 0.156448 6: 0.0514229 0.0247959 0.0118639 0.00593194 0.00290875 0.00145438 0.000716503 5.02266 2.51125 1.25559 0.627756 0.313859 0.15693 7: -0.00717174 -0.00190738 -0.000648508 -0.000171664 -4.76844e-05 1.43053e-05 2.61845e-05 5.00084 2.50057 1.25032 0.625162 0.3126 0.15631 8: 5.18883 2.59472 1.29721 0.648642 0.324321 0.16217 0.0809553 7.59457 3.79728 1.89868 0.949321 0.47467 0.23734 9: 2.17426 1.04807 0.511368 0.250305 0.122597 0.0601253 0.029429 5.92599 2.9546 1.47326 0.734627 0.36636 0.182717 10: 0.732891 0.354543 0.173381 0.0850118 0.0416476 0.0204519 0.0100334 5.31594 2.65522 1.32631 0.662509 0.330949 0.165336 11: 0.233005 0.114214 0.0561151 0.0277523 0.0136473 0.00673781 0.00332067 5.10445 2.55177 1.2755 0.63756 0.318713 0.159309 12: 0.209812 0.101396 0.0495537 0.0243954 0.0119497 0.00586995 0.00287315 5.09102 2.5449 1.27211 0.635901 0.317855 0.158894 13: 0.143893 0.0710307 0.034905 0.0172236 0.00849737 0.004201 0.00208762 5.06645 2.53285 1.26627 0.633097 0.316501 0.158222 14: 0.128328 0.0629435 0.0308614 0.0153544 0.00763905 0.00378138 0.0018829 5.05943 2.52941 1.26471 0.632334 0.316072 0.158002 15: 0.0077821 0.00511177 0.00278477 0.00146868 0.000753414 0.000395781 0.000202335 5.00694 2.50378 1.25189 0.625944 0.312991 0.1565 16: 0.2327 0.113756 0.0556573 0.0271801 0.0134375 0.00658522 0.00323497 5.1017 2.55016 1.27474 0.63714 0.318465 0.159195 17: 0.410925 0.203632 0.0996796 0.0489242 0.0240616 0.01184 0.00581057 5.18303 2.58984 1.29419 0.646773 0.323205 0.161512 18: 0.298924 0.147478 0.0725185 0.0357252 0.0175956 0.00862612 0.00424427 5.13359 2.5658 1.28237 0.640898 0.320335 0.160091 19: 0.226596 0.110246 0.0540551 0.0265316 0.0129988 0.00639448 0.00312547 5.09895 2.54864 1.27394 0.636721 0.318284 0.159099 20: 0.192111 0.0933089 0.0453574 0.0222591 0.0108434 0.00531682 0.00260655 5.08202 2.54009 1.2697 0.634661 0.317226 0.158575 21: 0.155489 0.0768292 0.037499 0.0184062 0.00910773 0.00446803 0.00219712 5.0692 2.53384 1.26669 0.633211 0.316539 0.158236 22: 0.0883497 0.0441749 0.0217823 0.0107385 0.00535019 0.0025988 0.00127828 5.04021 2.52003 1.25982 0.629854 0.31487 0.157421 23: 0.037995 0.0179294 0.00843061 0.00406271 0.00197414 0.00094892 0.000459419 5.01427 2.50683 1.25341 0.626631 0.313296 0.156634 [root_at_imi demo]# [root_at_imi demo]# info overall info: version code: 0x000744 driver name: daqboard2000 board name: ids2 number of subdevices: 3 subdevice 0: type: 1 (analog input) number of channels: 24 max data value: 65535 ranges: all chans: [-10,10] [-5,5] [-2.5,2.5] [-1.25,1.25] [-0.625,0.625] [-0.3125,0.3125] [-0.156,0.156] [0,10] [0,5] [0,2.5] [0,1.25] [0,0.625] [0,0.3125] command: not supported subdevice 1: type: 2 (analog output) number of channels: 2 max data value: 65535 ranges: all chans: [-10,10] command: not supported subdevice 2: type: 5 (digital I/O) number of channels: 24 max data value: 1 ranges: all chans: [0,5] command: not supported [root_at_imi demo]# comedi-0.7.68 comedilib-0.7.21 Many thanks in advance Alfonso Fernandez
Received on 2004-04-06Z06:27:21