Using ADC-100 with USB-parallel port adapter under Labview

Post general discussions on using our drivers to write your own software here
Post Reply
dnalorraht

Using ADC-100 with USB-parallel port adapter under Labview

Post by dnalorraht »

For several years I am using a ADC101 (programatically identical to ADC100) with my custom made Labview software for data logging. Everything worked fine until some people here switched to Windows XP, where on 2 PCs the ADC-101 is not working anymore. I tried several things which were recommended in other posts, like modifying the WIN.INI file, but it did not help.

So yesterday I bought the USB-parallel port converter from PICO, as PICO recomments this as a work around for exactly this problem. The good news is, that the PICOLOG software is now working properly. However, I can still not get into contact to the ADC-101 via Labview. The documentation of the ADC10032.DLL states, that the port number should be 101 for the USB-parallel port adapter. But if I, e.g., run the open_adc100 routine from that DLL, it is never able to open it, i.e. the return value is always 0. Also the sample Labview programs supplied by PICO are not working if I set the port number to 101.

Can somebody help me out of that?

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

I am sorry this response has been so long in coming, but I wanted to do some tests with Labview and the ADC-101.

I tried the ADC-101 on XP and found that it opened the driver everytime with the USB (Port no 101).

You mentioned that Picolog was working, is this being used on the USB Port. If so then the same function adc100_open_unit is used for Picolog and the one being called in Labview, check that you are using the same .dll for both applications.

Best regards,
Mark S.
Regards,

Mark Spencer

dnalorraht

Post by dnalorraht »

Yes, there was an old DLL stil on my computer which was used by Labview, thanks for your efforts

Roland

dnalorraht

still not working

Post by dnalorraht »

Hi again, unfortunately I have still problems with the USB-converter for the ADC-101 under Labview. I am using now the newest ADC10032.DLL (I think a version from 22 Nov 2002). I am using Win XP and LabVIEW 7.

The open_adc100 routine is working properly when I chose port number 101. After this the red LED of the USB-converter lights permanently up. Also the functions set_range, set_interval, set_trigger (I am not totally sure whether these are the official function names) seem to work properly. But when finally get_block_adc100 is called, LabVIEW crashes with the error message:

"Assertion failed: (current_unit_ptr-> state== US_BLOCK_COMPLETED) || (current_unit_ptr-> state== US_BLOCK_FULL), file a100usb.c, line 657 "

The used LabVIEW source code is working reliable now for years, the only change I used was setting port number to 101.

Does somebody maybe have some Labview sample code which works with the USB-converter + ADC-101 (or ADC-100)?? The Labview sample code which is provided by Pico together with the driver software of the ADC-101 is also not working on my PC.

Hope somebody can give some hints!

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

This is a known bug with the the ADC-100/101 driver, however it has been fixed and is available for download.

Best regards,
Regards,

Mark Spencer

dnalorraht

Post by dnalorraht »

Hi Mark,

Thanks for the advice, I tested the new driver, now it is running without error messages, and I am getting data from the get_block_adc100 function. BUT, these data are not the actual voltages connected to the channels A and B, rather they are always showing the values of the actual chosen maximum range.

Any hint about this?

Best, Roland

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

Check waht you are getting form Picoscope, it sounds like you are not actually connecting to the unit. If you open Picoscope and select the ADC-101 when you open the application again does the voltage read the maximum, if this is the case you are not getting a communication between PC and ADC-101.

Check you BIOS settings they should be set to one of the following:
SPP, Normal, Unidirectional or output only.

They should not be set to ECP, EPP or bi-directional.

Best regards,
Regards,

Mark Spencer

dnalorraht

Post by dnalorraht »

Picoscope and Picolog are working without problems. I checked the parallel port BIOS settings, it was ECP. I changed it to "normal" (AT-compatible) but the problem persists. I can open the ADC101 from Labview, the LED on the USB-adapter lights up, but all voltage readings are always equal the minimum of the chosen voltage range.

Roland

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

I am not convinced that the driver is opening the unit, when you tried Picolog and Picoscope did you use the new driver that you downloaded or the original driver. Try this try to open the unit with out it being connected to to USB adapter, are the results the same if they are it is certainly implying that the unit is not being opened.

When opening the unit it returns one if it finds the port not if it finds the unit. If you could try a different PC this might be a help.

Best regards,
Regards,

Mark Spencer

dnalorraht

Post by dnalorraht »

Hi Mark,

I partly solved the problem, with the USB-converter the ADC-101 is acting as "streaming"-device, where you have to call the "run adc100" routine before you read a block of data. My old software did not use the "run adc100" routine, as it was not necessary for the normal parallel port.

But there comes the next problem. After calling the "run adc100" routine, I check the "ready adc100" routine in a while loop, whtether the data are available for reading them with the "get block" routine. This works fine if I try to read 10 readings with 1ms intervals. But for any higher number of readings (e.g. 100 readings 1 ms, or 10 readings 10ms) the "ready adc100" routine never returns TRUE, and the program is stuck in the while loop.

Best regards, Roland

User avatar
ricardo
Advanced User
Advanced User
Posts: 71
Joined: Wed May 07, 2003 9:43 am

Post by ricardo »

Hi,

Unfortunately our LabView expert (Mark) is on holidays, he will be back on the 2nd of January. All I can suggest is that you have a look at the C examples to see how the 'run ADC100' and 'ready ADC100' routines are used.

Best regards,

Ric
Ricardo Paloschi
Sales Engineer
Forum Moderator

dnalorraht

Post by dnalorraht »

I compared my Labview program with the sample C code, and I cannot see any essential difference!?

Best, Roland

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

I am sorry to hear that you are still experiencing this problem.

When you are streaming with the ADC-100/101 you do not need to call ready, just run.

Best regards,
Regards,

Mark Spencer

Post Reply