NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
h_yong
Posts: 130
0 Kudos

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.

Active Participant
Th0r
Posts: 242
0 Kudos

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

[ Edited ]

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!

 

Member
h_yong
Posts: 130
0 Kudos

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

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.

Active Participant
Th0r
Posts: 242
0 Kudos

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

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.

Member
h_yong
Posts: 130
0 Kudos

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

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.

Active Participant
Th0r
Posts: 242
0 Kudos

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

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?

Member
h_yong
Posts: 130
0 Kudos

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

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.

Active Participant
Th0r
Posts: 242

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

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.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page