Through "Keyboard Usage", I am using an "F" key with the "tap TRUE" action to set a variable and reset when the "F" key is released. I am having an issue with the variable remaining TRUE after releasing the "F" key. The code has been reduced from the original application to isolate the problem.
Right now, I have a POU of ST with some simple IF/THEN statements. I have configured two (2) Visualization objects with a circle on each screen that changes color when a variable is set TRUE. The F1 key is configured to set the variable using "tap TRUE" action. Sometimes the variable remains TRUE after the F1 key is released. Pressing the F1 key again resets the variable and normal operation of the "tap TRUE" action resumes.
If I change to the other screen and repeat, I see the variable again remain TRUE. It seems to happen mostly when I change from screen to screen and on the inial press of the F1 key.
I have also created a button element on each screen that has the same function as the F1 key, only using the "Tap variable" checkbox under the "Input" catagory of the element. The button element works fine everytime. It seems to be only the "F" keys that have this issue.
Anyone see anything similar to this behaviour?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you mean tab not tap as it is defined in the keyboard usage? You would have to post the code it seems to work fine here with other keys. You refer to F1 and F, which are you using? F1 on my box seems to always open CoDeSys help and performs the action, but takes focus away regardless of how I have the keyboard usage configured. Are you sure the visualization window has focus when you perform this test? If there is no focus on the window then it will not receive the keyboard input. Maybe the reason the button works is because when you go to click the button you are setting focus to that window. To make the visualization have focus just click on the visu window bar or click in the window first before pressing the key. Have you tried changing the key that is mapped? It seems when F or F1 didn't work you used a button. Also to make sure there is a seperate key mapping for each visualization depending on which has focus. So if you have multiple visu than you have multiple key mapping.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Through "Keyboard Usage", I am using an "F" key with the "tap TRUE" action to set a variable and reset when the "F" key is released. I am having an issue with the variable remaining TRUE after releasing the "F" key. The code has been reduced from the original application to isolate the problem.
Right now, I have a POU of ST with some simple IF/THEN statements. I have configured two (2) Visualization objects with a circle on each screen that changes color when a variable is set TRUE. The F1 key is configured to set the variable using "tap TRUE" action. Sometimes the variable remains TRUE after the F1 key is released. Pressing the F1 key again resets the variable and normal operation of the "tap TRUE" action resumes.
If I change to the other screen and repeat, I see the variable again remain TRUE. It seems to happen mostly when I change from screen to screen and on the inial press of the F1 key.
I have also created a button element on each screen that has the same function as the F1 key, only using the "Tap variable" checkbox under the "Input" catagory of the element. The button element works fine everytime. It seems to be only the "F" keys that have this issue.
Anyone see anything similar to this behaviour?
codes for F keys are not one byte but two bytes.
I think you mean tab not tap as it is defined in the keyboard usage? You would have to post the code it seems to work fine here with other keys. You refer to F1 and F, which are you using? F1 on my box seems to always open CoDeSys help and performs the action, but takes focus away regardless of how I have the keyboard usage configured. Are you sure the visualization window has focus when you perform this test? If there is no focus on the window then it will not receive the keyboard input. Maybe the reason the button works is because when you go to click the button you are setting focus to that window. To make the visualization have focus just click on the visu window bar or click in the window first before pressing the key. Have you tried changing the key that is mapped? It seems when F or F1 didn't work you used a button. Also to make sure there is a seperate key mapping for each visualization depending on which has focus. So if you have multiple visu than you have multiple key mapping.
Hi friend,
I cant see 'Tap variable' checkbox option. Only i can see Toggle variable,Execute Command,Write Variable..... help please!
a greeting!