Jump to content
  • 0

cbAInScan Parameters - A/D conversion rate


Daniel123

Question

I am taking over software for project which previously used USB2637 for 8 channels of A/D acquisition, and we are now switching over to USB-1808.  Acquisition of 8 channels (previous code,  for USB-2637) is performed in software by

 

Options =  BACKGROUND + EXTCLOCK + SINGLEIO +CONTINUOUS;   

ULStat = cbAInScan(BoardNum, LowChan, HighChan, Count, &Rate, Gain, ADData, Options);

 

We have a 1kHz external clock which is EXTCLOCK signal.

Count = 4096, and Rate =1000  (though since we are using EXTCLOCK,  I believe that Rate is not used…)

 

I am trying to understand what Count = 4096 parameter accomplishes.  We are triggering acquisition of 8 channels every 1ms,  and 8 samples are transferred into memory (ADData) buffer at this rate. 

 

According to Universal Library help file,

Count:  The number of A/D samples to collect. Specifies the total number of A/D samples that will be collected. If more than one channel is being sampled, the number of samples collected per channel is equal to Count / (HighChan – LowChan + 1).

Does this still apply  - even if we are triggering at 1KHz? 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Daniel123.

From the limited information provided of your application's requirements, you ought to be able to seamlessly swap the MCC USB-2637 with a MCC USB-1808X.  

21 hours ago, Daniel123 said:

even if we are triggering at 1KHz? 

You're not configured for an external trigger, so you must be referring to the external clock rate.  Is that correct?

The MCC UL Help screen capture below, cbAInScan(), mentions how the Count value is used for buffering.  Another thing to note, since your external clock rate is 1 kHz, is that the SINGLEIO option is not required, but then again I do not know your initial developer's reason for having it.

image.png

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Thank you for your response and help with this.   I see how "Count" parameter is used to specify number of acquisitions before wraparound in buffer.

Yes - we are using external clock (rate = 1 KHz) - not trigger (as I incorrectly wrote).

In terms of SINGLEIO option - I also did not understand why initial developer used this option.  At one point (months ago...) he told me that "If we don't use SINGLEIO, we can't get data from the buffer every 1 msec.  The shared memory buffer would only be updated based on the BLOCKIO parameters.  "    At that time (and still,  and this time...) I am not clear what he meant.  We are acquiring 8 channels at 1000Hz = 8000Hz - so it would appear to me that SINGLEIO is not correct option.

In terms of swapping  USB2637 for USB1808  - one significant difference is that USB2637 is 16 bit resolution,  while USB1808 is 18 bit.  I could not find anywhere which describes how these 18 bits are moved into buffer.  16 bits is just 2 bytes/channel.  For 18 bits - are 3 bytes/sample going into buffer (and only use 2 bits of MSB)?

Thanks

 

 

 

Link to comment
Share on other sites

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...