Data Acquisition Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
bgaurier

DAQmx Create Scale VI for multi-components sensors

Status: New

Today, we can create a DAQmx custom scale in MAX or Labview via the "DAQmx Create Scale" VI. This VI changes a pre-scaled value, e.g. 5Volts, to a scaled value in a physical unit, e.g. 100Newtons. This scale can be Linear, Map Ranges, Polynomial or Table.

For all of these four options, only a mono-channel sensor can be used.

 

However, multi-channel sensors are not so rare and there is actually no way to scale a 6-components load-cell, for instance. For this kind of transducer, F = M*U where F is a 6-components vector including the 3 forces in Newtons and the 3 moments in Newtons*meters, U is a 6-components pre-scaled vector including the 6 input channels in Volts and M is a 6*6 matrix. M is never diagonal, because the forces affect the moments.

 

Finally, what I'd like to have is an extension of the "DAQmx Create Scale" VI which could enable a multi-channel pre-scaled input to be scaled in physical units through a matrix.

 

Thanks.

9 Comments
RavensFan
Knight of NI

You talk about multi-channel sensors like load cells which I have seen, but have not actually used.  But don't those devices require that they be wired into multiple DAQmx channels?  So a 3 axis load cell requires 3 channels of an analog input card?  And in that case each channel of the load cell, and thus each channel of the DAQ card are a 1:1 relationship and thus would each have their own scale anyway.

bgaurier
Member

Yes, you are right: a n axis load-cell requires n channels of an analog input card and they have all their own scales.

That precisely why it is worth to improve the Create Scale VI (or develop a new specially designed scale VI) in order to take into account these kind of multi-channel sensors.

 

Today, this lack can only be fixed by extracting the data from all the corresponding waveforms, then convert them through a matrix multiplication, before to rebuild them. These operations can sometimes be time-consuming, especially when you have several load-cells and a high sample frequency, which is clearly not efficient.

RavensFan
Knight of NI

No.  You just use Create Scale VI once for each channel you want to add when you are adding your channels to the task at the beginning of your VI.

bgaurier
Member

Yes, this is what I do.

But what I want finally is the data in physical units not in volts. So, I have to convert them and for that, I have to use the transformation matrix.

 

For a 3 axis load-cell for example, with 2 forces and 1 moment:

[Fx(N) Fy(N) Mz(N.m)] = M * [Fx(V) Fy(V) Mz(V)] with M a 3*3 square matrix, and finally:

Fx(N) = m11 * Fx(V) + m12 * Fy(V) + m13 * Mz(V)

Fy(N) = m21 * Fx(V) + m22 * Fy(V) + m23 * Mz(V)

Mz(N.m) = m31 * Fx(V) + m32 * Fy(V) + m33 * Mz(V)

with [Fx(V) Fy(V) Mz(V)] the 3 input DAQmx channels.

 

How can I do that matrix operation without using the waveform data extraction?

RavensFan
Knight of NI

So you aren't looking at 3 different channels of data with different scaling factors.  You want to take 3 different channels and combine them in ways to come up different, I'll call them virtual channels.  You aren't actually scaling data, you might be for the individual channels.  You are actually analyzing and combing results.  There is no way to be able to do that with DAQ scales.

 

What you want to do is what LabVIEW is supposed to do.  Analysis on incoming signals.

bgaurier
Member

Thank you very much for your answer.

I knew actually it doesn't exist any "hard solution", that's why I asked for an extension of the "Create Scale VI" for all these multi-channels transducers. However, I understand your answer.

 

But my problem stays the same: sometimes we have to do some tests with 3 or 4 multi-channels load-cells (one of them is composed of 15 different channels) at a relatively high sample frequency (10kHz). In parallel of the acquisition, we always prefer to see what we record on the screen to be able to stop if something went wrong. In that case, I regularly have the error about the speed of the acquisition hardware which is too fast comparing to LabVIEW processing.

So, according to you, what could be the best way to do these matrix multiplications with LabVIEW in a efficient manner?

crossrulz
Knight of NI

I would look into using a cRIO or R series DAQ and do all of the scaling and matrix multiplication in an FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
BertMcMahan
Active Participant

@bgaurier wrote:
But my problem stays the same: sometimes we have to do some tests with 3 or 4 multi-channels load-cells (one of them is composed of 15 different channels) at a relatively high sample frequency (10kHz). In parallel of the acquisition, we always prefer to see what we record on the screen to be able to stop if something went wrong.

You have a couple of options. If you really need to do it in real-time, you should look into dedicated hardware like a cRIO (like crossrulz said).

That said, if your issue is with displaying it visually, then simply don't do every point. Have the system take 1000 data points, average them together, then do the matrix math on that- or just ignore every 999 points, and do the math on the 1000th point. You almost certainly don't need a visual update rate higher than 10 Hz. You can sample your raw data at whatever rate you'd like and log it to memory or a file, then postprocess it after the fact, when timing isn't critical.

bgaurier
Member

Thank you very much indeed for all of your ideas.

This is finally what I do and it works very well: re-sampling for the display during the acquisition and post-processing after the record for the matrix multiplication.

 

All the best,

Ben.