LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview error message

Solved!
Go to solution

I am creating a labview in the attached file. 

 

However, it is error because the data type is different.

 

Could you tell me the solution?

 

Thank you for your help.

0 Kudos
Message 1 of 4
(2,277 Views)

現在、LabVIEWでプログラムを書いております。

 

しかし、添付画像にあるようにデータタイプが異なるためエラーが出てしまいました。

 

 

対処法を教えていただきたいです。

 

よろしくお願い致します。

0 Kudos
Message 2 of 4
(2,268 Views)

hi xaviar_nao,

 

open the context help (ctrl+H) and hover over the broken wire,

it should say what datatype conflict exist.

 

have a look what the output of your shared variable is,

possibly a cluster, extract/convert to a DBL array,

then the BuildArray function should have no problems.

 

if you want more help,

create a dummy vi, that has the data type of your shared variable as a constant,

so we can see what it is.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 4
(2,273 Views)
Solution
Accepted by topic author xaviar_nao

xaviar_nao,

 

The problem you have is because you are using "Build Array" with an array of doubles, and a waveform. 

 

An array can only contain one data type.

 

Consider converting the waveform to XY arrays using either "Waveform to XY Pairs" and a For loop to Unbundle them, "Get Waveform Components" with a For loop to reconstruct a Time array, or "Get Waveform Time Array" and "Get Waveform Components" with the Y component to get 2D array outputs.

That should be what you need for the CSV file you seem to be writing.

 

Example_VI_BD.png

 

Edit: You have an array of waveforms from the Timed Loop. If each iteration gives only one point, it might be easier to convert to a DBL value or series of DBL values inside the loop, so that you have a suitable 2D array starting from the Timed Loop.

 

Nonfunctional example for inside the loop, using Concatenating tunnels:

Example_VI_BD.png

 


GCentral
Message 4 of 4
(2,268 Views)