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 measurement of 8 different voltage values


  • Please log in to reply
5 replies to this topic

#1 kleanthise

kleanthise
  • Members
  • 3 posts

Posted 05 June 2014 - 04:12 AM

Hello guys, 

 

I recently bought a labjack U6-pro 

I manage to communicate with it using python .

I want to use it in an application where i am going to get eight different values of voltage and store them in a text file on my computer.

My problem is that at the moment i have just connected two AIN0 and AIN2 to a voltage source with a small resistor so as to have a tiny voltage difference.

 

import u6, time
d = u6.U6()
d.configU6()
{'BootloaderVersion': '6.15',
 'FirmwareVersion': '0.88', 
}
FileName = r'Z:\TFTS-PC\Labjack_2101493.txt'
SleepTime = 1 # wait time in seconds    
fileHandle = open ( FileName, 'a' )
fileHandle.write ('Time\tT1(K)\tT2(K)\tT3(K)\tinpV(V)\tVDev(V)\tR(ohm)\n')
fileHandle.close()
for i in range(1,100):
   
    input0 = (d.getAIN(0))
    input1 = (d.getAIN(2))
    print input0, input1
    time.sleep(1)
 
I am using the above code but the output it fluctuates a lot.
Is there any solution to that? 
 
Thanks,
Kleanthis


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 05 June 2014 - 11:57 AM

So you have too much noise or variation?  Start with this app note:

 

http://labjack.com/s...-and-resolution

 

Start by jumpering AIN0 to GND and AIN2 to GND.  You can then take readings and confirm that the U6 performs similar to the noise levels from Appendix B of the U6 User's Guide.



#3 kleanthise

kleanthise
  • Members
  • 3 posts

Posted 16 June 2014 - 09:09 AM

Thank you very much for your quick reply. I recently bought a relay driver 

LJU39RL8 - Relay Board for the LabJack U3 and U6 and is connected to labjack U6 using the DB15 connector .

I am using the following code

EIO0_STATE_REGISTER = 6008

EIO1_STATE_REGISTER = 6009
 
d.writeRegister(EIO0_STATE_REGISTER, 0) 
d.writeRegister(EIO1_STATE_REGISTER, 1) 
 
To enable relay 1 and disable relay 2 but it seems to doesnt work when i set both values to 0 to enable both relays and when i am setting them to 1 it disables both . Am i doing something wrong ? 
 
Thanks again


#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 June 2014 - 09:23 AM

I don't quite follow what does work and what does not work?  Please clarify.



#5 kleanthise

kleanthise
  • Members
  • 3 posts

Posted 17 June 2014 - 04:38 AM

I can see that when i enable the relay lets say relay 1 and relay 2 i get the output measured from labjack correctly. When i disable both of relays it gives me 0 output that is correct but when i am trying to use a combination of either relay 1 or relay 2 on the output seems to doesnt respond correctly. Is there anything wrong in the code that i am using ?



#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 17 June 2014 - 01:56 PM

Your code looks fine to set EIO0 to output-low (0V) and EIO1 to output-high (3.3V).  We are not familiar with the LJU39RL8, so remove that and use a DMM to measure the voltage on EIO0 or EIO1 versus ground to confirm they are set properly:

 

http://labjack.com/s...sers-guide/2.12




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users