C# SDK for PT-104 USB

Post your .Net discussions here
Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Post by Martyn »

I ran the code and selected various update rates and the results seemed quite normal, I didn't have any voltages applied but the readings would be representative for noise. On one occasion the values were always zero, which is why I was asking about status codes, I am guessing it had lost comms with the device at that point and the status return was non zero.
Martyn
Technical Support Manager

junedfird
Newbie
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Post by junedfird »

Dear Martyn,

Thanks for the response.

But, there is no problem when I use PICOLOG software. I never see such readings in your software.

The problem comes only when using own software.

Yes, when I changed the delay to other than "1 sec", the readings were always shown as zero in that software.

I will update you on the findings of the STATUS RETURN.

Thanks!

Juned

junedfird
Newbie
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Post by junedfird »

Martyn,

Please find the program modified to show return code.

Also attached is aan excel file, which shows the return code of ch3 and ch4, when connected with pressure transmitters.

juned
Attachments
returncodept-104.rar
Excel file
(8.48 KiB) Downloaded 560 times
UsbPt104 26032013 (Pressure Reading With Returncode).rar
Program with return code fields
(45.17 KiB) Downloaded 388 times

junedfird
Newbie
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Post by junedfird »

Martyn,

We used the form sent by you to log the values again.

Please find the screen shot of the values as logged.

We still are logging faulty readings of 42.xxxxx

I am really unable to spot the fault.

Thanks!

Juned
Attachments
software image with readings
software image with readings

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Post by Martyn »

What do you have connected to each of the pins on the connectors of Channel 3 and 4, a wiring diagram would be useful ?
Martyn
Technical Support Manager

junedfird
Newbie
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Post by junedfird »

Martyn,

As mentioned in my email to you, this problem is due to the negative voltages being sent to the PT-104.

Whenever, a negative voltage is sent, our software reads it as 42.xxxx, i don't know why?

Can you help in solving this?

How to handle negative values? do we need to change the variable type from LONG to something else, so that it can handle negative values also.

Juned

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Post by Martyn »

Try ULONG and see what you get
Martyn
Technical Support Manager

vampire790410
Newbie
Posts: 0
Joined: Wed Jan 15, 2014 2:27 pm

Re: C# SDK for PT-104 USB

Post by vampire790410 »

Hi everyone, i want to make a program that read from the PT-104 and tc-08 in c#. I am useing windows xp sp 3 and visual studio 2010. framework 4.0. I download the sdk from the site and i try to add in the reference the dll USBPT104 but give me an error.
The same i try to do with the drive usbtc08.dll and get the same error. Am i missing something? how i have to use the dlls?
A reference could not be added. please make sure the file is accessible is a valid assembly or COM component.
Thanks in advance for the answer.

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Post by Martyn »

The attached C# console example for the TC08 may help to get you going
Attachments
C# Example.zip
TC08 C# Console
(29.27 KiB) Downloaded 366 times
Martyn
Technical Support Manager

vampire790410
Newbie
Posts: 0
Joined: Wed Jan 15, 2014 2:27 pm

Re: C# SDK for PT-104 USB

Post by vampire790410 »

Thanks for your answer Martyn. It seems i need to wrap the dll like in the import.cs that is in the example and call the methods throught that. I will try when i receive the devices i ordered for this project.

Post Reply