LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integral x(t) VI error-20003

Solved!
Go to solution

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.

0 Kudos
Message 1 of 7
(2,934 Views)

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!

0 Kudos
Message 2 of 7
(2,919 Views)

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 .

0 Kudos
Message 3 of 7
(2,894 Views)

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)

0 Kudos
Message 4 of 7
(2,890 Views)
Solution
Accepted by topic author 劉彥均

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. 😄

 

altenbach_0-1587743473610.png

 

0 Kudos
Message 5 of 7
(2,879 Views)

 ok. Do you mean my variable a and b are calculated more times and make my size of VI is big?

 

0 Kudos
Message 6 of 7
(2,875 Views)

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. 😄

0 Kudos
Message 7 of 7
(2,870 Views)