Test and Measurement Forum

PT-104 and readout temperatur with ethernet

Post your VB and VBA discussions here

PT-104 and readout temperatur with ethernet

Postby ManzW » Fri Jul 15, 2011 11:52 am

Dear all,

I'm using the PT-104. This temperature data logger has two possible connections. USB + Ethernet. I'm writing a precedure in Visual Basic 6.0 to read out the temperatures. The procedure runs fine if I'm using the USB-connection for data transfer. There is also a funtion called "UsbPt104OpenUnitViaIp" where I can readout the temperature by the Ethernet connection (USB is still connected for powering). I used the tools "EthernetSettings" to set the IP-address to a free possible address (e.g. Using the written funtion crashes visual basic.
The called procedure has three variables. How can I enter the IP-address and/or how do I have to specify the variable?

Does anybody successfully used the "UsbPt104OpenUnitIp"?

Thanks for your assistance and help!


Re: PT-104 and readout temperatur with ethernet

Postby ManzW » Mon Jul 25, 2011 2:26 pm

Dear all,

I'm really sad, that nobody had any information for me :cry:

But I went into contact with a technical guy at picotech. He helped me to get it run. If there is somebody interested he can take a look to the attachment.

I also have another problem. There is a command called "UsbPt104IpDetails" but the datalogger always sends the error code #12 back (Pico_Invalid_Channel_Condition).

I tried to fix the problem with different variable types. But always the same error code back.

Has anybody a helpful information for me?

Best regards


Re: PT-104 and readout temperatur with ethernet

Postby jcgarcia » Thu May 16, 2013 9:17 am

i'm in the same trouble: programming in vb.net can´t use UsbPt104OpenUnitViaIP. So i'm interested in the way you solved it. ¿Could you help me in that?.
Thanks a lot.
Posts: 0
Joined: Thu May 16, 2013 9:12 am

Re: PT-104 and readout temperatur with ethernet

Postby Hitesh » Fri May 17, 2013 10:11 am


Please try the following:

Code: Select all
'Function declaration
Declare Function UsbPt104OpenUnitViaIp Lib "[Path]\USBPT104.dll" (ByRef handle As Short, ByVal serial As String, ByVal ipAddress As String) As Integer

Dim handle As Short
Dim status As Integer

'In Main function

Dim serial As String = Nothing
Dim ipAddress = "[Enter IP address]"

status = UsbPt104OpenUnitViaIp(handle, serial, ipAddress)

This has been tested with the dll from the latest SDK ( and MS VB 2010 Express.

Hope this helps

Technical Specialist
Pico Technology
Site Admin
Site Admin
Posts: 2023
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests