Giter Club home page Giter Club logo

plugin_keypad's People

Contributors

terjeio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plugin_keypad's Issues

State of the AUX ports in realtime report?

Is there a way for a pendant to find out which aux ports are active? I know how to switch them on / off via e.g. M64P1 / M65P1, and GrblHAL responds with 'ok', but I can't see a report whether they are turned on or off. If there isn't a report available yet, would it make sense to add this to the A: accessory data field, e.g. with '0' (AUX0 active), '1' (AUX1 active) etc?

Home doesn't work with $22=5

It seems that if you enable "homing on startup required" (bit 2 of $22), you can't home by sending the H-char over the serial channel to the keypad-plugin.

This is a problem for our use-case where we:

  • must home before doing anything else, because we don't have limit switches on all sides (and is desirable anyway)
  • Don't have a streaming g-code sender; we only use http upload to upload a file to SD and use keypad to start the job with a macro containing $F=file

Compilation error

Hello. If you activate the display, an error occurs during compilation:

Arduino: 1.8.19 (Windows 10), Плата:"Teensy 4.1, Serial, 600 MHz, Faster, US English"
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c: In function 'send_status_info':
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c:124:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((overrides_t *)status_packet.msg)->spindle_rpm = spindle->param->override_pct;
^
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c: In function 'set_state':
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c:142:38: warning: implicit declaration of function 'state_get_substate' [-Wimplicit-function-declaration]
status_packet.machine_substate = state_get_substate();
^
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c: In function 'add_reports':
D:\Arduino\libraries\grblHAL_Teensy4\src\keypad\display\i2c_interface.c:359:39: error: too few arguments to function 'spindle->get_state'
status_packet.spindle_state = spindle->get_state();
^
exit status 1

This error has never occurred before.

Problem with plugins KEYPAD and DISPLAY

Hello.
; grblHAL
; 1.1f.20230926
; [OPT:VNMSL,35,1024,3,0]
; [NEWOPT:ENUMS,RT+,ES,REBOOT,SED,RTC,ETH,ODO]
; [FIRMWARE:grblHAL]
; [NVS STORAGE:*FRAM 8K]
; [FREE MEMORY:492K]
; [DRIVER:iMXRT1062]
; [DRIVER VERSION:230926]
; [DRIVER OPTIONS:USB.2]
; [BOARD:GRBLHAL2000 - PRINTNC]
; [AUX IO:4,3,0,0]
; [IP:192.168.0.201]
; [NETCON:Telnet]
; [PLUGIN:MODBUS v0.15]
; [PLUGIN:MODVFD v0.03]
; [PLUGIN:KEYPAD v1.34]
; [SPINDLE:PWM]
; [PLUGIN:I2C Display v0.06]
; [PLUGIN:ODOMETERS v0.04]

There were problems activating the keypad and display plugins.
I use a keypad https://github.com/Expatria-Technologies/RT_Jog_Controller.
If you first connect power to the keypad and then apply power to the GRBL controller, then there are no problems with the operation of the keypad and the GRBL controller - everything works fine.
The screenshots show information from the i2c bus at the moment of switching on. You can see how the GRBL controller accesses the keypad and then the eeprom.

049+ACK
049+ACK+EEPROM

But if you connect the power to the keypad from the GRBL controller, i.e. power is supplied simultaneously. Or the keypad is not connected to the GRBL controller at all, then the GRBL controller does not work properly.
The screenshots show that the GRBL controller is trying to communicate with the keypad, but does not receive a response from it, after which the GRBL controller does not try to contact the EEPROM. There is no further communication on the i2c bus. If you send the $$ command, a list of parameters is displayed with default values, not the values ​​saved in eeprom.
049+NAK
049+NAK-EEPROM

Is there a way for me to switch between USB and MPG UART without having to reflash the microcontroller (STM32F407)?

          > > Now here's my problem - is there a way for me to switch between USB and MPG UART without having to reflash the microcontroller (STM32F407)? Or can I switch between the USB serial and the dedicated UART serial?

See the Wiki here.

I tried different configurations of the firmware by changing the values of KEYPAD_ENABLE and MPG_ENABLE while trying to keep the USB as the main serial communication method, but I found out that if MPG_ENABLE is not defined and KEYPAD_ENABLE is - the USB works and the app on my computer (LaserGRBL) can connect to my microcontroller, but if MPG_ENABLE is defined, a connection through USB cannot be made with a PC. Why is that? Is it even possible to have a a machine, which receives g-code from USB, but can also be manually controlled with jogging commands from a "pendant"/control panel, without changing the code of the firmware? Can this problem be solved if MPG_ENABLE is not defined and only KEYPAD_ENABLE is and the jogging commands can be sent to the dedicated keypad plugin UART/I2C peripheral?

Originally posted by @AvatarBg111 in #3 (comment)

Some compile errors here

I have downloaded this Plugin_keypad repo and put its files in the src/keypad folder of the grblHAL_Teensy4 folder. And turned on the keypad plugin in my_machine.h, option 1: I2C. Upon attempting compiling in VScode (Windows 10), I get the following warnings and errors. Any advice on how to fix?

Compiling .pio\build\teensy41\src\networking\TCPStream.c.o
src\keypad\keypad.c:77:14: error: unknown type name 'setting_descr_t'
 static const setting_descr_t keypad_settings_descr[] = {
              ^
src\keypad\keypad.c:78:5: warning: braces around scalar initializer
     { Setting_JogStepSpeed, "Step jogging speed in millimeters per minute." },
     ^
src\keypad\keypad.c:78:5: note: (near initialization for 'keypad_settings_descr[0]')
src\keypad\keypad.c:78:29: warning: excess elements in scalar initializer
     { Setting_JogStepSpeed, "Step jogging speed in millimeters per minute." },
                             ^
src\keypad\keypad.c:78:29: note: (near initialization for 'keypad_settings_descr[0]')
src\keypad\keypad.c:79:5: warning: braces around scalar initializer
     { Setting_JogSlowSpeed, "Slow jogging speed in millimeters per minute." },
     ^
src\keypad\keypad.c:79:5: note: (near initialization for 'keypad_settings_descr[1]')
src\keypad\keypad.c:79:29: warning: excess elements in scalar initializer
     { Setting_JogSlowSpeed, "Slow jogging speed in millimeters per minute." },
                             ^
src\keypad\keypad.c:79:29: note: (near initialization for 'keypad_settings_descr[1]')
src\keypad\keypad.c:80:5: warning: braces around scalar initializer
     { Setting_JogFastSpeed, "Fast jogging speed in millimeters per minute." },
     ^
src\keypad\keypad.c:80:5: note: (near initialization for 'keypad_settings_descr[2]')
src\keypad\keypad.c:80:29: warning: excess elements in scalar initializer
     { Setting_JogFastSpeed, "Fast jogging speed in millimeters per minute." },
                             ^
src\keypad\keypad.c:80:29: note: (near initialization for 'keypad_settings_descr[2]')
src\keypad\keypad.c:81:5: warning: braces around scalar initializer
     { Setting_JogStepDistance, "Jog distance for single step jogging." },
     ^
src\keypad\keypad.c:81:5: note: (near initialization for 'keypad_settings_descr[3]')
src\keypad\keypad.c:81:32: warning: excess elements in scalar initializer
     { Setting_JogStepDistance, "Jog distance for single step jogging." },
                                ^
src\keypad\keypad.c:81:32: note: (near initialization for 'keypad_settings_descr[3]')
src\keypad\keypad.c:82:5: warning: braces around scalar initializer
     { Setting_JogSlowDistance, "Jog distance before automatic stop." },
     ^
src\keypad\keypad.c:82:5: note: (near initialization for 'keypad_settings_descr[4]')
src\keypad\keypad.c:82:32: warning: excess elements in scalar initializer
     { Setting_JogSlowDistance, "Jog distance before automatic stop." },
                                ^
src\keypad\keypad.c:82:32: note: (near initialization for 'keypad_settings_descr[4]')
src\keypad\keypad.c:83:5: warning: braces around scalar initializer
     { Setting_JogFastDistance, "Jog distance before automatic stop." }
     ^
src\keypad\keypad.c:83:5: note: (near initialization for 'keypad_settings_descr[5]')
src\keypad\keypad.c:83:32: warning: excess elements in scalar initializer
     { Setting_JogFastDistance, "Jog distance before automatic stop." }
                                ^
src\keypad\keypad.c:83:32: note: (near initialization for 'keypad_settings_descr[5]')
src\keypad\keypad.c:115:5: error: unknown field 'descriptions' specified in initializer
     .descriptions = keypad_settings_descr,
     ^
src\keypad\keypad.c:115:21: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .descriptions = keypad_settings_descr,
                     ^
src\keypad\keypad.c:115:21: note: (near initialization for 'setting_details.settings')
src\keypad\keypad.c:116:5: error: unknown field 'n_descriptions' specified in initializer
     .n_descriptions = sizeof(keypad_settings_descr) / sizeof(setting_descr_t),
     ^
src\keypad\keypad.c:116:62: error: 'setting_descr_t' undeclared here (not in a function)
     .n_descriptions = sizeof(keypad_settings_descr) / sizeof(setting_descr_t),
                                                              ^
src\keypad\keypad.c: In function 'keypad_process_keypress':
src\keypad\keypad.c:181:21: error: 'grbl_t {aka struct <anonymous>}' has no member named 'enqueue_realtime_command'
                 grbl.enqueue_realtime_command(CMD_FEED_HOLD);
                     ^
compilation terminated due to -fmax-errors=5.
*** [.pio\build\teensy41\src\keypad\keypad.c.o] Error 1

MPG_MODE

I would like to use a manual pulse generator (encoder) with my keypad. Is there some documentation on how to use MPG_MODE? I have uncommented that in my_machine.h. What happens when I send 0x8B with a strobe pulse on the I2C line? Do all the other commands stop working? Is 0x8B a toggle? (enable and disable MPG alternately?)
What sorts of signals is the MPG expected to send? Are those sent via I2C or USB?
Is there a way to send a ? command to get status? Or even just the current coordinates to display on a DRO?

Problem enabling macros

I'm trying to enable macros but am puzzled by the following issue. I use picocnc board with rp2040 and use the web builder to create firmware. When I use "MACROS_ENABLE=3", the keypad (over serial) works, but $490 gives an error:53 (probably due to AUX input pin shortage). But when I use "MACROS_ENABLE=2" (the way I want to use it), the control-connection over USB stops working! I've looked at macros.c but can't find any explanation.

Help would be very welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.