07-15-2015 12:44 PM
I am trying to select whether to add new values to the array or clear the array, but I seem to have an error. The error is that the polymorphic terminal can not accept this data type.
Does anyone know what I might be doing incorrectly?
Solved! Go to Solution.
07-15-2015 01:04 PM
You cannot select between an array and a scalar. They types must match. Maybe you could add the select after the "build array" node.
Overall, the code does not make a lot of sense. Can you explain what you are trying to do? I am sure there is a better way. A simple "built array" does NOT add an element to an existing array, for example.
07-15-2015 01:07 PM - edited 07-15-2015 01:08 PM
You do not show what is to the left of your picture. What is feeding into the select for the left?
The way you have run your wires we can not tell for sure what output you have wired to the feed back node
What is it you are trying to do??
07-15-2015 01:25 PM
Are yo looking to delete one value or initilize the array to empty? I am a little confused as to what you are looking to do. I looks like the picture is looking to delete one value but in your description you said that you wanted to clear the array.
07-15-2015 01:33 PM
I've attached the VI in question.
I'm looking to delete the whole array/clear the array/initialize the array after the timer hits a specified value (elapsed time).
Bascially, my thought process was to build an array with data coming in for about 10 seconds, send those values to the mean function to be averaged, then clear the array so that new values can be averaged.
As far as I know, delete from array is one way to do it, but I guess I'm implementing it wrong or something.
07-15-2015 01:37 PM - edited 07-15-2015 01:42 PM
You array never has more than one element. I am sure you want to build the array in a shift register or feedbasck node instead.
Why are you throwing away most elelemts of the original Y array?
07-15-2015 01:41 PM
THere is a built in function that already does that called point by point mean. It is on the tool palete. You can tell it how many points to average while they come in one at a time.
07-15-2015 01:46 PM
Why are you throwing away most elelemts of the original Y array?
I don't want to average any old values after the timer resets. Only the new ones.
07-15-2015 01:48 PM
THere is a built in function that already does that called point by point mean. It is on the tool palete. You can tell it how many points to average while they come in one at a time.
Can the point by point mean ignore old values and only average the last few data values?
07-15-2015 01:50 PM
@msiwk wrote:
Why are you throwing away most elelemts of the original Y array?
I don't want to average any old values after the timer resets. Only the new ones.
I am not talking about the averaging. With every call, you get a Y array, but you only decide to use the first element. Why?