Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Append data to an existing AnalogWaveform<Double>[]

Solved!
Go to solution

Hi Ajay,

 

Here is some general information to get you started and more familiar a few concepts.  If you have additional questions/concerns, please provide more information about your application, hardware, and software.

 

Go to Start>>Programs>>National Instruments>>NI-DAQ>> NI DAQmx Help and search for Data Transfer Mechanisms. This will provide an explanation of the different types of data transfer.

 

Take a look at this knowledge base article as it discusses syntax.

 

Start>>Programs>>National Instruments>>NI-DAQ>>Text Based Code Support for Examples and the DAQmx C Reference Help file.  Try finding an example that is similar to your application and use it as a reference.

 

Hope this helps!

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 11 of 19
(2,970 Views)

Hi h_baker,

 

Thank you for your reply.

 

I have one query regarding the ADC buffer which generates as event when it is full with the data.

 

I need to capture this event and read the data from the buffer. 

 

Please let me know the name of the event which is to be captured.

 

Thanks,

Ajay 

0 Kudos
Message 12 of 19
(2,951 Views)

Hi h_baker,

 

I have founded that we can register for a particular event through DAQmxRegisterSignalEvent function.

 

The event which I need to capture is specified by DAQmx_Val_Acquired_Into_Buffer in DAQmxRegisterSignalEvent function.

  

Can you please provide me with the example in .Net C#?

 

I want to capture the DAQmx_Val_Acquired_Into_Buffer event in windows service developed in .Net C#.

 

Regards,

Ajay

0 Kudos
Message 13 of 19
(2,947 Views)

Hi h_baker,

 

Can you please let me know the location for NI-DAQmx .NET Reference Help?

 

Is it available online?

 

Thanks,

Ajay

0 Kudos
Message 14 of 19
(2,941 Views)

Hey Ajay,

 

Take a look at this link as it provides details to the Help File location.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 15 of 19
(2,917 Views)

Hi,

 

I am new to application development using Ni DAQ. I want to develop an application which will read the data from the buffer of multiple channels. I founded one way of doing the same i.e. through SampleCompleteEventHandler handler. But I have founded that all the Ni DAQ devices does not support this event handler.

 

Can you suggest any other way to achieve the same objective?

 

Thanks, Ajay

0 Kudos
Message 16 of 19
(2,906 Views)

Hi Ajay,

 

Correct me if I am wrong; however, it sounds like all you are trying to do is acquire from multiple channels.  Attached are a few links that may help you with this:

 

USB-6009: Best Way to Sample Multiple AI Channels Simultaneously

Continuously Acquiring Data from Multiple Samples in VB.NET
Continuously Acquiring Data from Multiple Samples in C#.NET

 

I know you are not using C but this link uses the SampleCompleteEvent.  Read through the .c file as an example of how it is used.

 

What hardware are you using?

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 17 of 19
(2,880 Views)

Hi h_baker,

 

Yes, you are absolutely correct. I want to acquire data from multiple channels at the same time.

 

I am using NI USB-6212 device as an interface between the tool on one side and my application on the other side. I donot know whether I can acquire data from multiple channels at the same time or not from this device.

 

I used SampleCompleteEvent event to achieve the same, but unfortunately my device does not support this event. So now I am trying to read the samples through BeginReadMultiSample and EndReadMultiSample APIs provided by Ni DAQ library.

 

Please confirm that if I will use these APIs and use asynchronous callback method is there any chance of missing the samples?

 

Regards,

Ajay Kumar Wahi

  

 

0 Kudos
Message 18 of 19
(2,871 Views)

Hi h_baker,

 

I have tried to read the samples from a single channel through asynchronous callback method. When the method is invoked for the second time EndReadMultiSample function throws exception which is mentioned as below:

 

"Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.

Property: NationalInstruments.DAQmx.DaqStream.ReadRelativeTo
Corresponding Value: NationalInstruments.DAQmx.ReadRelativeTo.CurrentReadPosition

Property: NationalInstruments.DAQmx.DaqStream.ReadOffset
Corresponding Value:


Task Name: aiTask

Status Code: -200279"

 

Please let me know where can be the issue? I have tried the follwing example with NI USB-6212:

 

..\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\ContAcqVoltageSamples_IntClk

 

Thanks,

Ajay

Message Edited by 9810110953 on 09-22-2009 03:52 AM
0 Kudos
Message 19 of 19
(2,868 Views)