This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is this element/feature?

 

Hi all,

 

What is the “Format 0” box above?  Not asking specifics, but generalities.  When you click on it, it expands like below.  I would like to make CPHA an input to this function (i.e. provided from the front panel).  Haven’t run across something like this before, so wondering if somone could provide some pointers on where to look.  This is NI provided example code that I am modifying, specifically the DAQmx SPI code.  Thanks!

 

Gary

0 Kudos
Message 1 of 6
(2,269 Views)

show polymorphic selector

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 6
(2,267 Views)

Any way to set/change the polymorphic selector from the front panel?

0 Kudos
Message 3 of 6
(2,232 Views)

NO. you cannot change the polymorphic selector from the Front panel. 

 

A polymorphic vi is a set of closely related vi's called instance vis (they all have the same connector panes although the datatype may differ).  they assist the developer by easilly replacing one type of function with another similar function but the specific instance vi must be determined and in memory at compile time and cannot change at run time.  If there were a way to change the instance vi selection from the FP the block diagram code would change at run time and that is not allowed.

 

That being said:  there are ways to dynamically dispatch a vi (choose the vi to run programatically)  but, not by using polymorphism as LabVIEW implements polymorphism.  Is there a need for your application to do this?  we' can point you in that direction but, there are some more advanced LabVIEW features to master to achieve this behavior.


"Should be" isn't "Is" -Jay
Message 4 of 6
(2,228 Views)

Hi Jeff,

 

Thanks for the reply.  I am using NI's DAQ example code to generate SPI.  I'd like to have CPOL and CPHA (SPI settings) configurable from the front panel.  However, CPHA is set with a polymorphic selector in the example code.  Just trying to figure out the best (i.e. easiest) way to make it run-time configurable.  I've had LabVIEW training thru Core 2, if that gives you and indicator of my expertise (i.e. beginner).

0 Kudos
Message 5 of 6
(2,219 Views)

Use a case statement with instance vi's in there own cases selectable from a FP control.  All instance available at run time (easiest)


"Should be" isn't "Is" -Jay
Message 6 of 6
(2,208 Views)