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.


Photo

U6_EFunctions questions. (VB 2010 Express)


  • Please log in to reply
3 replies to this topic

#1 Rogerio

Rogerio
  • Members
  • 9 posts

Posted 20 September 2012 - 02:04 PM

Ok, I was going through the U6_EFunctions example on DotNet_LJUD and can't figure out something. On read an analog input this is used: 'Take a single-ended measurement from AIN3. binary = 0 LJUD.eAIN(u6.ljhandle, 3, 199, dblValue, -1, -1, -1, binary) ainThreeDisplay.Text = dblValue But according to the users guide, there should be a 0 or a 15 where there is 199? Why does 199 work? Then for range, resolution and settling they use -1,-1,-1, I can't find anywhere that lists -1 as a possible value for this. How does this work? If I wanted to read input 3 single ended, +-10v, resolution 2, 0 settling time, what would it look like? Thanks!

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 20 September 2012 - 03:37 PM

In the past we had different numbers that meant ground on different devices, but moving forward we try to always use 199. You can see in table 2.6.1-2 that 0/15/199 all mean single-ended:

http://labjack.com/s...ers-guide/2.6.1

-1 is a constant that means to use the driver default. I can't find that documented anywhere, so we either need to change the example or document what -1 does. For the U6, I suggest using an actual range constant and then use 0 for resolution and settling.

Your requested eAIN would look like:

LJUD.eAIN(u6.ljhandle, 3, 199, dblValue, LJUD.RANGES.BIP10V, 0, 0, binary)

#3 Rogerio

Rogerio
  • Members
  • 9 posts

Posted 20 September 2012 - 04:07 PM

Thanks, got that. Now an old doubt I had comes back! I'm using a U6, must all input ranges on the U6 be bipolar? If I am reading a 0-10v output from a pressure sensor what range should I use? LJUD.RANGES.BIP10V or LJUD.RANGES.UNI10V Thanks!

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 20 September 2012 - 04:10 PM

The U6 has 4 actual ranges in hardware:

http://labjack.com/s...ers-guide/2.6.2

If you pass UNI10V, the driver will tell the U6 to use BIP10V. In fact, any UNI or BIP range that is >1V will result in BIP10V.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users