Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate signle pulse signal on digital output line

Solved!
Go to solution

Hello,

I'm now writing a program using C# and DAQmx.

 

I've got a NI PCI-6514card and I want to send a signal during half a second to one digital output line.

 

I know how to write in a line using the DigitalSingleChannelWriter object, but I want that this signal dissapear after an amount of time.

 

Thank you in advance for your support.

 

J-D Gasser

0 Kudos
Message 1 of 6
(4,298 Views)

I have a similar question;

 

 Currently, I am doing what JD is, then I use a "sleep" for anywhere between 1 and 1000ms before writing "low" value back to the channel, effectively creating a pulse. However, the hardware I am interfacing with does not like it when I do that. It is designed to recieve a digital pulse. To this end, I looked around on here and found this:

http://zone.ni.com/devzone/cda/epd/p/id/5881

 

 Which, according to its decribtion, does exactly what I want it to do. Only that it doesn't. According to the comments, it is setting up a task which will raise on pulse on the countinous output channel, when it recieves a trigger from an external source. The hardware I am using does not generate such a trigger. Is there a way to do with without requiring a trigger to start the pulse?

 

JD, if you want I can post my "fake pulse" code for you.

 

0 Kudos
Message 2 of 6
(4,196 Views)

Some more follow up from my previous post:

 

 The example I linked to did not work for the reasons given. However, there was an example that did what I wanted (automatically generated a pulse) with the standard examples installed with the NI drivers.

 

My next question may be more of a hardware one, and if it is I will repost this on the correct board;

 

The examples (both of them) set up the pulse on one of the Continuous Output channels, is it possible for this pulse to go out on one of the Digital Output channels?

0 Kudos
Message 3 of 6
(4,188 Views)

Hello Tyzack,

Regrettably I cannot answer your question.

 

On the other hand, can you tell me the name of the standard example installed with the NI drivers you speak about ?

 

Thank you in advance

0 Kudos
Message 4 of 6
(4,176 Views)
Solution
Accepted by topic author Gasser

Sure thing:

 

C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Counter\Generate Pulse\GenDigPulse\cs

 

That's on Vista.

 

On XP I believe the path is:

C:\Documents and Settings\All Users\National Instruments\...

0 Kudos
Message 5 of 6
(4,159 Views)

Hello,

thank you, I will take a look.

0 Kudos
Message 6 of 6
(4,148 Views)