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

[python] sht for U3


  • Please log in to reply
5 replies to this topic

#1 giorgio

giorgio
  • Members
  • 2 posts

Posted 26 February 2008 - 11:11 AM

Hi. The example sources that come with the python driver include a script for reading temperature and humidity using the EI-1050 probe; the name of the script is sht.py Unfortunately that script seems to be designed to work with U9. Does anyone have an equivalent U3 version or knows how to adapt it? Thanks

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 February 2008 - 08:45 AM

See attached.

Attached Files



#3 giorgio

giorgio
  • Members
  • 2 posts

Posted 09 March 2008 - 02:07 PM

See attached.

Thank you a lot. It works fine.
Just one note: the second import line (From U3 import u3) is not necessary and has to be remove or the program won't even start.

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 17 March 2008 - 03:32 PM

Thank you a lot. It works fine.
Just one note: the second import line (From U3 import u3) is not necessary and has to be remove or the program won't even start.


It's fixed in the LabjackPython download. That's where you'll find the most up-to-date Python examples.

http://www.labjack.c...bJackPython.zip

#5 sharkey

sharkey
  • Members
  • 1 posts

Posted 09 October 2013 - 04:23 PM

Hey. I am having issues trying to get shtu3 to run. I keep getting the error:

LabJackPython.Write(deviceHandle, sendBuffer, 12)
AttributeError: 'module' object has no attribute 'Write'

I have managed to fix other AttributeErrors like the one for 'LabJackPython.OpenLabJack' by changing some capitalization to 'LabJackPython.openLabJack'. I am unsure of how to fix the 'Write' attribute. Help would be appreciated. Thanks



#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 October 2013 - 03:28 PM

shtU3 is old code for LabJackPython in 2008, and will not run with current versions. The current LabJackPython has an sht1x method for U3, U6, and UE9 classes, and an EI-1050 example:

 

https://github.com/l...k/LabJackPython

 

I recommend using those for the EI-1050 and SHT1X functionality.

 

Also, the 'Write' is part of the LabJackPython.Device class now.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users