LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing refnum and number of plots in a waveform chart

As I woke this morning, the likely answer to this question occurred to me:

 

I bet that, at the time that you created the reference, the specific chart from which you created it was configured for 5 plots (e.g., had a five-element cluster wired to it). If you wire an eight-element cluster instead and then create the reference, that reference will make broken wires with any of your 5-element clusters but intact wires with the 8-element one. Let me know if that is the case.

 

If you have ever created a polymorphic VI, you know that you have to create a regular VI for each type of input you want to handle. You subsume all these specific VIs under one polymorphic envelope, which you use on your diagrams. At compile time, the compiler checks the inputs to the polymorphic VI and inserts the code for the correct specific input VI. The compiled code is no longer polymorphic and will not run with any other input type. NI's polymorphic functions and controls behave similarly. A strict reference captures the "type" of the specific code that exists when it (the reference) is created, hence your problems (I think).

 


 

I still think using data arrays (for increased flexibiity) rather than clusters (for tighter type definition) is the better way to go in general, though I find LabVIEW's strict typing one of its prime advantages..

SULLutions.com
...when a single discipline is not enough
Message 11 of 13
(859 Views)
Ooops! I should have quoted your earlier post. I thought replying to it would put my response immediately after it.

JJ2112 wrote:

Thanks for the help. Is there a way to keep the class strict, so instead of it expecting references to

charts with 5 plots have it expect refences to charts with 8? I don't see why 5 is the magic number

or where 5 was set in the code.


 

SULLutions.com
...when a single discipline is not enough
0 Kudos
Message 12 of 13
(855 Views)

Hey,

 

Sorry for the delay, your solution worked!

 

The plots weren't the only instance of this problem (needing to change something
from 5 channels to 😎 and I wanted to see if I could solve them all before responding.
Most have similar solutions - changing the control on the front panel and then
recreating the reference on the block diagram. A few issues require different solutions
and I will attempt to solve these, but I'll leave this thread open in case I have another
question.

 

Thanks again

0 Kudos
Message 13 of 13
(820 Views)