VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Veristand Custom Controls

Solved!
Go to solution

I am just starting to use the Veristand evaluation copy to see if it can do what I need it to do.  It seems very customizable, and I was trying to create custom workspace controls through Labview.  I would like to get things like radio buttons, lists and drop down menus into the workspace to control my model.  I tried simply taking one of the numeric controls and replacing it with one of the previously mentioned controls, but it gave me an error saying that they were unsupported.  It seems like I would be able to do this using the Free Label Template, but I'm not quite sure how to do that.  I was able to find a custom indicator example (the min/max one), but was unable to find anything involving custom controls.  Are there any examples or tutorials I could look at?  How would I go about making some of those Labview controls into things I could use in the Veristand Workspace?

 

-Eric

0 Kudos
Message 1 of 8
(13,615 Views)

Hi eric, I assume you find this http://zone.ni.com/devzone/cda/epd/p/id/6236 (Min/Max Indicators). To make one that is a control you can simply change the numeric indicator to a numeric control and swap out the read value VI that is in the diagram with write value VI that is in the NI VeriStand pallete.

 

 

  

0 Kudos
Message 2 of 8
(13,581 Views)

I have tried doing this, but every time I open up the VI it searches for the sub VIs and gives me a warning.  I ignore it because it was able to find all of then, just in different locations.  Once I change everything I save it just like normal.  When I put it in the veristand directory and try to bring it into the workspace it gives me an error that it cannot find all the sub VIs.  Do I need to put everything in a library file?  How would I do that?

 

-Eric

0 Kudos
Message 3 of 8
(13,569 Views)
There are several examples of NI VeriStand add-ons, and you can Learn More about Creating Add-Ons for NI VeriStand

Mark E.
National Instruments

0 Kudos
Message 4 of 8
(13,565 Views)

Eric,

Do you mean it's searching for the VIs that make up your new control? If so, are you putting all your subVIs in the Display Templates Directory? ([Documents and Settings]\All Users\Documents\National Instruments\VeriStand\Display Templates)

 

If you're receiving the error that it can't find lvhook.dll, be sure to link to the version in [Program Files]\National Instruments\VeriStand 2009\data

 

Do either of these work for you?


Mark E.
National Instruments

0 Kudos
Message 5 of 8
(13,554 Views)

I am simply modifying the min max VI to set instead of display the value.  It all saves correctly in Labview and I am doing a save as -> save entire hierarchy to a .llb file.  I put it in the templates folder and it shows up in Veristand.  When I trie to drag it into the workspace, I get the error attached.  My VI is also attached.

 

-Eric

0 Kudos
Message 6 of 8
(13,543 Views)
Solution
Accepted by topic author EricHettler

Hi erric, I have some answers for your issue.

 

1. I attached a zip file that contains your control renamed and build a project in it. You should be able to unzip it, check the build specificiation and make sure the output destination is the C:\Documents and Settings\All Users\Documents\National Instruments\VeriStand\Display Templates. Trigger a build on this and you should get EricHettlerSample - Radio.vi and EricHettlerSampleControlSupport.llb in there. Once you have this run a workspace you will be able to drop the EricHettlerSample - Radio control from the control list.

 

2. For the explanation. I think when you do a save as on the min-max example you download from the web LabVIEW cross link the vis that is in the llb with the one in the vi.lib. So doing a save as will not work. What will work is that you create a project and setup a source distribution to build the custom control. These are the steps I take based on your attached file:

  1. Rename in windows explorer the attached numeric indicator - radio.vi to EricHettlerSample - radio.vi
  2. Open LabVIEW convert the .llb you attached to a directory.
  3. Create a new project file.
  4. Open EricHettlerSample - radio.vi under my computer, when LabVIEW prompts me for some VI i look for them in the converted llb directory. Note that LabVIEW will find most of the files under vi.lib since these are the files that NI VeriStand install to labview directory.
  5. Once I added the some of the vis, I mass compile the project.
  6. Create a source distribution. Add the EricHettlerSample - radio.vi. Go to source file setting make the main vi go to the template folder and everything else go to a llb folder.
  7. Trigger the build, LabVIEW will do a better job creating an isolated component that is correctly linked.

As a rule you always want to create a project to build a custom control, since Save As will not always worked with the LabVIEW VI linkage in NI VeriStand.

 

To create a completely base custom control project what you do is:

  1. Copy C:\Documents and Settings\All Users\Documents\National Instruments\VeriStand\Display Templates\Decoration - Free Label.vi in windows explorer to a directory of your choice.
  2. Do a rename on the VI in window explorer.
  3. Open LabVIEW create new project add the renamed VI under my computer. This will create a blank project for customizing custom controls.

I hope this helps, let me know if it still does not work for you.

 

Also if you still bothered by the error messages that shows up you might want to clean up C:\Documents and Settings\All Users\Documents\National Instruments\VeriStand\Screens directory since this directory is where NI VeriStand caches all the controls you drop in the workspace. So if you have a control that cannot be loaded delete all vis in this directory should remove the bad vis.

 

 

0 Kudos
Message 7 of 8
(13,512 Views)

That worked.  Thanks.

 

-Eric

0 Kudos
Message 8 of 8
(13,501 Views)