11-24-2012 08:19 PM
Bill David,
I do not have the Wavelet addon. When I disable the wavelet parts of the code, it runs indefinitely. Well, at least 30 seconds.
Have you checked for errors from the Wavelet Denoise VI? You do not have the error terminals wired. One reason this is a concern is that you probably get zero Bytes at Port at least occasionally and the filter and Wavelet VIs may not be happy with null inputs.
Generally it does not make sense to use termination characters and Bytes at Port at the same time. If your device uses termination characters, set the Byte Count input to a value larger than the longest expected message and wait for the termination character to end the read. Then you always get a complete message (except possibly the first iteration).
Your array code makes no sense. You initialize the shift register with an empty array and then never put anything else into the shift register. You append an array of U8 from the VISA Read to the empty array of DBL, then transpose the array and extract the first row. This gets a two element array containing a zero and the first element of the Byte Array. The filter will not produce meaningful results when you feed it data which is 50% wrong and the rest occurs one element at a time. Plus you lose all but the first element from every VISA Read.
You have the filters set for 1000 Hz sampling. The serial port speed is set to 9600 baud. That means that you can read one byte every 1.04 ms or slower. You cannot get 1000 Hz sampled data through the serial port.
But, I do not know why it stops.
Lynn
11-24-2012 08:36 PM
Dear johnsold
I dont know how to say that. but i was indeed in need for the very useful infos you have provided . all i want to fo is to take the byte array and then transpose it etc...
but the transpose 2D array shoud be fed by a 2D array ( i cannot connect the output of a string to byte array function directly to the transpose 2D array ).
can you suggest anything else please ?
Any help would be appreciated .
Thank you
11-24-2012 08:51 PM
Bill David,
Why do you need to transpose a 1D array? LabVIEW does not distinguish between row and column vectors like MATLAB and some mathematicians. The string output of the VISA Read can be converted to a 1D array as you are doing. The Filter VI and the Wavelet VI want 1D arrays.
Do you need to reverse the array? There is an array function which will do that.
Lynn
11-24-2012 08:58 PM
Yes sir I need to reverse the array . which function can do that please ?
11-24-2012 09:06 PM
Bill David,
Array >> Reverse 1D Array.
Lynn
11-24-2012 09:15 PM
Thank you johnsold 🙂