PT-104 and readout temperatur with ethernet

Post your VB and VBA discussions here
Post Reply
ManzW

PT-104 and readout temperatur with ethernet

Post by ManzW »

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. 172.017.109.253). 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!

Regards

ManzW

Re: PT-104 and readout temperatur with ethernet

Post by ManzW »

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

Werner

jcgarcia
Newbie
Posts: 0
Joined: Thu May 16, 2013 9:12 am

Re: PT-104 and readout temperatur with ethernet

Post by jcgarcia »

Hi,
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.

Hitesh

Re: PT-104 and readout temperatur with ethernet

Post by Hitesh »

Hi,

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 (10.5.0.19) and MS VB 2010 Express.

Hope this helps

Post Reply