03-01-2019 04:21 AM
Hello guys,
I have a question regarding the DAQ Assist block to read the encoder (as in title) and how to properly set it up.
In particular, in the timing tab there are three parameters:
I want to acquire continuously the signal and save it to a file, so:
I would like your help to properly configure these three parameters.
Thanks,
Luca
03-01-2019 04:30 AM
Hi Luca,
1. What about using "1 sample on demand"? How often do you need the position data?
2. Here you set the number of samples to read per DAQAssistent call…
3. Here you set the samples per second (samplerate) you want to read from your DAQAssistent. This is not related to your actual sensor hardware. DAQmx will use some counters in your DAQ card to determine position - all you set here is how often you want to read that counter value…
03-01-2019 05:00 AM
Hello Knight GerdW, thanks for your reply.
1) I want to have a continuous stream of data for the period of time that I will later decide (for e.g. an experiment that lasts 1 hour).
2) Can I set it equal to the rate number? I'm not sure wether this is important to my goal: all I want is to save this stream of data to a file.
3) I'm confused, is this related to the Number of Samples parameter somehow and to the continous sampling method? Can't I think of this value as the sampling frequency of the stream of data?
Thanks,
Your lost Luca
03-01-2019 05:17 AM
Hi Luca,
1. You also get a "continuous stream" of data when you read them on demand each second…
2. Yes, you can - but you don't need to.
3. "Number of samples to read" and samplerate are related by the formula t [s] = #samples [S] / samplerate [S/s]. Yes, samplerate is the "sampling frequency of the stream of data".
03-22-2019 10:45 AM
Hello, thanks for your reply.
1) When I said "continous" I mean that I am able to acquire and then display/log data with a given frequency sampling without having any "lost gap" of data for a given period of time, for instance until I stop the acquisition. In conclusion, I would like to have a real time stream of my angular position signal for explame for 1 hour with a sampling frequency of 500Hz.
2) Currently I managed to get my daq assistant to work setting the sample mode to continous but when I try to route the output data of the encoder acquisition to a graph, this latter updates itself only when I manually rotate the encoder shaft. Like I don't have the "time information" but only the encoder value information.
Sorry but I'm having an hard time understanding what I'm doing wrong. I feel like I don't take into account some concepts that are trivial, that's also why I am not understanding you properly. Bear with me.
03-22-2019 10:49 AM
03-25-2019 03:55 AM
Good morning GerdW, I attach two examples.
The first one is built with the daq assistant blocks and it's the one that doesn't store the time information with the encoder apparently.
The second one is built with ni max tasks and I copied the time information of my other module (e.g. accelorometer) to the encoder signal given the two modules have the same sampling frequency. It's the only workaround I found so far.
Thanks,
Luca
03-25-2019 04:28 AM
Hi Lucs,
The first one is built with the daq assistant blocks and it's the one that doesn't store the time information with the encoder apparently.
You have configured the WriteMeasurement ExpressVI to use a X column for time information.
So why shouldn't it not save any time information in the data file?