LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nano 17 Force Sensor Cyclic Measurement

Hello, all.
 
Goal: Measuring/filtering cyclic loads with a force torque sensor by averaging the measurement of the same cycle.
 
I am measuring loads with ATI's Nano 17 F/T Sensor. The load that I am measuring is cyclic. I want to average 200 readings of the same cycle to get rid of random noise. The sensor measures six voltage signals and eventually outputs measurement of six components (please see the sample vi). I have another sensor (cycle counter) sending signals to my computer of the beginning of each cycle. I came up with two ideas to achieve this but both met techical problems.
 
1) Have cycle counter indicate/output "1" if it is the beginning of a cycle. Add a column of "0s" in the loads measurement array, replace the 0 with 1 whenever the cycle indicator triggers. Postprocess the data to average the readings.
Problem: the output load measurement array is already "done" after the DAQ reading, appending/combining another array to it wouldn't indicate the correct timing.
 
2) Have both cycle counter and the measurement append some timing information (elapse time, system time... accurate to mili/micro seconds) and then postprocess to get the cycle average.
Problem: I don't know how to append accurate time indicator into the load measurement array.
 
Any suggestions will be gratefully appreciated.
0 Kudos
Message 1 of 4
(4,038 Views)
Hey Winup,

The easiest way to do this would be using hardware. To do this there are a couple of conditions. What are your timing requirements and what is the expected frequency of the signals you are measuring? Why type of signal is the signal that indicates the beginning of the cycle. Also, how much time is there between cycles? We may be able to accomplish this by using that cycle signal as a hardware trigger. The device would wait for the trigger and then upon receiving acquire 200 samples. It would then repeat this process. This may or may not work depending on how much time is between cycles as there is a delay from restarting the task.  

You can see an example of this by going to the NI Example Finder in LabVIEW at Help » Find Examples » Hardware Input and Output » DAQmx » Analog Measurements » Voltage » Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi.

To do this post process you will have to sample the cycle indicator signal along with your analog inputs. This way you will have the same timing information. The value of this signal would then indicate the beginning of a cycle.

Please let me know if you have any questions.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 2 of 4
(4,014 Views)
The cycle period is down to 1/90 sec and the trigger signal is the serial port reading. Everytime the serial port sends in a number, which is the number of countings of 4e-6 sec, it is one cycle count. In my hardware set up, three cycle counts make one trigger. Please take a look at my latest vi and the upper part is the serial write and read. In the reading part, I make a final array summation of the number of triggers to indicate the data logging file name, because I want to use that to separate the data in each cycle.
 
It was not successful because the DAQmx read has been told to take number of samples. I tried to change that to "-1" so that I will take continuous samples. I thought I could just record continuous voltage readings and apply the calibration matrix later. But the files I got with that try has many files of no readings at all. I am not sure if I can incorporate the hardware trigger directly to my program because it's through a serial read/write.
 
I am a beginner and the vi is very messy. Thanks for your help.
 
 
0 Kudos
Message 3 of 4
(4,002 Views)
Hey Winup,

You are right. We will not be able to use a hardware trigger through a serial read/write.

Changing the Samples to Read input on the DAQmx Read changes how many samples you will read from the DAQmx buffer in each iteration of the loop. Setting it to -1 will read all available samples from the DAQmx buffer. Your acquisition will run continuously regardless of what you set this to.

I am not able to view the serial code because the sub VI for this was not included. I think your best bet will be to do this as you said in post process. You will want to have two parallel loops. One for acquiring that data and one for reading the serial. I am not an expert in serial, but I think you should be able to do this. The timing data in the waveform datatype that is read from the DAQmx read will be timing data from when the data was actually acquired on the device, not when it was read from the DAQmx read. After you have acquired and read all of the data you can pair them up in postprocess.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 4 of 4
(3,991 Views)