control panel with arduino uno r3

This Section is for users to discuss hardware

control panel with arduino uno r3

Postby alfre » Thu Jun 28, 2018 4:43 pm

Hi to all, as the title I'm trying to make an external console with the remote buttons start, stop, hold, etc. .. but I can not operate anything. I state that I have very little experience with arduino .... I connected uccnc and arduino one through modbus as slave.rtu, I set in connection 4 function setting: read coils, read holding registers, read input registers and read inputs: software and board communicate good. The problem is that I can not operate any command and I do not know how to do it ... Through the IDE of arduino I set pin 12 as output and with an electric cable I create bridge with the ground as if it were a button. On the variable table of the modbus plugin of Uccnc imposed for example the number 524 that corresponds to the FeedHoldOff, but when I press nothing happens. In what am I wrong? I thank anyone who will help me.
alfre
 
Posts: 33
Joined: Thu Dec 15, 2016 11:33 am
Location: Italy

Re: control panel with arduino uno r3

Postby dezsoe » Thu Jun 28, 2018 6:37 pm

I hope you just mistyped that you set pin 12 to output, because that can damage your Arduino. You need inputs for buttons. I recommend to set them INPUT_PULLUP, so you won't need a pullup resistor.

If you use Modbus for the communication then first watch the Modbus array table in UCCNC to see if your button state arrived. If it works, then you have to write a macroloop or a plugin for UCCNC which reads the Modbus array and on state changes does what you want it to do, e.g. press a button on screen with Callbutton function.

IMHO, making a remote controller with Modbus is too complicated and - because of the Modbus speed and the macroloop/plugin delay of processing - really not responsive. I made some tests in the past with this method and I didn't like the results. I switched to an Ethernet remote controller (also with Arduino, but without Modbus), but it will take some time to finish. (I'm planning to publish it and I'll make a test also with wifi.)
dezsoe
 
Posts: 573
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: control panel with arduino uno r3

Postby Robertspark » Thu Jun 28, 2018 8:03 pm

Why not use the usb keyboard emulation of the Arduino 32u4 boards

https://www.arduino.cc/reference/en/lan ... /keyboard/

You can get boards which are small and rectangular
https://www.google.co.uk/search?q=32u4+ ... 60&bih=560
And can be very easily adapted for keyboard emulation.

If you are new to CNC, uccnc, modbus and Arduino you are starting out on a long path via a modbus pendant.

A tip..... These days i use visuino for mcu / Arduino type programming.... Very fast syntax error free coding
https://www.visuino.com

A lot of YouTube clips now
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1009
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: control panel with arduino uno r3

Postby alfre » Thu Jun 28, 2018 8:58 pm

@dezsoe: I was wrong. I setup pin 12 such as input ... thanks to the suggestion regarding the transmission speed ;) ;) :D
@robertspark: is 32u4 arduino board similar to pokeys57u ? this board is very simple to configure, but it's only for mach3/4.... :roll: :?

I thank you for the support :D :D
alfre
 
Posts: 33
Joined: Thu Dec 15, 2016 11:33 am
Location: Italy

Re: control panel with arduino uno r3

Postby Robertspark » Thu Jun 28, 2018 9:12 pm

It is similar to the pokeys.

The pokeys is not just for mach3/4 but can also do keyboard emulation. You just programme what input when toggled emulates what keyboard key.

The pokeys can also be a mach3/4 motion controller.... That is a different application
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1009
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests