rotary switch + encoder as feed rate / incremental jog control using 4 inputs

More
19 Nov 2023 14:00 #285896 by Mud
I have a 4 position rotary switch and a 100ppR encoder - is it possible to have the rotary switch go between use of the encoder for feed rate selection and x / y / z incremental jog inputs? I have found examples for each use in isolation, but wanted to check the mode selection is viable before designing/wiring up my control panel. 

This is going into a 7i96s, and I intended to use (my last) 4 inputs:
IN0: encoder A
IN1: encoder B
IN2: selection bit 0
IN3: selection bit 1

I intend to wire the rotary switch to provide the 2 bit state (and use a LUT5?) to select between the feed / jog modes. I do have the encoder input spare on the 7i96s, but I intend to use this for the spindle later. 

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 14:16 #285897 by andypugh
Yes, there will definitely be a way.

Without looking in detail, I think that you can use the  demux  HAL component to decode the 2 bits into 4 separate jog-enable pins (well, one will be spindle override enable) 

halui.spindle.N.override.count-enable bit in (default: TRUE)When TRUE, modify spindle override when counts changes.halui.spindle.N.override.counts s32 incounts X scale = spindle override percentage

 axis.L.jog-counts IN S32Connect to the "counts" pin of an external encoder to use a physical jog wheel.axis.L.jog-enable IN BITWhen TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored.

 joint.N.jog-counts IN S32Connect to the "counts" pin of an external encoder to use a physical jog wheel.joint.N.jog-enable IN BITWhen TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored.
The following user(s) said Thank You: Mud

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 14:42 #285899 by Mud
Thanks - it's feed rate override and not spindle that I want, but I'm assuming it will be similar.

Can't live without feed hold and feed rate override!

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 15:18 #285905 by PCW
Note that you must use a pair of the first 8 I/O pins (in 0..7) on the 7I96S
to use the hardware MPG encoders:

IO Connections for TB3 -> 7I96_0
Pin#                  I/O   Pri. func    Sec. func        Chan     Sec. Pin func   Sec. Pin Dir

TB3-1                   0   IOPort       InM              0        Input0_EncA0    (In)
TB3-2                   1   IOPort       InM              0        Input1_EncB0    (In)
TB3-3                   2   IOPort       InM              0        Input2_EncA1    (In)
TB3-4                   3   IOPort       InM              0        Input3_EncB1    (In)
TB3-5                   4   IOPort       InM              0        Input4_EncA2    (In)
TB3-6                   5   IOPort       InM              0        Input5_EncB2    (In)
TB3-7                   6   IOPort       InM              0        Input6_EncA3    (In)
TB3-8                   7   IOPort       InM              0        Input7_EncB3    (In)
TB3-9                   8   IOPort       InM              0        Input8          (In)
TB3-10                  9   IOPort       InM              0        Input9          (In)
TB3-11                 10   IOPort       InM              0        Input10         (In)
TB3-13,14              11   IOPort       SSR              0        Out-00          (Out)
TB3-15,16              12   IOPort       SSR              0        Out-01          (Out)
TB3-17,18              13   IOPort       SSR              0        Out-02          (Out)
TB3-19,20              14   IOPort       SSR              0        Out-03          (Out)
TB3-21,22              15   IOPort       OutM             0        Output4         (Out)
TB3-23,24              16   IOPort       OutM             0        Output5         (Out)

 
The following user(s) said Thank You: Mud

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 15:25 #285907 by spumco
The following user(s) said Thank You: Mud

Please Log in or Create an account to join the conversation.

More
19 Nov 2023 16:15 #285913 by Mud
Do you mean hardware encoders on the 7i96s itself? Would it not work on input 9+10 at all?

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum