Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

500 MicroSecond Pulse

Dear TimothyDug,

Thank you very much for your answers.

Actually, I want to control two valves with NI usb-6003. I have connected the valves to digital line0 and line1 (valve 1), line 2 and line3 (valve 2). When I runt my software, the valve 1 should be opened continuously till I press a button in my software. In this case, the valve 1 should be closed for 2 second, and consequently the valve 2 should be open for 2 second. Two change each valve status, I need two pulses. For valve 1, The  first one should be 500 microsecond in line0, and continuous "1" for line 1. For valve two, line2 should be 1 for 500 microsecond, and line3 should be "1" for 2 second. 

That's all I need.

Thanks.

     

0 Kudos
Message 11 of 16
(932 Views)

Hi,

 

So you should be able to do that with the USB 6003. Were you able to find the examples for C#? If you go through the install of the DAQmx drivers, there should be the "DotNET examples" to install. Those should be a good starting point. Have you had any troubles with those?

 

Thanks,

Timothy D.
Applications Engineering
National Instruments
0 Kudos
Message 12 of 16
(922 Views)

I have already the examples , but I could not find any example that be suitable for this task. 

You mean it is possible to do it with usb-6003?

Is it possible to give me an example that how I can have a digital channel 500 microsecond activated?

I have no idea how I can do this with usb 6003. I would be grateful if you could give me a solution.

Regards,

E.

0 Kudos
Message 13 of 16
(920 Views)

Hi Ehsanzb,


Yes, there is an example that should help you get started. You should go to Start Menu -> National Instruments -> NI-DAQmx ExamplesIf you cannot do this, you need to install DAQmx, choose "Custom Installation" and be sure to install the option for DotNET 4.5.1. Let me know if you have any trouble with this step!

 

Inside there, I would go to Digital -> Generate Values -> WriteDigChan->CS. The full path on my computer is C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5.1\Digital\Generate Values\WriteDigChan\CS and then the file you want is called MainForm.cs.

 

There are a lot of comments in that file detailing what it does and how to configure and use it. Let me know if anything is unclear! Thanks!

Timothy D.
Applications Engineering
National Instruments
0 Kudos
Message 14 of 16
(908 Views)

I saw this example before. There is nothing about the timing? I know how I can write on digital channel. But, I do not know how I can do timing...

0 Kudos
Message 15 of 16
(905 Views)

Hey Ehsanzb,

 

There are other examples. I would look through them to find which one specifically works for you. For example, there is C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5.1\Digital\Generate Values\WriteDigChan_ExtClk\CS, or C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5.1\Digital\Generate Values\ContWriteDigChan_PipeSampClk\CS if you want it to run continuously. These each have clocks to configure.

 

Let me know if you have any specific questions. We do provide examples and answer specific questions, but we do not write custom code for customers, though there are Alliance Partner companies who can do that for a fee. Would you like contact information for them?

 

Also, if you try out these examples and have anymore specific followup questions, I would be happy to answer those!

 

Thanks so much!

Timothy D.
Applications Engineering
National Instruments
0 Kudos
Message 16 of 16
(892 Views)