08-11-2006 08:35 AM
08-11-2006 09:36 AM
08-11-2006 09:53 AM
Thanks for your response Tom.
Yes, I had looked at the DAQmx C-Properties listing, my confusion stemming from the fact that the Delay, Delay Units, and Retriggerable properties are under the "More" section of Start Trigger rather than under "Digital Edge", "Digital Pattern", "Analog Edge" or "Analog Window". I therefore assumed that they applied to all of these cases, i.e. that they were general parameters for any type of Start Trigger. From a logical point of view, I'm still unsure as to why the delay would apply only to analog start triggers and not digital. Besides, the "Retriggerable" property is under the same heading ("More") and it seems to apply to digital start triggers.
08-11-2006 09:56 AM
Hi Jeff-
Sorry for the confusion- I meant to say that this applies to analog input operations, not analog triggers only. So, you can assign the start trigger delay for an analog input task for any trigger type. However, the start trigger delay is not applicable to any type of trigger for any type of task other than analog input. Let me know if this does not clear things up.
Thanks-
08-11-2006 10:14 AM
Ok, thanks again Tom.
Maybe you can help me a bit more, as I'm a bit confused about the application. As I mentioned, I'm trying to generate a pulse of specified width in response to each rising edge of an existing signal. I thought the proper way to do this was to create a counter output pulse generation task in single pulse mode (thus, I don't configure any timing), set up a start trigger, then set the retriggerable property to true. This works for the first pulse (I get the first output pulse in response to existing signal edge as desired) but then the task stops. So, it seems either the retriggerable option is not working or I'm misunderstanding how to use it. Could it be that the retriggerable property must be set to true before creating the start trigger? I've consulted the example C-code supplied with DAQmx and there are several pulse generation examples, but the only example for single pulse generation does not use the retriggerable option.
Jeff
08-11-2006 10:36 AM
Hey Jeff-
You will need to make sure that you don't stop the task at any point after the first generation. Most of the examples use DAQmxWaitUntilTaskDone() to wait for a single iteration, but in your case you want to run through several iterations of the task. So, you will want to enter a loop after starting to ensure that the task continues to run in the background on the hardware. I modified the single pulse DAQmx shipping example to include digital retriggerable start triggering. The empty loop spinning is obviously not ideal, so I'll leave you the choice to implement that as necessary.
Since you're working with retriggerable single pulses, you may also want to be aware of the information in this KB.
Hopefully this helps-
08-11-2006 01:45 PM
08-14-2006 03:18 PM
08-14-2006 03:20 PM
Hi Ams-
The Initial Delay parameter of the counter channel allows you to create a delay at the beginning of each generation. See my earlier post with a KB link for more tips on how to use that feature.
Thanks-
08-14-2006 05:57 PM