VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating custom display controls/indicators

I have been working with VeriStand for close to a year now but have never ventured into making my own controls/indicators for the workspace.  I am trying to make a more complicated one that based on user selections will only display choices for an FIU that are needed since they vary for different kinds of load setups.

 

I started by just creating the LabVIEW code that operates to my desire and gives the output I would need for the FIU but I can't get it to work properly with VeriStand or anything.  I get an Error 7 right now and before when I didn't get errors I got wildly wrong outputs.  The range of the outputs is between 0-6 and i would get things like 22E+22.  I looked at using a numeric control template since my final output is numeric and that's how I got the wild outputs.  My last attempt I based on the example provided in this post here and i get Error 7 now.

 

I'm not sure what is wrong or how to fix it - no clue at the moment.  Any help would be appreciated.  I have not been able to find much information on creating custom display templates for VeriStand on the site either.

 

I attached a .zip file with my project in it so it can be looked at.  Thanks in advance for any help.

0 Kudos
Message 1 of 21
(7,326 Views)

Hey Joe,

 

Where you you update the shift register for the channel path that feeds the Set Single Channel Value.vi?    It seems like you never tie the result of the Select Channel Dialog to the path of the channel that you would like to update. 

0 Kudos
Message 2 of 21
(7,320 Views)

To answer your question... no where, haha. So I relooked at that example and I missed the part where it uses a VI that seems to make that update.  As far as I can see that is all that is in the examlpe to correct that but when I tried to use it in VeriStand I still get Error 7.

 

Since the change was only a couple wires I just attached a screen shot of the area that I changed.

 

Untitled.png

0 Kudos
Message 3 of 21
(7,315 Views)

I will try to build it and see what I get.  Are you using LV2011 and VS2011?

0 Kudos
Message 4 of 21
(7,312 Views)

Yes, 2011 for both.

0 Kudos
Message 5 of 21
(7,310 Views)

It appears that the problem is in the Channel Selection Dialog vi.  You may be able to model your channel selection vi and the associated architecture after the one that is used by the FIU Control - Channel workspace control.  I am thinking that the vi's and references that you are using to populate the channel tree are not correct. 

0 Kudos
Message 6 of 21
(7,300 Views)

I haven't looked at your zip file but two things come to mind by reading the comments:

  1. Make sure you're building the workspace control's dependencies into an LLB just like custom devices do. That way all the files are ready for NIVS to dynamically load them. Only difference with workspace controls and custom devices is... for a workspace control the top level VI should be built outside the LLB and the dependencies should go in the LLB. So the output of the source dist. build spec. should be two files.
  2. You can get weird errors when items are dynamically loaded into memory if they have the same name as something else already in memory but the VI/CTL is actually different. The way to solve this is namespacing. Make sure your workspace control's code is all in a labview library (just like custom devices are). So when it comes into memory it has its own namespace.

 

You can see examples of both in the 2012 shipping example of the workspace waveform graph control

Stephen B
0 Kudos
Message 7 of 21
(7,293 Views)

Aaron_Smith wrote:

It appears that the problem is in the Channel Selection Dialog vi.  You may be able to model your channel selection vi and the associated architecture after the one that is used by the FIU Control - Channel workspace control.  I am thinking that the vi's and references that you are using to populate the channel tree are not correct.


 I finished doing this last evening after your suggestion and I believe I made some progress.  Now I am not getting any errors but there is nothing to choose when the dialog pops up so I am going to take a closer look at it today.  Also when trying to place it in the workspace it shows up as a small icon that is cut in half.  I included a picture below.  I don't know why it doesn't show up as the front panel of my control.

 

Untitled.png

 


@StephenB wrote:

I haven't looked at your zip file but two things come to mind by reading the comments:

  1. Make sure you're building the workspace control's dependencies into an LLB just like custom devices do. That way all the files are ready for NIVS to dynamically load them. Only difference with workspace controls and custom devices is... for a workspace control the top level VI should be built outside the LLB and the dependencies should go in the LLB. So the output of the source dist. build spec. should be two files.
  2. You can get weird errors when items are dynamically loaded into memory if they have the same name as something else already in memory but the VI/CTL is actually different. The way to solve this is namespacing. Make sure your workspace control's code is all in a labview library (just like custom devices are). So when it comes into memory it has its own namespace.

 

You can see examples of both in the 2012 shipping example of the workspace waveform graph control


1.  I did do this after looking at the example that I linked to in my first post.

2.  If I did #1 correctly wouldn't this be taken care of already?

 

I am using LV2011 and VS2011 and I don't want to upgrade to 2012 at the moment so is there anyway to look at this example without doing that?

 

Thanks for the help so far - I will update this post if I make any progress today.

0 Kudos
Message 8 of 21
(7,279 Views)

The FIU control you used as an example unfortunately does not use a library to namespace. So I suggest creating one for your control.

 

The sizing of the front panel when dropped is determined by the VI properties for minimum panel size. Make sure that is set as desired. I suggest resizing your front panel to desired size then go into VI properties and click the "set minimum size" button to just apply the current size. The other options in appearance also work so make sure the status bar and all the other crap is hidden.

 

For a more functional and less buggy channel selection dialog, I suggest using this: http://zone.ni.com/devzone/cda/epd/p/id/6266

Stephen B
0 Kudos
Message 9 of 21
(7,270 Views)

Also, even though my control works fine outside of VeriStand in terms of it's logic and event structure - it does not work in VeriStand.  Although I suppose that could be attributed to it not working in general but I believe I read something about event structures and controls not working like they do in "regular LabVIEW" when you are using the RT module.  Since VeriStand deploys to an RT target could this be a reason for that problem?

0 Kudos
Message 10 of 21
(7,268 Views)