04-24-2020 07:11 AM
I have a problem about my Integral x(t) VI because my output signal is weird . I click this VI and find the error = -20003 , I don't know how to solve the problem . Who can give me some suggestions.
Solved! Go to Solution.
04-24-2020 07:53 AM
You need to attach a VI where you don't have default data of 0 for every control.
Put values into the controls that will allow us to duplicate the problem you are having. Go to Edit >> Make Current Values Default. Save the VI and attach that one.
Error -20003 says "The number of samples must be >0". So that seems to indicate you don't have any valid data you are working with. Probably empty arrays!
04-24-2020 09:32 AM
Hello,I try to go to Edit >> Make Current Values Default. I try to delete another part .But I don't know how to solve the empty data .
04-24-2020 10:06 AM - edited 04-24-2020 10:12 AM
Running your VI, I don't get any error. The data is not empty.
(There is no reason for your sequence structure. Except for a and b, none of your script node inputs are ever used. Since the two first script nodes can be calculated at compile time, they are constant folded, making your VI gigantic in size)
04-24-2020 10:52 AM
If you would get rid of all these script nodes, the VI with identical functionality would only be 20kB (2000x smaller!)
Here's is functionally identical code using plain g primitives. Arguably simpler and better performance. No error. 😄
04-24-2020 11:10 AM
ok. Do you mean my variable a and b are calculated more times and make my size of VI is big?
04-24-2020 11:16 AM - edited 04-24-2020 11:18 AM
No, a and b are scalars and infinitely small. They are controls, so they never get "calculated".
My guess is that the first two script nodes (generating the waves) are calculated at compile time because they don't depend on any user input. This means that 1M DBLs (8MB for that alone!) are stored in the compiled code, replacing the script nodes under the hood. (This is of course reasonable for smaller arrays, but can blow up easily if the arrays get gigantic as in you case.)
As I said, don't use mathscript for that. Learn real graphical programming and you'll never look back. 😄