04-09-2010 04:27 AM
Hello,
What is the Recommended way to create a pulse output when using a NI 6518 card (DAQmx driver) from code in my C# Application.
I am doubtful that a 6518 specifically supports doing this form pulse related code in DAQmx driver.
My scenario is to say, pulse high for 100ms, then bring low again.
(Pointing me to a useful example would also be appreciated as I am new to all of this stuff)
Ian
04-15-2010 04:32 AM
Hey Ian,
The card you are using does not have an on board counter. This means the timing for the pulse train generation would be done by your software. This will give you very inaccurate timing. I would suggest you try using a card with a counter on board. If you have one - this example shows how to use a counter to do it (it's available in C#.NET and C): http://zone.ni.com/devzone/cda/epd/p/id/2415
Alternatively you will have to use the computers clock to send 1 and 0 to the DIO line. You can find text based examples for DAQmx at Start > Program Files > NI-DAQ > Text Based Code Support
Let me know how you get on.
04-15-2010 04:39 AM
Thanks for response, I have alreay done some work to create a pulse for 6518 at this stage.
I do the timing myself in my code ....
I set line high
and then kick off a threading.timer for the pulse duration
in the timer callback i rest line - and kill the timer
(the threading.timer method will have to be locked to be thread safe)
Ian