PS4000AConsoleStreaming Example wrong values

Post your .Net discussions here
Post Reply
Sonyx911
Newbie
Posts: 0
Joined: Sun May 20, 2018 8:59 am

PS4000AConsoleStreaming Example wrong values

Post by Sonyx911 » Sun May 20, 2018 9:17 am

Hello,

I am using your PS4000a Example Code, specifically your ConsoleStreaming Example. And this is where the Problem begins. The Hardware I use is the PS4824.

All Examples like BlockCapture in C# or the C-Example Stream gave me the right Values.
Only the Example for C# ConsoleStream seems to save totally wrong values for the Channels. I wonder if you are aware of that. I tested it on different Computers and it gave me always the same wrong Values for the Voltage.

Right Values with C-Stream

Code: Select all

   
Max ADC    Max mV  Min ADC  Min mV      Max ADC    Max mV  Min ADC  Min mV   
ChA    16594 =     506mV,       0 =       0mV   ChB    16979 =     518mV,       0 =       0mV   
ChA    16524 =     504mV,       0 =       0mV   ChB    16979 =     518mV,       0 =       0mV   
ChA    16647 =     508mV,       0 =       0mV   ChB    17014 =     519mV,       0 =       0mV   
ChA    16189 =     494mV,       0 =       0mV   ChB    16627 =     507mV,       0 =       0mV 
ChA    16559 =     505mV,       0 =       0mV   ChB    16996 =     518mV,       0 =       0mV   
ChA    18514 =     565mV,       0 =       0mV   ChB    18526 =     565mV,       0 =       0mV   
ChA    16119 =     491mV,       0 =       0mV   ChB    16733 =     510mV,       0 =       0mV   
ChA    16348 =     498mV,       0 =       0mV   ChB    16592 =     506mV,       0 =       0mV   
ChA    16489 =     503mV,       0 =       0mV   ChB    16926 =     516mV,       0 =       0mV   
ChA    16453 =     502mV,       0 =       0mV   ChB    16838 =     513mV,       0 =       0mV   
ChA    16559 =     505mV,       0 =       0mV   ChB    16944 =     517mV,       0 =       0mV   
ChA    16559 =     505mV,       0 =       0mV   ChB    16979 =     518mV,       0 =       0mV   


Wrong Values with C#-Stream

Code: Select all

Ch  Max ADC    Max mV   Min ADC    Min mV   Ch  Max ADC    Max mV   Min ADC    Min mV   
ChA    3225        98         0         0   ChB    5957       181         0         0   
ChA    3102        94         0         0   ChB    6028       183         0         0   
ChA    3172        96         0         0   ChB    6080       185         0         0   
ChA    3155        96         0         0   ChB    6045       184         0         0   
ChA    3049        93         0         0   ChB    5940       181         0         0   
ChA    3102        94         0         0   ChB    6010       183         0         0   
ChA    3137        95         0         0   ChB    6028       183         0         0   
ChA    3155        96         0         0   ChB    6045       184         0         0   
ChA    3155        96         0         0   ChB    6045       184         0         0   
ChA    3366       102         0         0   ChB    5957       181         0         0   
ChA    2785        84         0         0   ChB    5869       179         0         0   
ChA    3137        95         0         0   ChB    6098       186         0         0   
ChA    3260        99         0         0   ChB    6168       188         0         0   
ChA    3190        97         0         0   ChB    6116       186         0         0   
ChA    3102        94         0         0   ChB    6028       183         0         0   
ChA    3119        95         0         0   ChB    5993       182         0         0   
ChA    2943        89         0         0   ChB    5834       178         0         0   
ChA    3348       102         0         0   ChB    6784       207         0         0   
ChA    3401       103         0         0   ChB    5448       166         0         0  
In the C#-Streaming Example there are no values even near the right Voltage (500mV). The values are more likly to be around 20mV while the Recording. The Beginnng is more an Exception with values around 90-190mV

Thank you for your Attention.
Greetings,
Daniel

Hitesh
PICO STAFF
PICO STAFF
Posts: 2854
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PS4000AConsoleStreaming Example wrong values

Post by Hitesh » Mon May 21, 2018 9:05 am

Hi Daniel,

Thank you for bringing this to our attention.

Are you building your application for 32-bit or 64-bit platforms and is it just a DC signal source that is being input on the channels?

What input voltage range is being used for each channel?

Regards,
Hitesh

Software Dev. Engineer

Sonyx911
Newbie
Posts: 0
Joined: Sun May 20, 2018 8:59 am

Re: PS4000AConsoleStreaming Example wrong values

Post by Sonyx911 » Mon May 21, 2018 9:36 am

Hello Hitesh,

At first thank you for your fast reply.

I am working on a 64-Bit System and also build an 64-Bit application. The PicoSDK 64-Bit ist freshly installed.
Yes I am only using DC signal Source for the Values, so like in every other example I have tried.

For this specific Example of Stream I used the 1V Range for both Channels. But I also tried it with other Ranges like 5V, 10V or 20V. Always the same outcome: C-Stream -> right Values, C#-Stream -> totally wrong. C#-Block gave me also right values.

I already tested a little bit and at the momemt I am using a workaround, by using a C-Exe for the Stream in a C# Form. But it would be a lot easier to have a working C#-Stream.

Thank you and Greetings,
Daniel

Hitesh
PICO STAFF
PICO STAFF
Posts: 2854
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PS4000AConsoleStreaming Example wrong values

Post by Hitesh » Tue May 22, 2018 10:38 am

Hi Daniel,

It looks as though in the example, the channels were set to AC coupling.

The PS4000AImports.cs file and the example file have been updated to use Coupling enum type and set the channels to DC coupling. You can obtain the latest files from the GitHub repository.

Hope this helps,
Hitesh

Software Dev. Engineer

Sonyx911
Newbie
Posts: 0
Joined: Sun May 20, 2018 8:59 am

Re: PS4000AConsoleStreaming Example wrong values

Post by Sonyx911 » Tue May 22, 2018 12:50 pm

Hello Hitesh,

Thank you! It worked like you said. There was just the Problem with the AC/DC Thing and now everything works like it should.

A really big thank you from me and my Professor for your attention and quick reaction.

Greetings,
Daniel

Hitesh
PICO STAFF
PICO STAFF
Posts: 2854
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PS4000AConsoleStreaming Example wrong values

Post by Hitesh » Tue May 22, 2018 4:07 pm

Hi Daniel,

Thanks for confirming that the change works! :D

Regards,
Hitesh

Software Dev. Engineer

Post Reply