I am working on an application of VeriStand where I am modelling over 100 pieces of similar equipment, each requiring a set controls and indicators on the VeriStand workspace. I have thus configured a number of Reference Configurable Custom Controls, each of which consists of up to 100 individual controls and indicators. When I import these Reference Configurable Custom Controls into VeriStand, I need to manually map the model channels to each of the 100 or so controls and indicators on each of the Reference Configurable Custom Controls. This is a time-consuming and error-prone process, since to map each channel, I will need to right click on the control/indicator to bring up the system channel tree and then select the appropriate channel from the few hundreds available model channels on the tree. And if later I have a slightly different simulation model (.dll) with a different file name but otherwise contains an identical set of input and output channels, all existing channel mappings on the Reference COnfigurable Custom Controls will be lost and I have to map the few hundreds channel again, all because of .dll file name change!
Surely there must be a better way to automate the channel mapping for a complex system like mine with few hundred channels to map! For example, is it possible to modify the Reference Configurable Custom Controls so that on import into VeriStand (or at the press of a special button), it automatically maps each of the controls/indicators it contains according to a given text file located somewhere on the harddisk? The text file will be of a similar format to that used for System Mappings in VeriStand System Explorer. This way changes in model .dll file name or channel path names can be first easily updated in the text file, which VeriStand subsequently uses to automatically update the channel mappings.
Any suggestions and/or guidelines on implementing the above would be much appreciated.
since you have used the configurable custom control reference example already, you might just want to extend its functionality.
I've created a simple example that shows how you could programmatically 'map' indicators to signals in NI VeriStand. Since I am using 'Defer FP updates' in this example, I don't recommend using the same architecture for controls. In case of controls an event structure would be the better choice. I suggest to split up controls and indicators in two separate display templates though.
Let me know what you think.
Thank you. I think that gives me some idea on how to go about automating the channel mapping. In my application, I have strong reasons to mix controls and indicators in one display template, as it allows me to easily group controls and indicators belonging to the same piece of equipment.
What is the reason for setting to true 'Defer FP updates'? What will happen if I don't?