Hello Guest it is October 16, 2019, 06:46:00 PM

Author Topic: Control Panel Setup  (Read 4424 times)

0 Members and 1 Guest are viewing this topic.

Control Panel Setup
« on: November 11, 2015, 08:17:00 PM »
Good Evening, I would like to setup my control panel to have a series of buttons to control functions like cycle start, feedhold, X zero, Y zero, etc.. I would also like to add an encoder to move the Different Axis. I would like to do this without purchasing anymore hardware than I already have. I have a cnc4pc C32 Multifunction board, Ethernet Smoothstepper. How would I go about implementing these features with this setup.

Could I just take a button and connect one end to an input on my BOB and the other end to a grouns on the BOB then tell mach what pin is being used and what to trigger when it is pressed? Or do I need to have some more electronics installed between the button and mach? I see a lot of stuff regarding MODI/O, Brains, POKEYS, etc.. Do I need these or can it be done in a much simpler way?
Re: Control Panel Setup
« Reply #1 on: November 12, 2015, 02:07:59 AM »
If you want an encoder wheel.... You will need to buy an encoder wheel... That will then need to be wired to two inputs

You will then need buttons for the other inputs to get them to trigger....

You will then need to write either a brain or a macropump which will monitor those inputs and trigger the functions you want

....

Can I make a suggestion..... Consider buying a USB contour Shuttle Pro v2. .... And then just programme all 15 buttons and the two jog wheels with what you want....

It would be much easier to do ... And you would have it all working in about half an hour

Another option is to buy an encoder (as stated above) and then buy teensy and set it up as a keyboard emulation device with a load of buttons... And programme each button with a keyboard function as what you are trying to do I think most of them have keyboard shortcuts.

You could also buy a vistacnc pendant too...

All of these options are machmach 3 and 4 compatible now.

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Control Panel Setup
« Reply #2 on: November 12, 2015, 04:54:28 AM »
you can make a encoder using a teensy they have a special library for it and keyboard and mouse emulation as well, or just get a pokeys board they are made for that sort of thing it would make life easier,
there are a tonne of ways to do what you want.
the easiest is with a modbus type system, PLC, pokeys or even easier a pendant, if you want to future proof your setup a  contour Shuttle Pro v, vistacnc, xbox360 joystick or number pad are working pendants with M3 and M4 at this time and the pokeys pendant with a pokeys board is the same in M3 or M4
it down to your budget
Re: Control Panel Setup
« Reply #3 on: November 12, 2015, 07:56:39 AM »
Thank you for the replies. I am trying to get this done without purchasing more boards, I already have a myriad of buttons and encoders from my Arduino (Uno) stuff, plus The wife gets a little antsy when I spend more money. Plus I already have all these inputs and outputs that I'm not using on my current boards. I was just thinking if it's not to bad I could make it happen. The DB25 port on the C32 already has pins 2_2 - 2_9 setup as input and the C32 also has other pins that are setup as output. Here is my thought and please correct me if I'm wrong. I could take a button and wire it to the proper pin on the C32 DB25 port. Then configure an input in Mach Input config page. at this point is where my knowledge is really limited. Would I then create a brain to tell Mach what to do with the input or would I set an oem trigger to handle the input from the button.

Question1: Can I just run a wire from one side of a button to pin on DB 25 and then run another to ground on the DB 25 or do I have to wire in some other power as well? I'm assuming I would need to be supplied power as it would need to be 0V state until pressed then it will go to 5V state. once at 5V then the button will trigger a Mach 3 event.

Question2: What steps need to happen after Question1 is complete. I think I would create a Brain to handle what happens after 5V is sent to the Pin, but I'm not sure. I see a lot of stuff regarding MOD I/O, POKeys, and various other terms which are muddling my ability to decipher how to implement this.

I currently have the system working with an Xbox 360 remote, But m final machine build will have a Control Panel similar to a Haas, so I can eliminate the need to have a Keyboard and Mouse.
« Last Edit: November 12, 2015, 08:00:03 AM by native34 »
Re: Control Panel Setup
« Reply #4 on: November 12, 2015, 10:00:27 AM »
You can do it with purely the buttons and an encoder.

I will have a look at your bob but how have you wired your limit switches in?

I will have a look at a macropump / brains for you later...

Do you have an itemised list of what commands or macros or functions you wish to run?

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Control Panel Setup
« Reply #5 on: November 12, 2015, 12:43:22 PM »
Rob,
I have a CNC4PC C32 Multifunction Board. I currently don't have limit switches. I'm in the process of installing them. I would like the following commands to be run with hard switches and encoder:
I would like to add more later but these are the ones I want to start off with.

Cycle Start
Feedhold
Stop
Rewind
Reset

Encoder to move X,Y,Z
Buttons to Select X,Y,Z for movement with Encoder
Buttons for Zeroing X,Y,Z
Re: Control Panel Setup
« Reply #6 on: November 12, 2015, 02:33:26 PM »
The last one is that 3 buttons... Or one button?

All of the rest is easy enough
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Control Panel Setup
« Reply #7 on: November 12, 2015, 04:26:33 PM »
it would be individual buttons for Selecting and zeroing X,Y,Z
Re: Control Panel Setup
« Reply #8 on: November 13, 2015, 04:58:41 PM »
....hmm....

Think you need to explain what you mean by "zeroing X,Y & Z".

I know this may seem obvious to you but are you asking the machine to zero the DRO's for each axis

Or are you asking the machine to home and zero each axis?

......................................

Attached is a "brain" that will do all the button presses you asked for.   You will need to copy and paste it to your brains folder, and you will need to enable the brain via the "brain control..." under "Operator" .... you also need to click "reload all brains to get them to start working or restart mach3  (every time you do a change to the pins and ports etc configuration ... with the smooth stepper you really should restart Mach 3 so that the FPGA on the smooth stepper is reloaded with the pins settings and code)....

I'd also suggest you viewing the brain to make sure it's what you are after...

The best way to edit a brain is to go to the operator tab.... click on "Brain Editor..." and when it asks for a name, click cancel, and then once the brain editor loads... click open and open and edit the brain you want to edit.

You will also need to define your OEM Trigger Inputs (on the Ports & Pins / Inputs Tab) as follows:
Cycle Start --- OEM Trig #1
Feedhold --- OEM Trig #2
Stop --- OEM Trig #3
Rewind --- OEM Trig #4
Reset --- OEM Trig #5

Encoder to move X,Y,Z  --- you will need to install an encoder on MPG#1 (and ref your pins on the ports & Pins / MPG tab).

Buttons to Select X (for encoder) --- OEM Trig #6
Buttons to Select Y (for encoder) --- OEM Trig #7
Buttons to Select Z (for encoder) --- OEM Trig #8

Buttons for Zeroing X --- OEM Trig #9
Buttons for Zeroing Y --- OEM Trig #10
Buttons for Zeroing Z --- OEM Trig #11

One little caveat.... you may need to invert the signals..... basically this is done in the brain by editing it.... where you see the box that says "No Operation signal pass", click on it twice and a box will open one of the options is "invert" this will flip the signal... sometimes bob's invert the signal.... and also it depends if you are using "make" (NO / normally open) or "break" (NC / Normally Closed) switches / buttons.

You may wish to consider something like these (they are all from china so available on various ebay around the world sites):
http://www.ebay.co.uk/itm/12V-OFF-ON-Momentary-Push-Button-Horn-Switch-Car-Light-Dashboard-Boat-SPST-/361345440863?var=&hash=item5421dddc5f:m:mihtRXVIAMpThMNLLOw0XwQ
or dealextreme or aliepress etc etc.... just to give you some ideas of a functional button.

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”
Re: Control Panel Setup
« Reply #9 on: November 14, 2015, 05:27:02 PM »
There will be three buttons. One for x, one for y, one for z. When you press the button, it will zero the axis for the respective button pressed. For the encoder. There will be one encoder that will control movement for each axis depending on which axis is selected.