Test and Measurement Forum

C# SDK for PT-104 USB

Post your .Net discussions here

Re: C# SDK for PT-104 USB

Postby Martyn » Mon Mar 25, 2013 3:17 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2350
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Postby junedfird » Tue Mar 26, 2013 6:05 am

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

Postby junedfird » Tue Mar 26, 2013 6:49 am

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 195 times
UsbPt104 26032013 (Pressure Reading With Returncode).rar
Program with return code fields
(45.17 KiB) Downloaded 183 times
junedfird
Newbie
 
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Postby junedfird » Tue Mar 26, 2013 11:49 am

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
readings screen print.jpg
software image with readings
junedfird
Newbie
 
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Postby Martyn » Tue Apr 02, 2013 6:19 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2350
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Postby junedfird » Thu Apr 04, 2013 12:33 pm

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
junedfird
Newbie
 
Posts: 0
Joined: Thu Jan 03, 2013 11:40 am

Re: C# SDK for PT-104 USB

Postby Martyn » Fri Apr 05, 2013 10:27 am

Try ULONG and see what you get
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2350
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Postby vampire790410 » Wed Jan 15, 2014 3:12 pm

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.
vampire790410
Newbie
 
Posts: 0
Joined: Wed Jan 15, 2014 2:27 pm

Re: C# SDK for PT-104 USB

Postby Martyn » Thu Jan 16, 2014 12:57 pm

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 161 times
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2350
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: C# SDK for PT-104 USB

Postby vampire790410 » Thu Jan 16, 2014 2:51 pm

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.
vampire790410
Newbie
 
Posts: 0
Joined: Wed Jan 15, 2014 2:27 pm

Previous

Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 0 guests