LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Key navigation changes mechanical action

Hi tst and Giridhar,

I agree with tst that the method of using Event structures is more elegant, simpler and would involve less programming than using query input devices.

In fact i tried a few tricks using events before suggesting this solution. 

But, the reason why i choose this 'query input devices' logic over a more preferred event structure is that, Giridhar's objective was to use the enter/return key as 'switch until released' and this is not achieved by using event structures.

Regards

Dev

 

 

Message 11 of 30
(2,406 Views)
Hiiii,Giridhar
 
           As you explain, whenever u r using the local variable, u r getting an error, but i dont think it should happen, coz i ve done so successfully, and i also hav defined it globally, which is also running, so can u post me, how u r getting the error, so if possible i can clarify it!!!!!!!!!!!!!
0 Kudos
Message 12 of 30
(2,526 Views)
Hi Giridhar,
 
Check the attachment. The key is "F2".
 
Surender
Message 13 of 30
(2,399 Views)

Thanks Mr.Devchander, Mr.Tst and Mr.Surrender for your examples. It really helped.

Mr.Surrender, nice to get a view from you. Howz your motion control project going on?

Regards,

Giridhar Rajan

Automation Engineer

Cruiser Controls

Mumbai, India

0 Kudos
Message 14 of 30
(2,387 Views)

@devchander wrote:

But, the reason why i choose this 'query input devices' logic over a more preferred event structure is that, Giridhar's objective was to use the enter/return key as 'switch until released' and this is not achieved by using event structures.


Actually, the way I understand it is that the desired result is to immediately have the button go back to false (which would happen under SUR if you immediately release the button). You could also probably accomplish the real SUR action using the Key Up event, although, as I said, your solution works even when the VI doesn't have focus, which may be needed in some cases.

___________________
Try to take over the world!
Message 15 of 30
(2,383 Views)

Hi Mr.Giridhar,

Glad to have been of help.

Regards

Dev

 

 

 

0 Kudos
Message 16 of 30
(2,395 Views)

Hi,

Although my problem is  solved, I  want  to  know if  this problem  of   changing  mechanical action  due to  key  navigation  be  reported  as   a  bug. If yes, then  how  to do it?

Regards,

Giridhar Rajan

Automation Engineer

Cruiser  Controls

Mumbai,  India

0 Kudos
Message 17 of 30
(2,353 Views)
I'm not sure this is a bug - a keyboard and a mouse are different input devices and should not necessarily be compared. That said, I can't see any good reason for this not to work the same way as a mouse.

___________________
Try to take over the world!
Message 18 of 30
(2,349 Views)

Yes Giridhar, even i would second tst's comment on this question.

 

0 Kudos
Message 19 of 30
(2,339 Views)

Hiiii, Dev

         Is there any other options rather than this to create the event structure, coz i am using to much heavy files and it can't load anymore actions, coz it is already been hanged during the process.... is there any method to create a local type of variable instead of this???

Thanks,

Nishant

0 Kudos
Message 20 of 30
(2,281 Views)