Data logger Pt104, Ethernet problem

Post your Linux discussions here
Post Reply
lena
Newbie
Posts: 0
Joined: Mon Sep 21, 2015 12:15 pm

Data logger Pt104, Ethernet problem

Post by lena »

Hello,

I was successfully using RPi (Raspbian GNU/Linux 7 operating system) and a simple python script to obtain the temperature values. However when I wanted to switch from USB to Ethernet connection a problem occured.
Here is a part of the code that I was using for a USB connection:

Code: Select all

mydll=cdll.LoadLibrary('/opt/picoscope/lib/libusbpt104.so.2')
handlePointer=c_short()
temp=np.zeros((9,),dtype=np.int64)
status_unit=mydll.UsbPt104OpenUnit(byref(handlePointer),'Serial number')
print 'open unit status:', status_unit
mydll.UsbPt104SetChannel(handlePointer,1,1,2)
status_channel=mydll.UsbPt104SetChannel(handlePointer,1,1,2)
print 'open channel status', status_channel
For the Etharnet connection I just replaced the old status_unit with:

Code: Select all

status_unit=mydll.UsbPt104OpenUnitViaIp(byref(handlePointer),'Serial number','IP address')
I run the script as a root and for the values of status_unit and status_channel got the values of 3 and 12, respectively (instead of 0 and 0). I have to note that ethernet is enabled and running without any problems with a Picolog recorder.

Thanks in advance!

Hitesh

Re: Data logger Pt104, Ethernet problem

Post by Hitesh »

Hi lena,

When connecting via USB what value do you get for handlePointer?

Are you passing the strings 'Serial number' and 'IP Address' as an argument? If so, that would be incorrect - you should be passing the string representing the serial number e.g. 'ABC12/345', the IP address with port number (e.g. '172.16.0.2:6500') or pass a null parameter.

Regards,

Post Reply