07-24-2018 03:18 AM
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.
Solved! Go to Solution.
07-24-2018 03:21 AM
現在、LabVIEWでプログラムを書いております。
しかし、添付画像にあるようにデータタイプが異なるためエラーが出てしまいました。
対処法を教えていただきたいです。
よろしくお願い致します。
07-24-2018 03:24 AM
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
07-24-2018 03:32 AM - edited 07-24-2018 03:37 AM
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.
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: