Send key presses to MPU from PLC code

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Send key presses to MPU from PLC code

Post by ashesman »

I think I know the answer is no, but is it possible to send any key press from PLC logic to MPU11?

I know MPU sends key presses to PLC logic. There is the Aux1-12 functions that can be triggered by the PLC to do a few different actions, but none that are sending a key press. Then there are the SV_PLC_FUNCTION_x variablees but again, only a limited set of pre-configured functions.

I have done most of my PLC control functionality now but are stuck on this one. I have an F8 key on my jog panel as I want to switch to/from the plot screen, but not sure how to make it work. I also have a Set X0, Set Y0, Set Z0 keys to sort out to but I see they can be done through the aux functions.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Send key presses to MPU from PLC code

Post by cncsnw »

Do you mean MPU11 (the control firmware running on your Oak or Allin1DC unit), or do you mean CNC12 (the user interface software running under Windows on your PC)?

Since you are asking about the F8 key to call up the Graph display, I assume you want to send key events to Windows and/or CNC12.

There is currently no mechanism to do that.
tblough
Posts: 3071
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Send key presses to MPU from PLC code

Post by tblough »

You would need a keyboard emulator that takes an external switch closure and sends an F8 keyboard character to Windows.
Something like this: https://www.sorion-group.com/products/p ... xis-kbdem/
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Send key presses to MPU from PLC code

Post by ashesman »

cncsnw wrote: Mon Apr 26, 2021 12:07 pm Do you mean MPU11 (the control firmware running on your Oak or Allin1DC unit), or do you mean CNC12 (the user interface software running under Windows on your PC)?

Since you are asking about the F8 key to call up the Graph display, I assume you want to send key events to Windows and/or CNC12.

There is currently no mechanism to do that.
Yes, sorry I meant CNC12. It was getting late!!!
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Send key presses to MPU from PLC code

Post by ashesman »

tblough wrote: Mon Apr 26, 2021 1:19 pm You would need a keyboard emulator that takes an external switch closure and sends an F8 keyboard character to Windows.
Something like this: https://www.sorion-group.com/products/p ... xis-kbdem/
Yeah, something like that would work but probably not worth it for just an F8 key. Shame Centroid didn't tell me it couldn't be done when they printed it on the button panel for me but...

I could make a device like you mentioned in a few hours using a microcontroller dev kit. So if I decide I really need it going I will knock something up...
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Send key presses to MPU from PLC code

Post by ashesman »

So, I found a workaround for this...

Using the Centroid Skinning DLL, it is possible to create a service that watches the state of PLC memory bits. If it detects a change, then using Windows API calls it is trivial to trigger a key press on a running application. I tested sending of key presses to other applications, just need to do the code for the skinning DLL. Never enough time...
Post Reply