11-27-2018 03:29 AM
Hi
I use the module of NI-9234 to measure the signal of accelerometer. I am using the code that "ContAccelSamp_IntClk_AnlgStart" for daq sample code. Now,i want to data add the timestamps for each sample. How do i use the function or example to solve problem?
Nan
11-27-2018 09:02 PM
Hi Nan,
You may record the timestamp before plotting your data.
Say you are modifying the C# example codes, you can simply add another line of code to record the timestamp right after/before the:
data = analogInReader.EndReadWaveform(ar);
same function in VB code can be found at:
dataToDataTable(data, dataTable)
12-05-2018 06:30 AM - edited 12-05-2018 06:31 AM
Hi wellyhuang
Thank your reply!!
I have another a question.How do i change arbitrarily the sample/channel ?
I used the example code:ContAcqAccelSamp_IntClk_AnalogStart.2010
Jan
12-18-2018 07:09 PM
Hi Jan,
You may try to find the function which is in "DAQmx Configure Code" part in the main function: DAQmxCreateAIAccelChan
Maybe by adding a prompt for inputting the channel name, then pass the parameter to the function (e.g., scanf or getchar, etc.)
DAQmxErrChk (DAQmxCreateAIAccelChan(taskHandle,"Dev1/ai0","",DAQmx_Val_PseudoDiff,-100.0,100.0,DAQmx_Val_AccelUnit_g,50,DAQmx_Val_mVoltsPerG,DAQmx_Val_Internal,0.004,NULL));
Welly
12-23-2018 07:52 PM - edited 12-23-2018 07:53 PM
Hi Jan,
Does that meet your requirement?
BTW, since it's a follow-up question, maybe you could create another discussing thread to address this question; thus, if that works for you, you may close this discussion; and if it's not, you may go ahead and create another discussion for this.
Thanks,
Welly