Hello Guest it is April 26, 2024, 07:58:13 PM

Author Topic: Rotator switch for Jog increments  (Read 2028 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Rotator switch for Jog increments
« Reply #10 on: February 04, 2022, 01:15:26 AM »
to use the system hotkey's is an other way to do this, but you should only use one.
the macro version or the system hotkey version.

the rest looks ok for me, but i can nothing say about your input setting's it is depending on your
hardware connection. maybe they have to be low active, but it dont know.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Rotator switch for Jog increments
« Reply #11 on: February 04, 2022, 01:26:40 AM »
if i look to this manual:

https://www.cnc4pc.com/pub/media/productattachments/files/c10r11.3_user_manual_ver.2.pdf

there is one jumper to set pin 2-9 as inputs and if you use 5V for the inputs the jumper need's to
set to Pull down and then the inputs must be Low active.

but if you have used pin 2/3/4/5 for step/dir sinals you can not use 7/8/9 for inputs.
« Last Edit: February 04, 2022, 01:33:36 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Rotator switch for Jog increments
« Reply #12 on: February 14, 2022, 12:53:15 AM »
ok let's make an example

0,01 input is assigned to OEMTrigger(10)
0,10 input is assigned to OEMTrigger(11)
1,00 input is assigned to OEMTrigger(12)

and these three stepp are confgured in Config -> General Config -> Jog Increments

then you create in macros\your profile name a textfile named M300.M1S
then open this file with texteditor and put this code in:

Code: [Select]
SetTRiggerMacro(301)

now go to Config -> General Config -> Initialisazio String and enter M300  at the end of the existing.

then you create in macros\your profile name a textfile named M301.M1S
then open this file with texteditor and put this code in:

Code: [Select]
Sub Main()

  If IsActive (OEMTRIG10) Then
    dooembutton (191)
  End If

  If IsActive (OEMTRIG11) Then
    dooembutton (192)
  End If

  If IsActive (OEMTRIG12) Then
    dooembutton (193)
  End If

End Sub

save the file and restart Mach, and with a little bit of luck it will work.

If M300.M1s and M301.M1s is allready there chose any free number.

Okay got it working.

Mn300 corrected it with the port issues. I moved to inputs 12, 13, 15 with the pull down deal and it registers with your macro!

Thank you.

But one odd thing is. If I cycle forward from 1 to 2 to 3. It goes correctly. But cycling back from 3 to 2 to 1 it won't register 2?

It'll go to 0.1 when I get to 1 from 0.001 but not do anything When on 2 (0.01).

Not that it matters, if I cycle from 3 to 1 then to 2 it registers haha.

Thanks again,

Kyle