NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Key Focus does not function in LabView when invoked via TestStand

I have implemented my own PreUUT sequence (a LabView VI) in TestStand to allow a user to scan the serial number of a DUT.
 
For this to work efficiently I require the Key Focus to snap to a particular String Control. The Key Focus has been implemented in the LabView VI and works fine when called within another LabView Program, but the Key Focus does not work when the VI is called from a TestStand sequence. This in turn adds Test Time as the operator must manually click into the String Control before scanning the serial number.
 
Can anyone shed some light on why this may be occurring?
 
Thanks.
    Neil.
 
0 Kudos
Message 1 of 10
(4,525 Views)
Can you post an example?  It appeared to work in my test.
 
Allen P.
NI
0 Kudos
Message 2 of 10
(4,512 Views)

Thanks for yor reply.

Unfortunately I couldn't open your sequence file as I am using TestStand 3.1. However, when I used your VI in my own sequence, again the key focus did not snap to the String Control. Could this be 3.1 related, or perhaps it's my individual PC that has something quirky going on?

Thanks.

    Neil.

0 Kudos
Message 3 of 10
(4,489 Views)

Further to my message above, I have observed that the Key Focus does not work on my two development PC's, but does work on a Test System that is in use on the Production line. Any idea why this would be? Bit of a strange one this!

Thanks.

  Neil.

0 Kudos
Message 4 of 10
(4,485 Views)
Was there ever a solution to this?  I am having the exact same problem now.
 
THanks
Vickie
0 Kudos
Message 5 of 10
(4,244 Views)
I never got a resolution to this. I just had to work round it.
 
Regards.
0 Kudos
Message 6 of 10
(4,224 Views)
Why are you using a vi for the serial number?  You can use a pop-up message with the response string as the key focus right from Teststand.  Check out my example.

P.S. TestStand 4.0, let me know if you need an earlier version.
Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 7 of 10
(4,217 Views)

Why are you using a vi for the serial number?  You can use a pop-up message with the response string as the key focus right from Teststand.  Check out my example.

 

I am using a vi because there are other optional items that occasionally need to be update or entered.    If you have an example of your TS pop up message in 3.1, I would like to look at it.

Thanks,

Vickie

0 Kudos
Message 8 of 10
(4,204 Views)
I have TestSTAND 4.0 and 3.5.  I can re-do the sequence in 3.5 if this will help.  Let me know.
Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 9 of 10
(4,199 Views)
Here's my theory - since TestStand is a separate application than LabVIEW, it is possible that TestStand is foremost over LabVIEW. If TestStand is foremost over LabVIEW, then it's not possible that a LabVIEW vi have key focus. There are two solutions I've found that work well. 1. You can set your code module "Show VI Front Panel" property to TRUE in TestStand. This will cause LabVIEW to become foremost. Make sure then to do the normal stuff for getting keyfocus to work: open your front panel, let your vi to foremost via a property node, and set the control key focus after the front panel is open. 2. You can also add into the LabVIEW UI you want to have key focus an invoke node for "Bring to Front" on "This Application". Just have that in your vi before the rest of the code executes and key focus should start working.
Steven Dusing
CLA, CTA
0 Kudos
Message 10 of 10
(1,565 Views)