I would really like a dial and not a keypad. I got the shuttle to work but lost the configuration due to a computer change... it worked ok. Someday I may go back it and re-program it.
i made one for the shuttlexpress, the z jog is hella slow for some reason i haven't quite figured out, config for it https://www.dropbox.com/s/tr3cqu2xnl...cut4.pref?dl=0 i've got jog on the buttons though, so you might want to remap
i pulled out most of the windows messaging on how to do the jogs, but its a sloppily coded application so i've been very cautious about approaching it from that. redoing the piehid might be the way to go.
PostMessage hwnd - main flash cut window, msg id 0x513, wparam 0-255 , lparam 0 to start (press), 1 to end (let go)
don't use SendMessage coz flashcut doesn't sanitise its message que and it'll just crash .
there are more around 0x513,0x514, not inclusive to 0x55c
for wparam
this should be all of them to mimic the pendant, there are others beyond this.
just did a quick look for a few, these will switch to the right screen so if you're in gcode and press jog it switches to jog screen.enum {
X_MINUS = 2,
X_PLUS = 3,
Y_MINUS = 5,
Y_PLUS = 1,
Z_MINUS = 0,
Z_PLUS = 4,
A_MINUS = 6,
A_PLUS = 7,
JOG_FAST = 8,
JOG_MEDIUM = 9,
JOG_SLOW = 10,
JOG_CONTINUOUS = 11,
JOG_1 = 12,
JOG_01 = 13,
JOG_001 = 14,
JOG_STEP = 15,
SWITCH_LAYER = 16, // switch layer
CONTROL_PANEL_JOG = 17, // related to jog screen
HOME_SEEK = 18, // home (seek)
FEED_HOLD = 19,
CONTROL_PANEL_GCODE = 20,
PROGRAMOVERRIDE_PLUS = 21,
PROGRAMOVERRIDE_MINUS = 22,
GCODE_START = 23,
GCODE_SWITCH_STEP_CONTINUOUS = 24,
GCODE_RESET = 25,
POINT_PROGRAM_ZERO = 26,
POINT_MOVE = 27,
// keyboard one is trickier since in the test app the focus isn't on flashcut.
// needs to find if theres a popup child one/top z as well as the main window.
KEYBOARD_TAB = 28, // emit a tab, 0 on, 1 off
KEYBOARD_UP_ARROW = 29, // emit up arrow, 0 on, 1 off
KEYBOARD_DOWN_ARROW = 30, // emit dowm arrow, 0 on, 1 off
KEYBOARD_ENTER = 31, // emit enter key, 0 on, 1 off
ZERO_PROGRAM_X = 32,
ZERO_PROGRAM_Y = 33,
ZERO_PROGRAM_Z = 34,
ZERO_PROGRAM_ALL = 35,
SWITCH_LAYER_2 = 36, // this one seemed to make it output cr/lf constantly?
OUTPUT_TOG_1 = 37,
SPINDLE_TOGGLE = 38, // aux panel must be enabled
FEED_HOLD_2 = 39, // second layer feed hold
// 40..233 unknown, so no visual response
// these seem like some sort of internal thing.
//233 switch to jog
//235 switch to jog
//237 switch to gcode
//249 switch to point
//251 switch to gcode
//253 switch to jog
//255 switch to point
};
i've got an stm32 running as a USB hid device connected to the pc with the right vid/pid so it sees flashcut pendant, but i'm just using test code to send the messages while i figure them out.
test app works ok, i haven't added the logic to support popup child windows for the keyboard emulator. just have to search for the topmost z/popup child window and set focus to that instead of the main window.
when i convert it to run on the usb hid device the focus won't matter, i'm bypassing the hid part here and just passing the messages directly, instead of the translation.
now i can actually add an encoder wheel, still wont be a proper encoder just a left/stop/right direction but its something, and using these messages you don't have to do all that crazy press this key, move down twice press enter to select the step sizes in jog mode. just one command. not sure if the shuttlexpress/pro can simulate postmessage, might need an inbetween app like AHK
I'm am now wondering if there is a way to use Mach4 as the software for the Flashcut controller. To me it sounds like the big issue would be identifying the pin outs and sync the signal.
Using a Flashcut CNC Box in Mach 3
its fairly trivial to convert a flash cut box to mach3, or most any other step/dir based system. open the flashcut box remove the circuit board or the wires going to the advanced motion stepper drivers., wire drivers into a new controller board. they're all marked with step/dir etc.
then run the wires for the i/o to the i/o of the new board. and you're done.
it is literally a nice controller board with a off the shelf drivers in a box.
mach4 wants the backlash compensation in the controller board, mach3 has it built in.
Hey Charliex, super helpful info about the flashcut pendant, in creating your program, do you know what keystrokes the xkeys was actually sending per button?
Thanks!
Doesn't really send keypresses as such, there is an intermediate DLL from PI that collects the input from the pendant and then it sends them to flashcut with the above windows messages.
you have to replace the dll in the flashcut dir to pretend to be the flashcut pendant, since it queries the device for a number that has to match, or just send the windows messages directly.