Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Time duration setup for daq genaration signal

hi

 

i'm using DAQ NI 6343 for generation sinewave signal in AO0 output

 

i need to start this signal for couple of milliseconds and stop it afterwards , this is my time_duration variable.

 

how i can do this automatically without manual start/stop button in GUI.

 

i tested it by timer1 method, but this make collision in threads.

 

Thanks very much

0 Kudos
Message 1 of 10
(3,409 Views)

Hi Arbo,

 

It sounds like you need a finite analog output task. You can find a good example of this in the example finder. In the task directory, it can be found at Hardware Input and Output -> DAQmx -> Voltage - Finite Output.vi. You can also find it by searching the example finder for "Voltage - Finite Output.vi". The timing of this example is determined by the sample rate and number of samples. For example, with sample rate = 1000 (Hz) and number of samples = 1000, the acquisition will take 1 second.

Austin
Staff Software Engineer
NI
0 Kudos
Message 2 of 10
(3,378 Views)

Hi Arbo,

 

I just noticed this is in the Measurement Studio forum! I apologize for any confusion. There are still good examples for a finite voltage output in our examples. You can find them by clicking Measurement Studio -> Measurement Studio Examples. The DAQmx examples can be found at:

C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5.1\Analog Out\Generate Voltage

The GenMultVoltUpdates_IntClk_2013 seems like a good example to start with.

Austin
Staff Software Engineer
NI
0 Kudos
Message 3 of 10
(3,375 Views)

thanks. i will try. 

 

0 Kudos
Message 4 of 10
(3,350 Views)

hi

i understand from the examples to use finite samples.

 

but still can i use option continuous sampling and generate sine wave by DAQ 6343. by the same time DAQ must read and save received data.

 

and some timer or another function will stop this process by  time_duration variable.

 

P.S. this is parallel task, generation by AO0 and reading these values by AI0.

 

 

 

 

0 Kudos
Message 5 of 10
(3,334 Views)

some similar issue was in this topic but for labview and i need for c#

 

http://forums.ni.com/t5/forums/v3_1/forumtopicpage/board-id/170/thread-id/385152/page/1

0 Kudos
Message 6 of 10
(3,330 Views)
0 Kudos
Message 7 of 10
(3,324 Views)

Hi Arbo,

 

I'm having some trouble understanding what you need to do. If you need to continuously generate a waveform, the ContGenVoltageWfm_IntClk example at the location I linked earlier should accomplish this. If you need to generate a waveform with finite samples, GenMultVoltUpdates_IntClk_2013 should accomplish that. Are your requirements more advanced?

Austin
Staff Software Engineer
NI
0 Kudos
Message 8 of 10
(3,314 Views)

hi , let me be more specific,   i want to generate 1vptp sinus wave (freq=100Hz) by DAQ-6343 at AO0 continuously. the signal goes to electronic board that have some output channel which i want to read by AI2.

 

the measurement must be taken at highest sampling rate. and this measurement must be taken at some time period window (5, 6, 10 sec) = this is my time_duration variable which i can change.

 

after this time period the measurement stops. all measured data will be written to file. and generation of sine wave stops too.

 

 

0 Kudos
Message 9 of 10
(3,311 Views)

Hi Arbo,

 

Do you have specific questions regarding the examples? Either example (ContGenVoltageWfm_IntClk or GenMultVoltUpdates_IntClk_2013) can accomplish the functionality you require with minimal changes. GenMultVoltUpdates_IntClk_2013 is probably preferable because you can have greater control over how long the generation occurs.

Austin
Staff Software Engineer
NI
0 Kudos
Message 10 of 10
(3,295 Views)