Jump to content

Question

Posted

Hi,

I'm working on a Windows/VS application using MCC USB-2404-UI - this takes a single reading per channel (up to 3) at a rate of up to 10 Hz (every 100 ms). I'm using a AIn32() call for each read, and it does not seem to be keeping up with the desired rate - IOW, it seems to be taking >100ms per call. Is this normal/typical? I'm surprised at this, so want to make sure I'm not missing something. I'm considering moving to the scan function instead, but want to make sure I really need to do this before heading down that road (as it's quite a big change to how the application collects data and updates the UI).

Thanks,

Ben

5 answers to this question

Recommended Posts

  • 0
Posted

Hello @Ben Gale.

The USB-2404-UI has the following conversion times depending on the device's configuration in InstaCal or your code.

image.png

What are your device's settings?  For example...

image.png

 

From the MCC UL Help:

image.png

 

The AIn32() function is system dependent when acquiring data, especially in a loop.  Consider using the AInScan() function for your desired acquisition rate.

Regards,

Fausto

  • 0
Posted

Thanks for the response. The ADC timing mode is indeed set to "High Speed". I have 4 channels on the device, each set to voltage mode, and am reading from one of them using an AIn32() function, and am seeing that each read is taking right around 100ms (it's much slower - 400 to 1100ms in the other ADC modes). You say that "The AIn32() function is system dependent when acquiring data, especially in a loop", so I guess that's what I'm seeing. Surprised that it's so slow, but will look at using the AinScan() method.

  • 0
Posted

Actually, can you point me to some example vb.net code that shows the usage of AinScan() please? I can't figure out what to do with the memhandle parameter - thanks.

  • 0
Posted

The VB.NET examples are located in the C:\Users\Public\Documents\Measurement Computing\DAQ\VB.NET directory.

The UL Help lists the examples that use the AInScan() method.

image.png

 

image.png

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...