VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference Configurable Custom Control for NI VeriStand

Solved!
Go to solution

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. Given that I have a few hundreds of controls and indicators in total to configure on the VeriStand Workspace, it has been recommended to me that I should be looking at using the Reference Configurable Custom Control (http://zone.ni.com/devzone/cda/tut/p/id/11123), which is much more efficient to configure. 

 

The main problem I have with Reference Configurable Custom Control is that when configured on the Workspace, the full channel path is displayed as caption alongside the control/indicator. As I have a faily complex simulation model utilising many levels of sub-modules, the full channel path becomes very long (eg. 'Controller/Simulation Models/Models/CCH_v1_0_bad/Inports/Islington 220kV Bus EAD/CB668/host_close') and tend to clutter up the Workspace, and also making the Workspace looking very ugly (more space is used to display caption text than occupied by buttons/LEDs). 

 

Is there an easy way to suppress the display of full channel paths, whilst still allowing the user to verify the full channel path when required by say right clicking on the object? Or at least is it possible for it to display one or two levels of the channel path rather than the full path?

 

Thank you for your attention.   

0 Kudos
Message 1 of 5
(8,334 Views)
Solution
Accepted by topic author PCT

What you want to do makes a lot of sense.  To do this, you'll need to modify the LabVIEW source code and recompile (build) the Right-Click Display Template Project.  You'll need LabVIEW 2009 for this.

 

The caption text is set in 2 different places within the main Right-Click - Template VI:  Init Control Captions VI and Update Data VI.  They're highlighted below: 

 

Caption is Set.png

 

You'll need to modify both of these VIs to do some string manipulation to chop off the parts of the path that you don't want before it gets written to the Caption.Text property node.

 

I recommend creating a subVI that does the string manipulation, that way you can just insert it into both VIs that you need to modify.  Use a while loop that searches through the string from the end towards the front, finding the Xth "/" from the end, then only keeps the end part and passes that out of the subVI.

 

These next two images highlight the places where you should put said subVI:

 

 Init Control Captions VI.png

 

 Update Data VI.png

 

 

You'll have to add your subVI to the Source Code/Sub VIs folder, then recompile the project (run the Build Specification called "Right-Click"). Then put the newly updated Right-Click Control Library.llb into the VeriStand Display Templates folder, just like you did originally. If you want instructions on how to do this, see the video embedded in this page:

NI VeriStand Add-on - Reference Configurable Custom Control

If you want further help getting started on this, let us know. 

Message 2 of 5
(8,308 Views)

Thanks. I have managed to pinch and modify the path name select VI in MinMax Tracker and inserted it into Right Click Display Template Project as suggested. It works.

 

A general question regarding custom created controls/indicators: Is it possible for VeriStand to automatically update changes that I make to the custom controls/indicators after the custom controls/indicatos have been imported into the VeriStand Workspace?  At the moment it does not appear to do so, which means that everytime I make small changes to my custom controls/indicators, I will need to manually delete all instances of the custom controls/indicators already in the Workspace and re-import them (and re-map the channels) again. This can be very tedious if I have a few hundred channels to map.  

 

 

0 Kudos
Message 3 of 5
(8,292 Views)

Hey PCT,

 

When you drop a control, a copy of that VI is actually placed inside a different folder. So when you update your library of dropable controls... the ones you have already placed are not affected. This is by design, but I understand it can be annoying in certain cases.

 

The source of all the dropable controls is here: <Public Documents>\National Instruments\VeriStand\Display Templates

The copy location for all your dropped controls is here:  <Public Documents>\National Instruments\VeriStand\Screens

 

 If you go in to the screens directory, you will see a lot of familiar names with #s tacked on to the end. Inside the workspace if you go to Screen -> Manage Items... you can see which of your controls correspond to what renamed and copied VI inside the screens directory.

 

If you want to force NI VeriStand to update all your dropped controls (screens folder) from their source (display templates folder)... you can close the workspace and then delete all the files inside the screens folder. Next time you open the workspace, NIVS will recopy all the items to the screens folder from the display templates folder... therefore updating them.

 

Take care,

Stephen B
Message 4 of 5
(8,285 Views)
Thanks for the explanation. I have tried your suggestion and it works the way I wanted it. Thank you.
0 Kudos
Message 5 of 5
(8,262 Views)