01-09-2001 06:27 PM
01-09-2001 06:38 PM
08-01-2006 11:21 AM
02-20-2020 12:21 PM
If you're using the names elsewhere, also, try this:
1. Create an array of Plot Names (strings)
2. Connect the array to a For Loop with indexing enabled
3. Put the Waveform Chart (in my case) Property Node Plot.Name in the loop and wire it to the indexed terminal (make sure it's set to Write)
4. Put the Waveform Chart Property Node ActPlot in the loop and wire it to the Iteration Terminal through a To Unsigned Long Integer.
02-20-2020 12:43 PM
@HK45acp wrote:
If you're using the names elsewhere, also, try this:
1. Create an array of Plot Names (strings)
2. Connect the array to a For Loop with indexing enabled
3. Put the Waveform Chart (in my case) Property Node Plot.Name in the loop and wire it to the indexed terminal (make sure it's set to Write)
4. Put the Waveform Chart Property Node ActPlot in the loop and wire it to the Iteration Terminal through a To Unsigned Long Integer.
You can drag the property node to expand it. Then you can have a single property node handle multiple properties. Just make sure the Active Plot is being set first (they do execute in order, top to bottom).
02-20-2020 12:53 PM
You're right, of course. I realized why my Plot Names were in the wrong order in the program I'm currently writing and tried to edit my message that I had just posted. For some reason I wasn't able to edit it, so thanks for correcting it for me! ;o)
02-20-2020 03:28 PM
@HK45acp wrote:
If you're using the names elsewhere, also, try this:
1. Create an array of Plot Names (strings)
2. Connect the array to a For Loop with indexing enabled
3. Put the Waveform Chart (in my case) Property Node Plot.Name in the loop and wire it to the indexed terminal (make sure it's set to Write)
4. Put the Waveform Chart Property Node ActPlot in the loop and wire it to the Iteration Terminal through a To Unsigned Long Integer.
There is another approach that you can use with Waveform data types that was added after this post was started.
On the Waveform palette you will find a function that will let you set attributes of a waveform. One of the predefined attributes of a Waveform is NI_Channel_Name.
If you establish the channel name in the Waveform itself, the plot legend will automatically adapt when the chart is updated.
I like that technique because;
I do not have fiddle with property nodes
When I present a different set of channels to the chart, the chart will reset and start charting the new set of channels.
Please note the Chart property "Ignore Waveform attributes" should NOT be enabled for the above to work.
Option:
You can establish the channel names when a task is created and the array of waveforms returned by a DAQmx Read will include the channel names and we can skip the "Waveform Attribute".
Just sharing ideas,
Ben