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.


3.6V Analog Input range

u3 3.6V

  • Please log in to reply
1 reply to this topic

#1 startek

  • Members
  • 2 posts

Posted 08 September 2013 - 06:33 PM

There is stuff I've read here and there that the U3 has (0-)2.44V analog input or 3.6V. For example


//Request a read of AIN1 using the special 0-3.6 volt range.
AddRequest (lngHandle, LJ_ioGET_AIN_DIFF, 1, 0, 32, 0);

But what is making it go to 3.6V range? Is it the 32 in x1? I thought that was the return for the differential? In the header it says that 32 means to add Vref. This 32 in x1 obvioiusly has special meaning but it seems to be variable. I am currently reading about 3.0V on the input so I am assuming it is working.


It is really difficult to find something in the documentation - often it is just fragments in code examples. I couldn't find a list of all the IOType values to use (apart from the definitions in the header). There doesn't seem to be cross referencing of these with the other parameters (normal channel numbers would normally appear obvious but there are issues like what to put in x1 and when).



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 September 2013 - 11:52 AM

x1 is used for different things.  That is why it has such a generic name.  When an IOType needs something extra to be passed, x1 might be used:




The header is useful, but the pseudocode section of the U3 User's Guide is the place to go to see all the iotypes:




In general x1 is not used, so when it does have meaning that will be pointed out in the pseudocode in Section 4.3.  So near the top of Section 4.3.3, we see that where we list the iotype LJ_ioGET_AIN_DIFF, we point out that x1 is used to specify the negative channel (for a differential analog input reading):




The special 0-3.6 volt or -10/+20 volt analog input range is not a typical "range" in hardware that results from a programmable gain amplifier, but rather involves a trick where a differential reading is done internally with the voltage reference connected to the negative input.  So to get the special range when using the UD driver, you use the AIN_DIFF iotype and set the negative channel to 32.  The 32 is an arbitrary value that signals the driver to do what it needs to do to give you a 0-3.6 volt single-ended reading.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users