From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error

That function in capture3 is To DDT express VI located in the Express >> Signal Manipulation palette.

 

Try to avoid the blue dynamic datatype wire.  You created a problem when you used the Split Signals on the array of waveforms.  It converted the waveforms (a good powerful datatype) to a DDT wire.  DDT is great because it allows you to connect anything to anything.  The problem is that you really don't know what the underlying data is, and it will force the data into different types that you really don't want in order to make the connection.  In this case,  the array of waveforms turned blue, but that got coerced to a double (one data point, which signal?  first data point or last data point?, you don't know) to fit into the Enqueue because you defined that queue to be a double scalar.

 

Get rid of the split.  Use Index Array, do the math, build array to modify those signals.  Create a constant from that wire and wire that to your Obtain Queue rather than the scalar double precision float you have there now.

 

Your case structure manipulation is very odd.  You use a string that is either "start" or "stop" to determine how to control the case structure.  But doing calculations on that to check the length and determining whether it is 4 or 5 characters long.  Very, very Rube Goldberg.  Just use a boolean value you store in a shift register, not a string.

0 Kudos
Message 11 of 12
(516 Views)

Also, I don't think you are using your queue in the way you meant to. You have set yourself up for a memory leak.  You only dequeue data once you've given the "start" command (or any other 5 letter word).  But your Enqueue is always queuing up data.  Eventually it will fill up the queue and you'll run out of memory.

 

If you finally do start, the first point you will dequeue will be the very first one ever sent.   And if you stop and restart, the next point will be the very next one.  If your intention was to skip the plotting of data while you were in "stop" mode, that is not going to happen.  That data will remain sitting in the queue until you finally go and read it.  (Assuming you don't run out of memory first.)

0 Kudos
Message 12 of 12
(504 Views)