Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA

i am acquiring some 10 bytes of data from STM connected as serial port . further in while loop the data is being separated as bytes where some bytes are being plotted corresponding to timer which i have made. but the issue is that as the number of graphs increases it cause issue in plotting of data. means when i connect one graphs only to one of byte dat, it displays as expected when i attach 3 graphs it displays wrong data indicating some missing of packets . the data is being stored as shift registers. what could be possible reasons.

0 Kudos
Message 1 of 3
(574 Views)

Since we don't have your instrument, we cannot test. Could you create another shift register containing a 1D array of strings where you append each received raw string. This way we can delete all IO and play back your data and test.

 

Do you have a link to the manual that describes the data format of the strings?

 

Some notes:

  • If you want array elements in order, you don't need to wire indices.
  • If you would convert to DBL before the index array, you would only need one.
  • Prepending new data to arrays is very hard on the memory manager. You should always append new data.
  • Wouldn't it be easier to have a shift register with a single 2D array instead of all these 1D arrays?
  • A clean front panel is important. There is no reason to e.g. scatter the reset and stop buttons all over the place.
0 Kudos
Message 2 of 3
(525 Views)

Could you explain the message format coming from the STM?  I suspect we can simplify your VI if we had the framing protocol being used.

 

Building arrays inside of loop can be very slow.  It is even worse since you are adding at the beginning of the array.  For a first attempt, try reversing how you are using the Build Array functions (arrays in the first item, new element in the second).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(473 Views)