PanelViewKeyHasBeenPressed

gbradley

Lifetime Supporting Member
Join Date
Apr 2002
Location
Corona, Ca.
Posts
1,637
Is there a status indicator that you can assign to a tag that tells you that one of the Function keys has been pressed?
I don't care which key was pressed, I just want to know if a key has been pressed, including the up↑ down↓ left← and right→ keys.
2711-K6C5 PV600 >>>>1747-L532B 5/03 CPU 16 K Mem. OS301
This may not be possible?
Any key will wake it up from sleep mode, so maybe there is a global variable, kind of like the Screen Number Tag Status tag.
Thanks
 
If you want to capture the key press that wakes the screen, I don't think that's possible. Key and touches are ignored by the application when waking the screen. Also, I don't think you can capture the cursor and keypad values either.

The unused function keys can be assigned to momentary buttons writing to an unused PLC tag. Then monitor that tag for changes. If you create these buttons on the Global screen, then you can copy them to user screens as needed. Make them invisible by turning off the border and button color transparent.

Not easy, not clean, but it can work.
 
I was just resetting a timer if a key was pressed.
It occurred to me, that instead of looking for every individual case, there might be one global variable.


It bugs me when operators go off on a 10 or 15 minute break and leave the motor idling.
Now if they leave the motor running for more than two minutes, I shut it off. (well I don't, but the PLC does ;-))
Of course if they are doing a setup on it, I need to reset the timer. That's where the HMI key presses come in.
I had to look for changes in each individual bits.
It's all good and working the way that I want.
Thanks
 
I was just resetting a timer if a key was pressed.
It occurred to me, that instead of looking for every individual case, there might be one global variable.
Thanks

I´ve never done it, but what about if you use a counter and this is incremented everytime a key is pressed, use autoreset when counter overflow.
 
I was just resetting a timer if a key was pressed.
It occurred to me, that instead of looking for every individual case, there might be one global variable.


It bugs me when operators go off on a 10 or 15 minute break and leave the motor idling.
Now if they leave the motor running for more than two minutes, I shut it off. (well I don't, but the PLC does ;-))
Of course if they are doing a setup on it, I need to reset the timer. That's where the HMI key presses come in.
I had to look for changes in each individual bits.
It's all good and working the way that I want.
Thanks



If all your buttons are grouped together in contiguous words, you might be able to simplify it some by using a EQU, NEQ or MEQ instruction to see if any of up to sixteen buttons has been pressed with one instruction.

Paul
 
Back
Top Bottom