Help using ADC11 with labview

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

Help using ADC11 with labview

Post by lee »

Since the provided vi doesn't do what I want I am trying to create my own labview drivers, Ihave managed to call most of the functions but can't get adc_11_get_times_and _values to work.
I suspect it is that I havent got the right data types going into the 'call library function node' but I think I have tried every single combination that makes sense. has anyone got a working example so I can see what I am doing wrong. I haven't really had to use library function nodes before so it is probably some misunderstanding on my part.

Thanks
Lee

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

Post by markspencer »

Hi,

Unfortunately, I do not have a worked example demonstraiting this. However, when you call the adc11_get_times_and_values there are two parameters that are pointers, in Labview you will need to use arrays. The next point is that the array for the values should be:

values array = number of samples requested * number of active channels

The Number of values is the value passed in the get_times_and_values function as the third argument. The number of active channels is set in the function call adc11_set_interval.

Finally the values array, has reading one after the other eg if three channels are used then the array would look similar to this

array 1, 2, 3, 1, 2, 3, 1, 2, 3 ........ etc.

To start with I would recommend that you try this function with just one channel activated. If you are unable to get any response check the ADC11 with Picolog.

Perhaps someone else on the forum can give you a worked example.

Best regards,
Regards,

Mark Spencer

lee

Post by lee »

Thanks, I think I have got it all working correctly now. Once I have a bit of spare time and have tidied the VIs up a bit I intend to make the library freely available to save others the hassle of reinventing the wheel everytime
Lee.

Nico

Help using ADC11 with labview

Post by Nico »

Hi,
I'm using the ADC11 and LabVIEW 6.1 with Windows 2000.
I'm trying to build my Labview driver. First, I open the port with a "Call Library Function Node", then try to use the ADC11_set_interval routine, but I receive an error message :
"An exception occured within the external code called by a Call Library Node. This may have corrupted LabVIEW's memory...."
Concerning the parameters, I've build an array with only one element to pass the pointer of the channel.
If anyone has a working example of a LabVIEW driver...I would appreciate to check where my errors are...
Thanks,
Nicolas

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

Post by markspencer »

Hi,

We provide a free example demonstraiting how to use the ADC-11 and Labview, these can be downloaded by following the download link at the bottom of the page.

Best regards,
Regards,

Mark Spencer

lee

Post by lee »

Unfortunately the example provided isn't really particularly helpful as it only calls a labview specifc function called in the dll.
If anyone needs it I have produced a set of vi's to call the other , more useful, functions in the dll as documented in the help files along with lots of trial and error. Unfortunately I haven't had time to tidy it up properly or fully test it which is why I am not making it publicly available on a website yet, but we have succesfully written applicatins to acquire and process multiple channels.
Lee

Post Reply