Test and Measurement Forum

ADC-16 Values

Post your VB and VBA discussions here

ADC-16 Values

Postby MHims » Tue May 08, 2007 6:47 pm

Hi,

I work as a software developer and I'm currently working on a redesign of the ADC-16 GUI for a client.

The application is an underwater robot that uses equations to convert Pico's read data into actual real values such as depth and heading etc.

We've run the sample VB6 project and the results are nothing like what the 'actual' Pico software gives when we put the numbers through the equations Pico uses. Thinking that it was the conversion of the read data to a mV reading I repeated it by taking just read value and still when run through the equations we get completely different values.

Could someone please explain how I obtain the values Pico reads before applying the conversion equations using VB6? It seems that the value the sample project reads is totally different.

Cheers,

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Wed May 09, 2007 10:20 am

Hi and thank you for your post.

I need to find out a little more about what you are doing exactly. You say you put equations and you are using VB6. So are you using our software or are you writing your own software? What do these equations do, what are you trying to measure and how are you measuring it? The more information you can provide, the easier it will be to help you.


Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Wed May 09, 2007 1:14 pm

Hi,

I've attached a screenshot from an Excel Spreadsheet that should hopefully get my point across more clearly (though the program itself is being coded in VB6).

On the left are the Channels (Eight is unused), the column titled ADC-16-32Bit(2) is the value the sample VB6 project returns. The column titled Pico Display is the values that the PicoLog Recorder shows at the same time*. Resolution is self explanatory** and the Pico Equation is the Scaling Equation copied and pasted from PicoLog Recorder.

The problem I have is that when I take the ADC-16-32Bit(2) Data and run it through the scaling equations I get a completely different value to what the PicoLog display shows. Any ideas on getting the two to 'match up'?

Hope that makes it clearer,

Cheers,

Michael

* - The VB6 project and the PicoLog recorder were actually run one after the other but nothing was done that would cause a significant change in the read data.

** - One slight difference between the VB6 program and the PicoLog Recorder was that in the VB6 one all channels were set to 16bit resolution whereas in the Recorder only Channel 2 (Heading) was set to 16 Bit resolution.
Attachments
Data.JPG
(118.35 KiB) Downloaded 2237 times
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Thu May 10, 2007 1:16 pm

Hi,

What if you do not put the scaling equations are your raw values from PicoLog the same as those done in VB6?

Kind regards
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Fri May 11, 2007 3:10 pm

Hi,

Channel 1 doesn't have a scaling equation only 2 through 7 and as you can see from the table the VB6 project was reading just over 7mV while the Pico program was reading 2138mV.....

Cheers,

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Tue May 15, 2007 9:18 am

Hi, I am still a little unclear about the problem however the following information may be of use to you:

"The ADC-16 generates readings which are in ADC counts. The scaling of these values depends on the resolution.

Resolution |Maximum ADC value
8| 255
9| 511
10| 1023
11| 2047
12| 4095
13| 8191
14| 16383
15| 32767
16| 65535
"

So to get you real value you would need to do the following calculation:

(5 * raw value/max ADC value) -2.5

Hope this helps.
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Thu May 17, 2007 6:22 pm

Hi,

It still doesn't make the values match up. I'll try to explain it again....

I've compiled the sample program (SP) and run it and noticed that the values that it reports are different to what the PicoLog recorder produces.

So where the sample program will say Ch1 is 45mV if I then close down it down and open PicoLog Recorder it will say that the same Ch1 is something different like 2894mV even though nothing has changed - certainly nothing that would cause such a wide change in the readings.

Right now I'm concentrating purely on Ch1 as that's purely a mV reading so you can forget about the scaling equations I mentioned earlier.

Cheers,

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Fri May 18, 2007 10:52 am

Hi, which version of the software are you using?
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Fri May 18, 2007 4:49 pm

PicoLog Recorder Driver Version 2.4

Cheers,

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Mon May 21, 2007 8:50 am

Hi mean the software not the ADC16, if you click on help->about it will give you the release version.
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Mon May 21, 2007 2:25 pm

Oh sorry, PicoLog Release 5.11.8

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

Postby ziko » Mon May 21, 2007 2:33 pm

What I would suggest is to download the latest version of our software and see if this makes a difference, we are currently on 5_16_2. Let me know how you get on.
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby MHims » Sat May 26, 2007 6:30 pm

Hi,

Sorry for not getting back.

I don't actually have the ADC-16 here and the person that does is currently moving house. However he's told me that he can try it around 1st June.

I'll let you know how it goes.

Cheers,

Michael
MHims
Active User
Active User
 
Posts: 13
Joined: Tue May 08, 2007 6:39 pm


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests