VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Automating large amount of channel mappings on Reference Configurable Custom Control

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.

 

 

 

0 Kudos
Message 1 of 4
(6,862 Views)

PCT,

 

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.

 

 

example.png

 

Thanks,

Tom

 

Message Edited by ThSa on 05-14-2010 11:06 AM
0 Kudos
Message 2 of 4
(6,853 Views)

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?

 

 

0 Kudos
Message 3 of 4
(6,831 Views)
The only reason to defer FP updates is due to performance issues. The more property nodes are processed the slower is the execution because each single property node forces a redrawing of the front panel. In case that indicators and controls are mixed, 'defer FP updates' shouldn't be used because the user wouldn't be able to change input values during that time.
0 Kudos
Message 4 of 4
(6,828 Views)