Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Analogue Input Range Configuration.

U3 IO Analogue Input

  • Please log in to reply
2 replies to this topic

#1 RRachev

  • Members
  • 4 posts

Posted 16 July 2014 - 02:59 AM



I am trying to take a single ended reading of a voltage using a U3-LV LabJack, and programming it in C#. The line of code I use to do so is as follows:


                            LJUD.eAIN(u3.ljhandle, 4, 31, ref Rec_Volt, 0, 0, 0, 0);


However the voltage is in the range +-10, and the readings only go as far as 2.5v. I would like to adjust the range of the readings, and I am trying to do so with the following line:


                            LJUD.ePut(u3.ljhandle, LJUD.IO.PUT_AIN_RANGE, 4, LJUD.RANGES.BIP10V,0);


However it does not adjust giving me the following problem: "Argument 4: cannot convert from 'LabJack.LabJackUD.LJUD.RANGES' to 'double'." & "Argument 5: cannot convert from 'int' to 'double[]'."

Does anyone have an idea of how to properly configure the range, and get the desired readings.


Thanks in advance.

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 July 2014 - 02:57 PM

From LabJackUD.h the constant for BIP10V is 2, but ranges have no effect on a U3 anyway so it won't do anything.


The normal range on all 16 low-voltage analog inputs is 0-2.4V.  If you take a differential reading with negative channel 32 you get the special 0-3.6V range.






So you can use a resistive voltage divider or the LJTick-Divider-BIP10V.  Or switch to a U3-HV, U6, or T7.

#3 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 July 2014 - 03:15 PM

Also, for a call like LJUD.IO.PUT_AIN_RANGE (which isn't used on the U3), the fourth parameter needs to be a double. Typecast BIP10V to a double to fix the "Argument 4: cannot convert .." error:


LJUD.ePut(u3.ljhandle, LJUD.IO.PUT_AIN_RANGE, 4, (double)LJUD.RANGES.BIP10V, 0);

Also tagged with one or more of these keywords: U3, IO, Analogue Input

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users