Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Finite Analog Inputs from Multiple Triggers - Error -50103 "The specified resource is reserved"

Hello,

 

I have a problem with error -50103.

 

I've looked through the knowledge base article but the answer is quite vague in terms of implementing a solution to my specific problem.

Knowledge base article

I am case 6 I think.  Running two analog input tasks concurrently.

 

I have two separate sources of analog data which from the perspective of parameters are identical but critically they are completely unsynchronised.  I need to acquire 1000 samples of data from each channel after a channel specific trigger event.  Both channels are generating their data at the same frequency but because they are unsynchronised sometimes the input samples will overlap and sometimes they won't.  I can acquire the data from both channels by sequentially starting and stopping the input tasks but that means I skip data in the situation when the two channels overlap.

 

I initialise each task with a create channel, channel timing and digital start trigger daq mx VI.  I then attempt to start each task in parallel in a while loop so that each can wait for the start trigger.  Both tasks are then stopped before the loop repeats the acquisition of the next lot of 1000 samples.

 

The sample of code which causes the error is shown below.  If I start, stop one task and then the other sequentially there is no problem... but as described above this doesn't work for me as I miss triggers and data.

 

Labview.png 

 

Any ideas?

Thanks.

 

 

0 Kudos
Message 1 of 13
(5,068 Views)

The problem here is that there is only 1 ADC and sample clock on the DAQ board.  So if one task reserves it, the other task will throw an error.  You either have to turn it all into a single task (I don't see why this is an issue) or use a second DAQ board for the second task.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(5,059 Views)

Thanks for the quick response.

If I turn it into a single analog input task, how can I have different digital start triggers for the acquistion on different channels? 

0 Kudos
Message 3 of 13
(5,056 Views)

@Ibboh wrote:

If I turn it into a single analog input task, how can I have different digital start triggers for the acquistion on different channels? 


That's the part I was unsure of.  If you have seperate triggers, then you need to use seperate DAQ cards.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 13
(5,052 Views)

Thanks again for your replies.

 

If anyone else knows a method without having to get two DAQ cards that would be appreciated.

0 Kudos
Message 5 of 13
(5,050 Views)
Can you do a continuous acquisition of both channels and the triggers and analyse with post processing?
0 Kudos
Message 6 of 13
(5,019 Views)

Acquire four channels continuously in one task. Put the triggers on the two extra channels. Then search through the data for the trigger signals and extract the relevant data subsets from the corresponding data channels.

 

Lynn

0 Kudos
Message 7 of 13
(5,002 Views)

Thanks for the last two suggestions (which I think are the same).

 

Anyone else out there know if there is a way to achieve this with finite samples acquisition?  

 

The tests that I run result in a lot of data and the duty cycle is such that only acquiring 1000 samples with each trigger is just about manageable.  But with continuous acquisition, the required sample rate would generate an order of magnitude more data.  I'd either have to post-process and cut the data down in each loop which would reduce the post-processing capability for the other analysis required or I'd have to collect a huge amount of data.

 

 

 

 

0 Kudos
Message 8 of 13
(4,999 Views)

What is your sample rate? 

 

What is the maximum time between the trigger on one channel and the trigger on the other channel (regardless of which comes first)?

 

What is the minimum time between the last sample in one data set (two triggers and 100 samples on each of two channels) and the first trigger of the next data set?

 

Do you have any other way (besides timing) to identify the separate data sets?

 

If we know more about your test setup, we may be able to offer better suggestions.

 

Lynn

 

0 Kudos
Message 9 of 13
(4,997 Views)

The parameters are varied... but as a typical example:

 

- Sample rate is 100ks/s

- Time between triggers can vary from 0 to 100 ms.  Once the test is triggered this separation should stay roughly the same for each iteration of the trigger.  But on reinitiating the whole test the separation will be something different as the two datasets are triggers are generated independently.

- The minimum time between the last sample in one data set and the trigger of the next is 0 ms.  In fact the next trigger can occur during the sampling of the first dataset as the two are independent.

 

 

 

 

 

 

0 Kudos
Message 10 of 13
(4,988 Views)