LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append 2 1d waveforms into 1d waveform

Solved!
Go to solution

Good morning,

        I have searched for this but can't find a solution.  While I  am always open to constructive criticism; please excuse the mess.  I am still in early stages of development of this VI.  What I am trying to do is this:

 

Using NI DAQmx, I am taking 36 voltage signals.  The first 32 are a strain indication, then some other stuff, final channel is a tach indication from an optical sensor.

Using the 1d waveform, I extract the first 32 channels of strain data and put it through a formula for conversion from voltage back to a strain indication.

Then I extract the last channel and want to append it to the first 32 channels for saving to a TDMS file. 

 

These are the only channels I am interested in for what would be 'high speed' data at 2500 Hz sample rate.  The other channels are to be 'down sampled' to a more freindly 10 Hz sample rate to be later combined with a GPS device and saved to a different file.

 

I am starting to ramble.   My problem is this.  After converting to strain, and extract the tach channel, I try to append the tach channel to the end of the strain channels and 'Build Array' for the single waveform.  The problem is the inputs are two 1D Waveforms and the output is a 2D Waveform.  The TDMS write only allows a 1D Waveform.

 

Any help is appreciated and thank you for your time.

0 Kudos
Message 1 of 9
(3,693 Views)
Solution
Accepted by topic author TatankaWilly

Hi Willy,

 

right-click your BuildArray and select "concatenation mode"…

 

I try to append the tach channel to the end of the strain channel

- Right now you prepend that channel before the other channels. Not quite what your task seems to be…

- What content do you expect in an array with length zero - you just wired a zero to the length input of ArraySubset.

- Why is your single "strain" channel still in a 1D array of waveforms? Why don't you use IndexArray to get exactly this single channel?

- Having 8 numeric outputs of a subVI seems "not good". Why don't you output either an array (as all numerics are DBL type) or a cluster (as they seem related to each strain)?

- You can connect error wire directly to your OR function. No need to unbundle status boolean…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,687 Views)

Search for "Append Waveforms.vi".  It is in the Waveform, Analog Wfm palette..

0 Kudos
Message 3 of 9
(3,685 Views)

I tried that to begin with, but for some reason I can't connect a GetWaveform Components to my Waveform.

0 Kudos
Message 4 of 9
(3,637 Views)

I tried that one as well.  It gives me broken wires and and says that source is 1D Waveform Array and sink is Waveform.

0 Kudos
Message 5 of 9
(3,635 Views)

Hi Willy,

 

your RF2.png content should be replaced by a FOR loop autoindexing your waveform array producing an array of Y values. (Don't know why you use GetXYValue here…)

 

The RF3 image doesn't help as it hides the sink of that wire.

GetWaveformComponents only works with a single waveform, but not with an array of waveforms. Quite clear I would guess…

 

As long as you only attach images instead of real VIs we cannot help much better…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,620 Views)

As requested, here are the VI's.  I haven't tried mixing in the For loop.  I will give that a shot later this afternoon.

0 Kudos
Message 7 of 9
(3,609 Views)

As requested, here are the VI's.  I haven't tried mixing in the For loop.  I will give that a shot later this afternoon.

0 Kudos
Message 8 of 9
(3,603 Views)

Hi Willy,

 

here are snippets of your VIs:

check.pngStrainVoltageConvert

 

check2.pngStrainDisplay

 

check3.pnginner part of main VI

 

When you need just one element from an array you should use IndexArray instead of ArraySubset…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(3,591 Views)