In order to read the configuration and settings clusters two methods have to be provided. In the previous step you have already created them, namely: “Get settings chain.vi” and “Get configuration chain.vi”. Although perhaps you haven’t got in the beginning a configuration cluster, nor settings cluster, here we show how to set it up for empty clusters and how to use it once you have those clusters.
Add component name to array of names
Open “Get configuration chain.vi”. Add an error case structure after the call to parent.
- Drag and drop your class to the block diagram.
- Select from the Murmex.lvclass the method “Get component name.vi”. Either from the project explorer, either from Right mouse click menu >> Addons >> Distrio >> Murmex >> Murmex >> accessors >> Get component name.
- Build the array of class names with your component name as first element.
- Add an empty variant to the array of variants as first element.
- Repeat steps 1-4 for the “Get settings chain.vi”.
Convert cluster to variant
Once using a configuration cluster and / or settings cluster for your component, you need to update the methods ”Get settings chain.vi” and “Get configuration chain.vi”. Here we show how to do that.
- Add to your class a Virtual Folder and name it “type definitions”.
- Add to this newly created folder a Control.
- Change the control to “Strict Type Def”.
- Add an empty cluster to the front panel.
- Name the cluster “configuration”.
- Add the controls to the cluster you like to use.
- Save the control as “configuration cluster.ctl”
- Close the control.
- Open the private class data, it is the control directly under your class in the Project.
- Drag and drop the newly created control to the private class data.
- Close the private class data and save all.
- Open the method “Get configuration chain.vi”.
- Unbundle from the class wire the configuration cluster, convert it to variant and add it to the array of variants, instead of the empty variant.
- Repeat steps 1-13 for the settings cluster.