05-01-2013 11:40 AM
Does anyone know how I can extract the value (element) from a 1D array so that the output value is an integer ? I'm having signal incompatibility problems (again). I need to use the particular element from an array in various math blocks i.e. Add
Solved! Go to Solution.
05-01-2013 12:20 PM
What is the data type of the array?
05-02-2013 10:48 AM
The following is the error message that I'm receiving:
These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
double [64-bit real (~15 digit precision)].
The type of the sink is double [64-bit real (~15 digit precision)].
I'm puzzled why LabVIEW is telling me that the data types do not match when the Source & Sink are the same (double 64-bit real) ?
05-02-2013 10:54 AM
One is an array and one is a scalar. That's not the same!
(What does your question have to do with whatever code you attached above?)
05-02-2013 11:08 AM
@bunnykins wrote:
I need to use the particular element from an array...
I could be over simplifying things here, but it sounds like you just need to use the Index Array function.
05-02-2013 01:51 PM
I tried using Index Array but it still doesn't work. The output from the Index Array is still in 1D array format. I need the output to be a plain and simple integer or constant that I can then manipulate along with other constants in Add, Subtract blocks etc.
05-02-2013 01:54 PM
Please post the VI you are having your problem with and tell us exactly where your problem is in the VI.
05-02-2013 02:13 PM - edited 05-04-2013 10:29 AM
@bunnykins wrote:
I tried using Index Array but it still doesn't work. The output from the Index Array is still in 1D array format.
If the input is a 1D array, the output of index array is a scalar. (Only if the input is a 2D (or higher) array, and not all indices are wired, you don't get a scalar)
Make sure you are really wired to the output and not to the already wired input or similar.
10-02-2014 03:24 AM
Hi,
I faced the same problem as well but I don't really understand what you meant by "Make sure you are really wired to the output and not to the already wired input or similar."
Do you mind to explain in details?
Thanks! 😄
Regards,
Vanessa
10-02-2014 03:28 AM
Please do not add to an old thread that is already marked as solved with a new problem. (if you had the same problem the above solution would be sufficient!)
Please attach your code and tell us exactly what you are trying to do and what kind of problem you have.