LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

index and bundle cluster array problems

I have an LV 6.0. I have a index and bundle cluster array problems. I have some broken arrows that I cannot fixed. Anyone can help. The vi is attached.
0 Kudos
Message 1 of 6
(2,996 Views)
If you hover over the broken wire with the mouse, LabVIEW will tell you the problem.  You are wiring a single element (from the shift register) to an array input (index and bundle cluster array), and a cluster to a (presumably - the vi was missing when I opened it) 2D array of double.  You should turn on the context help and then you can hover over vis and see what datatypes are used by what functions.
Message 2 of 6
(2,992 Views)
Step back for a moment and really THINK about what you're trying to graph. Is it two separate plots with the increments on one and the values you read on the other? If that's the case, then the output of the shift register will only give you the very last value. If you also want to use the Write to Spreadsheet, then you cannot create a cluster array. It only accepts a 1D or 2D array of numerics. Explain exactly what you want to do.
0 Kudos
Message 3 of 6
(2,984 Views)
I need only one plot or graph. It is the scale reading Vs the value(start + increments).
0 Kudos
Message 4 of 6
(2,980 Views)
To plot values on the Y scale and the increments on the X scale, then you'll want to use an XY Graph and not a chart. I've attached a picture that shows how you can modify this for a regular XY Graph. You can also make an XY Graph act like a chart so that you can retain a history of values. The is a shipping example called XY Chart that shows how this is done. I've also shown how to create the correct data type for Write to Spreadhseet File. I did a little cleanup as well. Your path control should not be on the right side of the diagram. This is a style convention. It's also not a good idea to have parts of the wires hidden like you do with the start and increment controls.
0 Kudos
Message 5 of 6
(2,970 Views)

See the attached PNG file.  You can use build waveform to create a waveform for display.  The output array is the Y value of the waveform.  The X value (or dT) is gotten from the increment control since every X value will be of the same increment.  I don't know about your subvi since you did not include it, but it seems that building a 2D array serves in input correctly.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(2,967 Views)