Recommended Posts

Hi all!

I have a LabJack with the Mux80 AIN expansion board with 3 CB37 terminal boards connected - I'm using it to record from 40 channels simultaneously.  It works fine (for the channels I've tested) but I'm running up against a maximum sampling frequency of 100,000 Hz / 40 channels = 2500 Hz maximum samples per second per channel.

I would like to increase the sampling frequency to perhaps 8,000 Hz, but if I try to record from all 40 channels at the same time at 8K Hz, it is above the limit of 100,000 Hz overall.

 

I'm only recording data for 2 seconds every 10 minutes - I'm thinking of making part of the recording in series rather than parallel.  For example, instead of recording from all 40 channels at the same time, record from the first 10 channels, then 11-20, 21-30, and 31-40 one group after the next in series.

Is this a good solution?  Would I just create different LJM_eStreamStart's with different identifiers?

scanRate = 8000

LJM_eStreamStart(identifier1, {"AIN0", "AIN1", "AIN2", "AIN3", "AIN120", "AIN121", "AIN122", "AIN123", "AIN124", "AIN125",}, scanRate, scansPerRead, 1)

LJM_eStreamStart(identifier2, {"AIN126", "AIN127", "AIN48", "AIN49", "AIN50", "AIN51", "AIN52", "AIN53", "AIN54", "AIN55",}, scanRate, scansPerRead, 1)

LJM_eStreamStart(identifier3, {"AIN62", "AIN63", "AIN64", "AIN65", "AIN66", "AIN67", "AIN68", "AIN69", "AIN72", "AIN73",}, scanRate, scansPerRead, 1)

LJM_eStreamStart(identifier4, {"AIN74", "AIN75", "AIN76", "AIN77", "AIN78", "AIN79", "AIN86", "AIN88", "AIN90", "AIN92"}, scanRate, scansPerRead, 1)

Then I would read from each one of these streams separately, one at a time.

Would that work?

Thank you,

B

 

 

 

Share this post


Link to post
Share on other sites
The eStreamStart() identifier specifies the device handle:
 
 
That handle will essentially always be the same for each eStreamStart call if you're using the same T4.
 
If you are going to stream in a series, you cannot do 4 consecutive starts like in your code with the same device. Multiple streams cannot run at the same time. You will need to start/configure the stream, do the reads, stop the stream, and then move on to the next set of channels to stream in your series.
 
The structure would look more like this:

LJM_eStreamStart(handle, {"AIN0", "AIN1", "AIN2", "AIN3", "AIN120", "AIN121", "AIN122", "AIN123", "AIN124", "AIN125",}, ...)
while (more to read) {
    LJM_eStreamRead(handle, ...)
}
LJM_eStreamStop(handle)

LJM_eStreamStart(handle, {"AIN126", "AIN127", "AIN48", "AIN49", "AIN50", "AIN51", "AIN52", "AIN53", "AIN54", "AIN55",}, ...)
while (more to read) {
    LJM_eStreamRead(handle, ...)
}
LJM_eStreamStop(handle)

LJM_eStreamStart(handle, {"AIN62", "AIN63", "AIN64", "AIN65", "AIN66", "AIN67", "AIN68", "AIN69", "AIN72", "AIN73",}, ...)
while (more to read) {
    LJM_eStreamRead(handle, ...)
}
LJM_eStreamStop(handle)

LJM_eStreamStart(handle, {"AIN74", "AIN75", "AIN76", "AIN77", "AIN78", "AIN79", "AIN86", "AIN88", "AIN90", "AIN92"}, ...)
while (more to read) {
    LJM_eStreamRead(handle, ...)
}
LJM_eStreamStop(handle)

Share this post


Link to post
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