Test and Measurement Forum

ADC-20 LabVIEW Example not recognizing ADC-20

Post your LabVIEW discussions here

ADC-20 LabVIEW Example not recognizing ADC-20

Postby Moritz » Fri Feb 29, 2008 6:03 pm

Hey,

I have just installed the ADC-20 software and the PicoLog Recorder worked ok, but the example vi for LabVIEW doesn't seem to recognize the hardware, because the handle is permanently at 0. I have copied the PICOhrdl.dll to the working directory of hrdl.vi., it didn't seem to change anything. I am quite a starter in this so any help would be great!

Best Regards,
Moritz
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby gruntman » Fri Feb 29, 2008 7:17 pm

Moritz,

If the handle is continuously at 0 the program could not connect to the data logger. This is usually because something else is communicating with the unit. You don't have PicoLog running at the same time do you? Do the following for me. First close any open programs you have running, including PicoLog and Labview. Next disconnect the USB cable from the computer and wait about 15 seconds and then reconnect the cable. Now open the HRDL.vi and try running the program and see if it works. Let me know if it does or not...

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Postby Moritz » Sat Mar 01, 2008 1:19 pm

It makes sense, I guess PicoLog was running at the same time. I'll try next monday and I'll give you some feedback! Thanks a lot!
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby Moritz » Mon Mar 03, 2008 11:03 am

Hey, it's working ok since I don't have any other program communicating with the data logger. Now I'm having another problem, which is the large interval between acquisitions. Even with the conversion time at 60 ms, it seems that only every second I get a new value.

Thanks,
Moritz
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby Moritz » Mon Mar 03, 2008 12:09 pm

Other thing, the values displayed are rather different from the actual values, since I am comparing with a multimeter. When I choose a differential entry and port 1, is it between port 1 and port 2 or between port 1 and analogic ground? Measuring with Pico Log Recorder works just fine.

Thanks again,
Moritz
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby gruntman » Tue Mar 04, 2008 4:32 am

Moritz,

First off glad to hear that you got your unit running with the example program!

About your first question. How are you calling the get value function? In the HRDL.vi the program will call the open unit and close unit every time it is ran. If you have it doing this there will be a delay in the collection as the program will constantly have to open and close the units port. To get around this place a while loop around the rest of functions until you press a stop button.

Now on to your second question. When you choose a differential on channel 1 it is between pin 1 and pin 14 as seen below:
Pin Function
1 Channel 2 (Channel 1-)
2 Channel 4 (Channel 3-)
3 Channel 6 (Channel 5-)
4 Channel 8 (Channel 7-)
5 Channel 10 (Channel 9-)
6 Channel 12 (Channel 11-)
7 Channel 14 (Channel 13-)
8 Channel 16 (Channel 15-)
9 Analog Ground
10 +5 volts
11 -5 volts
12 +2.5 volts
13 Digital I/O 4'
14 Channel 1
15 Channel 3
16 Channel 5
17 Channel 7
18 Channel 9
19 Channel 11
20 Channel 13
21 Channel 15
22 Digital Ground
23 Digital I/O 1
24 Digital I/O 2
25 Digital I/O 3

Note that this pin output is for an ADC-24 and channel numbers in brackets apply when the input is set to differential mode and Channels 9 to 16 exist only on the ADC-24 and Digital I/Os 1 to 4 exist only on the ADC-24. Refer to the ADC-20 manual for more detail...

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Postby Moritz » Tue Mar 04, 2008 12:02 pm

Hello, I'm not sure which exactly is the get value function. The example vi I have, uses a call library function node sequencially. I have made some modifications to make it more suitable to me, I have replaced the stacked sequence with a flat sequence so it would be more clear to me. Secondly, I've tried to remove the first frame out and enclose the rest with a while loop, but it didn't work well afterwards.
Attachments
HRDL.vi
(28.95 KiB) Downloaded 299 times
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby gruntman » Tue Mar 04, 2008 7:27 pm

Moritz,

I have modified your code and reattached it for you to see how to properly call the unit continuously...

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
Attachments
HRDL.vi
Modified HRDL.vi
(27.43 KiB) Downloaded 307 times
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Postby Moritz » Mon Mar 10, 2008 5:13 pm

Hello,

Thank you for changing the vi. It is now calling the unit continuously, now the problem I have is that the values do not correspond to the actual voltage values I am measuring with a multimeter and an oscilloscope. I have tried different channels, still doesn't change much.

Regards,
Moritz.
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm

Postby gruntman » Fri Mar 14, 2008 7:17 pm

Moritz,

Which pins are you using and are you using it in single end or differential mode?

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Postby Moritz » Fri May 23, 2008 6:22 pm

Hey, sorry I haven't said anything in a while. I have solved the problem and I thought it would be of your interest to know what was wrong with the example.
The problem was that the ADC - 20 codifies the analog values in 20 bits and the data type of the parameter "value" was defined as a 16-bit unsigned int.
You can imagine that over a specific value (I guess 2,5/(2^16)) the values would come wrong.
So, all I had to do was open the configure box of the Call Library function and change the data type of the parameter "value" of a 16-bit unsigned int to a 32-bit unsigned int. Here is the changed vi.

Best Regards, Moritz!
Attachments
hrdl.vi
(28.7 KiB) Downloaded 301 times
Moritz
Active User
Active User
 
Posts: 7
Joined: Fri Feb 29, 2008 5:48 pm


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests