VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Right clicking custom control causes workspace to freeze when running stimulus profile

Hi,

If I run a stimulus profile and then try to right click on a custom control/indicator, the workspace freezes as the custom control is trying to load the channel list. It seems like the only way to get around this is to force shutdown the workspace. The controller keeps alive and runs in the background. Any ideas? Thanks.

0 Kudos
Message 1 of 8
(6,345 Views)

That's strange that you're seeing VeriStand hang like that.  Here's a couple of things I'd like to know:

1. Does this happen when you are running the stimulus profile in edit mode?

2. Does it hang with the same custom control when the no stimulus profile is running?

3. Where did this custom control come from?  Is it from our website, or did it come from somewhere else?

 

I'm looking forward to hearing back from you.  These answers will definitely help me better understand the problem.  Thanks for the question!

 

0 Kudos
Message 2 of 8
(6,327 Views)

Hi Kyle,


1. Does this happen when you are running the stimulus profile in edit mode?

2. Does it hang with the same custom control when the no stimulus profile is running?

3. Where did this custom control come from?  Is it from our website, or did it come from somewhere else? 


1. The hanging does not happen all the time, only some of the time. I've typically only tried in non-edit mode. Today I tried in edit mode, and it appears not to hang the few times I tried it.

2. The custom control does not cause the workspace to hang if no stimulus profile is running.

3. The custom control came from the NI website that hosted a variety of VeriStand custom device add-ons written by NI. I've since made some minor changes for visualization and additional indicator/control types.

 

Thanks.

0 Kudos
Message 3 of 8
(6,322 Views)

I'm not sure if those changes are what causes the hanging, but it seems the workaround is to use edit mode for modifying this control.  If this hang happens in edit mode, or if you can reproduce this from the stock control from the website, let me know.

0 Kudos
Message 4 of 8
(6,308 Views)

Thanks, Th0r. That is a usable solution for the most part, but the issue we've found is that some users accidentally right click on the controls or indicators. It appears that the standard access controls for VeriStand doesn't seem to lock out the right-clickability. Do you know if there is a way for us to only allow right-clickability in Edit Mode, for example? Thanks.

0 Kudos
Message 5 of 8
(6,306 Views)

You may be able to edit the custom control to handle right-click events by discarding the right-click action.  Does this same behavior happen when using the custom control directly from our website?  If so, can you provide the link to that custom control?

0 Kudos
Message 6 of 8
(6,294 Views)

Hi Kyle,

Could you kindly clarify your suggestion of discarding the right click action? How would I edit the custom control from the workspace if I discarded the right click action?

I have not tried the original right click custom control from the NI website for a while now. A support representative helped me to add some additional commands to the right click command, namely to save parameters such as the upper and lower display limits (of a gauge, thermometer, etc.) Could that be causing the workspace to freeze, if it cannot do the saving when a stimulus profile is running for some reason?

Thansk.

0 Kudos
Message 7 of 8
(6,291 Views)

You could modify the event structure in your custom control to throw out the right click event using "Mouse Down?", but I don't think it will be possible to change that behavior based on the current context of the workspace window (run vs edit mode).  There may be an issue in the workspace that disallows certain actions from context menus in custom controls, but it's hard to say that this is the case without testing out your custom control specifically.  The best thing would be to figure out what changed between the basic control from our site, and your custom control, and see if we can pinpoint exactly what's causing this hang.

Message 8 of 8
(6,261 Views)