LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i select elements in an array using decimate ID array function to plot a multiplot waveform chart?

Your VI has some problems.

 

As others have pointed out you always have an array containing exactly one element.  When you decimate that you get nothing because there are not enough elements in the array to decimate.

 

The inner while loop has True wired to the Continue if True terminal so the loop will never stop.  Are you stopping the program by using the Abort button (Stop sign) on the tool bar?  If so, STOP!  That is intended only for use by the programmer to abort faulty programs during development.  PUT a Stop button on your front panel and wire it to the terminal.  Change the terminal to Stop if True. Same for outer loop.  Because the only way to stop the inner loop is to abort the program, the VISA Close and the Display Message VIs will never run.

 

This is basic data flow, the paradigm on which LV is based.  If you are not familiar with this concept, please go through the on-line tutorials for LV.

 

The Build Array, Decimate Array, and Array to Cluster construction makes no sense.  The Decimate Array issue has been discussed.  Charts accept single points and build up the display by storing the data internally, so arrays and clusters are not needed.  The Array to Cluster defaults to 9 elements in the cluster.  Besides not being needed, this size does not match.

 

As Ravens Fan asked, how do you know which data point belongs to which chart?  There is no synchronization between the code you have posted and the separate data sources.

 

What is the purpose of the Byte Count and Offset controls? If the data coming from the data sources contains characters other than numerics, you should define the protocol and set up the program to deal with it.  The user certainly cannot meaningfully change it on a read by read basis.

 

The sampling rate (1) makes no sense if the data sources are sending data continuously and (2) should be called the "Inter-Read Period," not a rate.  Suppose each of the three sources sends one sample each second and the sampling rate is set to 1. You will soon lose data because three samples will be sent for each one you read.  Usually the data is read as fast as it comes in and the sampling rate is set by the sending device.  If you get more data than you want or need, you can dispose of the superfluous data later.

 

A single loop and case structure forming a state machine would probably be a better architecture for your program.

 

Lynn

0 Kudos
Message 11 of 13
(707 Views)

This statement should be removed. It is mean and unnecessary.

This is basic data flow, the paradigm on which LV is based.  If you are not familiar with this concept, please go through the on-line tutorials for LV.

 

I have the same problem and am trying to find the correct solutions, to chart my data, which is in a Decimated 1D array with 300 elements. The data is writing to a TDMS file correctly, I just don't want to open an Excel file to review data. The FPGA.vi collect data from six channels at 50k S/s and transfers to RT by a FIFO in a timed loop (1 Mhz, dt=3). The data is written to an Enqueue Element. In the subordinate while loop the data is decimated.  This is where I would like to chart, but finding the knowledge to this from samples always using random number generators is not helping.

 

I like to try and solve problems on my own prior to contacting tech support, but comments contained in this forum statement leave a bad taste. This response should be edited or removed.

 

0 Kudos
Message 12 of 13
(622 Views)

In what way is that "mean" or "unnecessary".

 

Johnsold basically said there is a basic concept here the original poster needs to learn.  If he doesn't know it then he should take tutorials.

 

That is a pretty level-headed reply.  I don't see any reason that it should be "edited or removed".

0 Kudos
Message 13 of 13
(615 Views)