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

EI1050 Error from UE9/Ethernet Operation


  • Please log in to reply
4 replies to this topic

#1 RedSpanner

RedSpanner
  • Members
  • 37 posts

Posted 11 October 2012 - 05:41 PM

Hello, I've had two - EI1050 devices operating in a specific configuration based on a UE9 operating over TCP/IP, controlled via a LabjackPython script operating on a Mac on the network. The hardware works successfully using the ei1050 class module. The hardware configuration is unchanged. I'm trying to re-write the code using the ue9 low-level functions and the ue9.sht1x method but it doesn't work. The non-functioning code snippet is: [codebox] print 'Working on EI1050 operation...' EI1050Reading = d.sht1x(DataPinNum = 3, ClockPinNum = 4, SHTOptions = 0xc0) print EI1050reading [/codebox] the error message I get is: [codebox] Working on EI1050 operation... Traceback (most recent call last): File "Low-Level-Test.py", line 53, in <module> EI1050Reading = d.sht1x(DataPinNum = 3, ClockPinNum = 4, SHTOptions = 0xc0) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ue9.py", line 1127, in sht1x result = self._writeRead(command, 16, [ 0xF8, 0x05, 0x39]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/LabJackPython.py", line 539, in _writeRead self._checkCommandBytes(result, commandBytes) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/LabJackPython.py", line 528, in _checkCommandBytes raise LowlevelErrorException(results[6], "\nThe %s returned an error:\n %s" % (self.deviceName , lowlevelErrorToString(results[6])) ) LabJackPython.LowlevelErrorException: The UE9 returned an error: SHT1x_COMM_TIME_OUT (40) LabJack never received the ACK it was expecting from the SHT. This is usually due to incorrect wiring. Double check that all wires are securely connected to the correct pins. $ [/codebox] As mentioned, there are two EI1050 devices in the configuration connected to one UE9, but the ue9.sht1x method does not appear to allow the invocation of different 'enable' pins, corresponding to different devices. Is this part of the problem? If not, can you point me in the right direction for a solution? Thanks, Red

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 October 2012 - 11:44 AM

The sht1x method does not configure the enable or power lines. You will need to do this in your code before calling sht1x by using a digital line set to output-high or a DAC set to 3.3 V. You cannot power/enable the EI-1050 using the 5 volt VS terminal. Take a look at the "LabJack UD Series (U3/U6/UE9) Interface" section of the EI-1050 datasheet page for wiring information:

http://labjack.com/s...-1050/datasheet

#3 RedSpanner

RedSpanner
  • Members
  • 37 posts

Posted 13 October 2012 - 02:08 PM

The sht1x method does not configure the enable or power lines. You will need to do this in your code before calling sht1x by using a digital line set to output-high or a DAC set to 3.3 V. You cannot power/enable the EI-1050 using the 5 volt VS terminal. Take a look at the "LabJack UD Series (U3/U6/UE9) Interface" section of the EI-1050 datasheet page for wiring information:

http://labjack.com/s...-1050/datasheet

Actually, the hardware is physically wired as per your specs. In addition, I have pulled the power lines high for both EI1050 with the code below, which executes prior to the code listed in the original post on this thread. the code is:
#Set starting state: Pull FIO5 high to power both EI1050 devices, and...
# ...set MIO0 to Input (waiting to go to output state and drive SSR)
d.feedback(FIOMask=0x20, FIODir=0x20, FIOState=0x20, MIOMask=0x01, MIODirection=0x00, 
	MIOState=0x00)
d.getCalibrationData()
print 'Initialization ...Done\n'
I'll try creating some code to pull the enable line as required, and will post results here.
Thanks,
Red

#4 RedSpanner

RedSpanner
  • Members
  • 37 posts

Posted 13 October 2012 - 04:13 PM

As I mentioned elsewhere in this thread, I power up the two EI1050 as part of a startup block at the beginning of the code. I'm now looking at how to trigger the enable pin, to do the read. Here is the code block that pulls the enable pin and (tries to) read the device with the sht1x method: [codebox] print 'Working on EI1050 operation using sht1x method...' result = d.singleIO(IOType = 1, Channel = 6, Dir = 1, State = 1) print result EI1050Reading = d.sht1x(DataPinNum = 3, ClockPinNum = 4, SHTOptions = 0xc0) print EI1050Reading [/codebox] Here is how the output looks after execution: [codebox] Working on EI1050 operation using sht1x method... {'FIO6 State': 1, 'FIO6 Direction': 1} {'StatusReg': 0, 'Temperature': 18.72, 'StatusCRC': 117, 'Humidity': 49.12732160000001, 'TemperatureCRC': 0, 'HumidityCRC': 68} $ [/codebox] Now, my question is, with multiple EI1050, operating on different enable lines, any suggestions as to how to step through multiple emable pins? Thanks, Red

#5 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 October 2012 - 01:01 PM

You can use two singleIO calls to enable the two digital lines, or one feedback call to enable the digital lines at the same time. For example (assuming enable lines on FIO6 and 7):
d.singleIO(IOType = 1, Channel = 6, Dir = 1, State = 1) #enable FIO6
#perform sht1x call for EI-1050 1

d.singleIO(IOType = 1, Channel = 7, Dir = 1, State = 1) #enable FIO7
#perform sht1x call for EI-1050 2
or
#Enabling both FIO6 and FIO7
#hex 0xC0 is binary 11000000, which are the bits for FIO6 and FIO7 settings
d.feedback(FIOMask=0xC0, FIODir=0xC0, FIOState=0xC0)
#perform sht1x call for EI-1050 1
#perform sht1x call for EI-1050 2



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users