Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

4 pulses with different on times of 1ms to 4ms with off time off 3ms to 30ms

Hello J.B,

Happy New Years too! Thanks for explaining me better what you are trying to do. First off, in order to change the duty cycle on the fly, you need to have a board that has an STC chip, an NI-TIO chip, or an STC-2 chip. If you can tell me what board you have I should be able to tell you if you can do it or not. The second thing to understand here is that we will need to create a NI-DAQmx Channel Property Node with two inputs (CO.Pulse.DutyCyc AND CO.Pulse.Freq). Pass the new value for the duty cycle as well as the desired frequency (even if it has not changed) to the property node. With this, you should be able to generate the pulses that you want. I'll try to send you the VI built tomorrow.

Thanks,

LA
0 Kudos
Message 11 of 19
(1,617 Views)
Hello LA,

Thanks. I will wait for your vi. The board I am using is DAQpad 6016 (USB).

J.B.
0 Kudos
Message 12 of 19
(1,613 Views)
Hello J.B,

I apologize for taking so long in getting back to you. Don't think please that I forgot about your issue, I've been working on it but I am still having some trouble generating the pulse you want. The problem I am having is that the Start Task is generating the same pulses for each of the specified duty cycles instead of generating only one pulse for each of the specified duty cycles. Tomorrow I am going to talk to R&D and let them know about this. I will get back to you as soon as I can.

Thanks,

LA
0 Kudos
Message 13 of 19
(1,589 Views)
Hello J.B,

After talking to some of my collegues here, we realize it's not possible to use counters when using an E-series board, thus we need to use Analog Output. Attached you will find a program that one of my collegues wrote.

Please let me know if you have any questions.

Thanks,

LA
0 Kudos
Message 14 of 19
(1,583 Views)
Sorry...here is the attachment.
0 Kudos
Message 15 of 19
(1,582 Views)
In general, if you want to output an arbitrary high/low pulse train, analog output is your best choice. But, with the pulse train that you have described here, the low time is constant and the high time is growing at an even increment. There is a feature on counters called "autoincrement" which can be used to automatically increment one of the count values. It is intended for use with Equivalent Time Sampling, but could possibly be used to solve your application. In the example I have attached, the timebase counter is generating a 1 kHz timebase for the second counter, which divides that value down to generate millisecond pulses. The autoincrement value is set to 1 so that on each pulse, the high pulse is one tick larger (1 ms). There are definitely some limitations to this example, first, it requires the idle state on the generated pulse to be high. Also, it requires using both counters. If it is necessary to stop after 3 pulses, you could find a different source for the timebase (like the AI or AO timing engine) and then use one counter to pause the continuous pulse train at the correct time.

All that said, I still believe that if you want to output an arbitrary high/low pair pulse train, you should look into using analog output.

I hope this helps!
gus....
0 Kudos
Message 16 of 19
(1,568 Views)
Hi LA and gus,

Thanks for the examples. Again I am unable to open the vi's because I have version 7.0 instead of 7.1
Can you send the same in 7.0?

Perhaps the easiest thing for me would be to use a separate board like a 6533 for pattern generation. Thats a last resort but if nothing else works I may be able to do that.

J.B.
0 Kudos
Message 17 of 19
(1,562 Views)
Apologies. Here's my example in LV 7.0.

Let me know if you have any problems opening it.
gus....
0 Kudos
Message 18 of 19
(1,553 Views)
Thanks, Gus.
0 Kudos
Message 19 of 19
(1,545 Views)