ADC-16 Values

Post your VB and VBA discussions here
Post Reply
MHims
Active User
Active User
Posts: 13
Joined: Tue May 08, 2007 6:39 pm

ADC-16 Values

Post by MHims »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by MHims »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by MHims »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by MHims »

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

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

Technical Specialist

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

Post by MHims »

PicoLog Recorder Driver Version 2.4

Cheers,

Michael

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

Technical Specialist

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

Post by MHims »

Oh sorry, PicoLog Release 5.11.8

Michael

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

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

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

Post by MHims »

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

Post Reply