12-12-2007 10:36 AM
12-13-2007 05:04 PM
Hello Gerry,
If I am understanding the question correctly, you are seeing a 300ms delay
between your digital trigger signal and the beginning of your analog
output. This does seem quite long (unless you specify it), I would
expect to see an extremely small delay (if any at all). The triggering
and timing is taken care of in hardware once you configure your task and start
it, so it would surprise me greatly if Windows had anything to do with your
delay.
I also cannot see anything that sticks out in your code. Usually we configure
the triggering after the timing and before writing to the buffer, but I tried
this out on my computer and it still worked fine the way you have it. There
also was no delay between my trigger and generating samples. I did
program in LabVIEW, but the calls to the driver were the same. I have a couple
questions that may lead us in the right direction of the cause of the problem:
What hardware are you using?
How are you measuring the delay?
How much does the delay length change?
What is sending the trigger and how?
How long after you start the task is the trigger sent?
What are you trying to output?
Do you have any other tasks running at the same time?
Hopefully these answers will give me a better idea of what your program is
doing and possible problems that could be occurring.
12-18-2007 12:12 PM
12-19-2007 11:28 AM - edited 12-19-2007 11:29 AM
Hello Gerry,
The way the trigger works with the DAQmxCfgDigEdgeStartTrig function is that it
looks for the edge in order to detect the trigger. This edge needs to
fall within TTL specifications for level and rise time.
Because the required rise time is <50nS, your DC power supply may not
be providing a signal that is recognized by the trigger line. The change in
logic level without the correct rise time could cause the delay you are seeing.
Many of our cards have an analog triggering configuration that may work better
for your application. This uses an actual voltage level and sends an internal
trigger when that voltage is reached. The 6711 does not have this
functionality, but if you have access to a card that does, the function for
this would be DAQmxSetAnlgEdgeStartTrigSlope. There is a great
explanation on this in the NI-DAQmx C Reference Help (Start»Programs»National
Instruments»NI-DAQ). If you search for Analog Level Triggering it should be the
article with the same name. The functions should be the same in C as in
VB6.
I would recommend using a specific digital signal (perhaps from your 6711
directly) to send the trigger just to be sure. You can use a test panel
in Measurement and Automation Explorer (MAX) to control the digital line and
feed that output back into the trigger line. You can open a test panel by
right clicking your device:
I have a feeling this may be the source of the issue, if it is not, please post
back and we can look at other possibilities.