05-02-2006 04:31 PM
05-03-2006 09:57 AM
Hello Pavan,
I check to see of 6602 supports this property, and it actually does. So, our problem lies somewhere else.
Your code looks almost right. Try and call the DAQmxSetStartTrigDelayUnit function before you define the delay. Also, I dont think you are putting a valid value for your Delay Units. Please refer to the attached image for the acceptable values for this property.
05-03-2006 10:25 AM
Hello Pavan,
I checked to see if 6602 supported this property, and it actually does. So, our problem lies somewhere else.
Your code looks almost right. Try and call the DAQmxSetStartTrigDelayUnit function before you define the delay. Also, I dont think you are putting a valid value for your Delay Units. Please refer to the attached image for the acceptable values for this property.
Regards,
Chetan K
Application Engineer
05-03-2006 10:55 AM
05-03-2006 01:58 PM
Hello Pavan,
Actually, the resource that I was referring to earlier which made me believe that the 6602 supported this property, was incorrect. That explains the reason why you were getting the error message. As far as your original question goes, you would need to follow the VI that was suggested earlier in this thread. You should be able to translate the block diagram into your .cpp file. In the case you don’t have LabVIEW installed; I have attached an image file containing the block diagram for your quick reference.
Regards,
Chetan K
Application Engineer
05-03-2006 03:18 PM
08-17-2006 12:02 PM
For Alan,
08-17-2006 01:18 PM
08-22-2006 01:18 PM
Alan ,
I am facing the following issues
1) With the pause trigger u have attached (and any other desirable configuration) the “2nd trigger” remains high between the pulses . This is not a show stopper since I would be using the edge of this second trigger. ( This is the attached VI 1)
2) Since I want to use this second trigger I need to use it’s output that is ctr 0 as the trigger parameter for my finite train of pulses ( This is the attached VI 1). However that drop box in the trigger parm does not have a ctr0 as an option so I will try using ctr0 gate/source.
3) I want to use the second trigger for generating pulses for various devices (still trying to get the first one working) . However your previous post seems to state that cannot be done. I thought that the counters refer to the physical ports on BNC-2110 which are two but as u will see in the VI attachments I need only Ctr0. I don’t see the difference in using the pause trigger and the retriggerable pulse in terms of physical resources being used (please explain this counter business).
Is it alright if I can speak with you , should make it much easier for me to understand.
Thanks
Ams
08-22-2006 07:14 PM - edited 08-22-2006 07:14 PM
Couple things:
First, I'd suggest using the VI in my third post (it combines the two VIs from the first post into one nice, clean VI). So the gating counter (in the example, Ctr 1) will remain high while the output counter is producing the pulse train. That is how this program is designed to work, using the pause trigger. The output counter stops (pauses) the pulse train output when the gating counter is low.
As far as your question about not having ctr0 as an option, I'm assuming that you are trying to use "/DevX/CtrYInternalOutput". If you don't have this option, then you probably just need to right-click on the control and select I/O Name Filtering, then select the check box for "Include Advanced Terminals".
Let me try to explain the counter stuff again. With current Multifunction DAQ device (M Series included), when you choose to run a finite pulse train, two counters are needed. This is a physical property of the counter hardware. It is true that you only select one counter, but the other is being used. (Feel free to test this out by running a finite pulse train on counter 0 and trying to perform any operation on counter 1 at the same time.....and notice the "resource reserved" error)
Additionally, NI-DAQmx does not support the "Initial Delay" for re-triggerable finite pulse trains. So, to solve the problem, we have to use some other method to apply an initial delay from an external trigger. One way to do this is to set up a re-triggerable single pulse with an initial delay, and use that single pulse as a trigger (single pulse requires one counter).
So, with your device, 6251, which has two counters, it is not possible to use one counter to produce a finite pulse train, and use the other to do anything.
However, continuous pulse trains only require one counter. So we can produce a continuous pulse train and simultaneously use another counter to produce a delayed pulse to trigger (or gate) the continuous pulse train. That is exactly what my example does.
Hope this clears things up.
-Alan
Message Edited by Alan [DE] on 08-22-2006 07:15 PM