05-09-2013 12:05 PM - edited 05-09-2013 12:07 PM
There is no any other place for sending software trigger in our code.
In you code it is time out when you send no trigger at all.
Try to send less amount of triggers than samples in the set. Will it timeout?
We reciving all samples even when we send less amount of triggers then samples in the set for case when each sample in the sequence should be triggered
05-09-2013 12:34 PM
I just ran the code sending only 9 triggers instead of 10 and I received a timeout error. If you are not sending triggers anywhere else in your code, I am not sure why you would be experiencing this behavior.
Could you possibly try installing the .NET Class Libraries and running one of the included examples? There is an example titled Software Triggered Multipoint Acquisition that is similar to what you're trying to accomplish. I'd be curious if you still see the strange trigger behavior with the .NET API rather than using the DLL wrapper like you are now.
06-05-2013 09:01 AM
I have the same probelm. I use the 4071 dmm from CVI. I attached the NI I/O trace log. I inserted some niDMM_ReadStaus call to the code. The Acquisition_Backlog parameter of the niDMM_ReadStaus function is the number of available samples.
At point 40 I call the niDMM_Initiate. At point 42 you can see the niDMM_ReadStaus before calling the niDMM_SendSoftwareTrigger. The Acquisition_Backlog parameter of the niDMM_ReadStaus function is 1901. That means the acquisition was started before I call the niDMM_SendSoftwareTrigger.
I use the NIDMM 3.0.6 and CVI 12.0.1.
Because if I set the trigger source first to NIDMM_VAL_EXTERNAL, and after set to NIDMM_VAL_SOFTWARE_TRIG at point 38, the software works correctly.
06-05-2013 11:31 AM
Unfortuntely, it looks like there is an error in SourceTrigger property.
If setting it value first to External than to Software resolves it, it is indication of the error for sure
06-06-2013 12:58 PM
Thank you for the information.
I was able to reproduce some of the behavior you described. Also using CVI 12.0.1 and NI-DMM 3.0.6, I added some niDMM_ReadStatus functions to the Cont Multi Point - SW Sample Trig example from the Example Finder. Using NI I/O Trace, I was able to see that a sample is taken before the SW Trigger is ever asserted.
I was not, however, able to fix the issue by setting the trigger source to External prior to setting it to Software Trigger. I tried setting various values as my trigger source, but my results were always the same. Would you be able to attach the code you used to implement this fix? I'd like to recreate the workaround on my machine.
I will be speaking with some developers to see if we can determine why the DMM trigger functionality is behaving in this seemingly incorrect manner.
06-06-2013 07:15 PM
After some further investigation, it seems like the behavior I saw was expected. There was an issue with the example code I used that caused me to believe I was seeing the behavior you were describing. The Trigger Source parameter was set to Immediate by default, causing a sample to be written to the buffer as soon as Initiate executed. I saw this data point returned from the ReadStatus function and assumed it was a result of the problem you described. Changing the Trigger Source setting caused the problem to go away.
Based on your I/O trace, I see that you're performing a software triggered waveform acquisition. I first ran a SW triggered waveform acquisition with a couple of ReadStatus functions added. I attached the I/O trace (Trace.png). The ReadStatus function before the SendSoftwareTrigger call shows no data in the buffer, and the one afterwards shows data in the buffer. This appears to be working properly.
Just to see if anything would change I also created a version of the code in which I set the Trigger Source to External, then immediately set it to SW Triggered. This I/O trace is also attached (Trace 2.png). The behavior did not change.
Any advice or code you could give me that would help replicate the erroneous behavior would be greatly appreciated.
06-07-2013 03:46 PM
Using ReadStatus function before and after SendSoftwareTrigger call does not confirm that acquisition happened based on SoftwareTrigger.
Acquisition could happened just slowly and you will havbe the same result.
Propper testing approach should be the following:
For the same configuration of Multipoint data acquisition with Software Trigger - two tests: