Hello Guest it is May 10, 2024, 05:23:32 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thosj

71
Mach4 General Discussion / Re: Windows 11?
« on: December 16, 2021, 08:24:27 AM »
I don't know about "officially" support, but mine works fine with Windows 11.

72
Mach4 General Discussion / Re: How to execute MDI?
« on: December 16, 2021, 08:20:45 AM »
This is the FIRST thing that gets us when switching from Mach3 to Mach4. No more hitting ENTER to execute MDI!!!

73
Mach4 General Discussion / Re: E-Stop when hitting enable 9First ime user)
« on: December 04, 2021, 08:17:26 AM »
Perhaps look on the diagnostics tab on startup and work your estop and see what the diagnostics page shows when you press or release?

74
Mach4 General Discussion / Re: Can i enter my own jog increment in Mach4?
« on: December 01, 2021, 06:29:10 PM »
I don't get it. If you just want to jog someplace, one time, just use MDI. Or am I missing something?

75
Have you ever said here which version of Mach4 you're running? Are you running Mach4 stone stock other than motion controller plugin and ports/pins for your setup or do you have a bunch of screen edits to customize? If pretty stock, even if NOT, you can rename C:/Mach4hobby to something like C/Mach4hobby_OLD and reinstall, then copy stuff in Screens, Plugins, Licenses, Profiles, Modules, over to the new install. But........if you or someone else has written some bad script in the screenset, they're going to come along!!

Again, if you go to the Offsets tab and click Tool Table and Fixture Table, there's nothing in there you don't expect?

76
If you touch off every tool, you change the G54 Z zero, right? NOT the tool length.

But.........it seems whatever you're doing in Mach3 SHOULD work in Mach4. So the problem seems to be tool lengths. Be sure there are all zero's in the tool lengths.

Is this what you do? Touch off tool 1, zero the Z DRO, run the program. Load tool 2, touch off the tool in the same place, zero the Z DRO, run the program. Is that it?

77
G54, and really ALL G54-G59, is the distance from machine coordinate zero to work position zero. So if you set G54 Z0 to some number, say your 4.3118, they MDI in G0 G54 Z0, the machine moves there. Clicking the Machine Coordinates button will alternately show 0 and 4.3118.

Homing in place I don't do and don't know how it really works. Having limit switches eliminates that, machine coordinate zero is always the same place.

The really odd thing here is one tool runs fine and the next "sometimes" does not. Are both roughing and finishing passes using the same tool?

Another thing, in a "normal" situation, with Z homing at the "top", all the way UP, and Z direction set right, G54 would be a negative value.

Tom

78
Should work, you only need one more for FRO/RRO. My two shown are one for speed, one for speed.

So however you got your speed to work, you should be able to get feed/rapid working the same way with the correct calls.

79
In a word, YES. There are probably several ways to do it.

Here's what I do. I have a PoKeys 57E which has two pins for analog inputs. Hooked up analog pots to those.

Wrote a file which is run from the PLC script.

This is what's in the file:

--Function to read value from analog register
function ReadRegister(device, analogPin)
    local inst = mc.mcGetInstance()
    local hreg = mc.mcRegGetHandle(inst, string.format("%s/Analog input %s", device, analogPin))
    return mc.mcRegGetValueString(hreg)
end

--Function to set FRO value
function SetFRO(analog)
    local percent = analog/1*250 --calculate percentage from 0% to 250%
    local inst = mc.mcGetInstance()
    mc.mcCntlSetFRO(inst, percent)
    mc.mcCntlSetRRO(inst, percent) --sets RRO 0% to 250% to follow FRO
end

--Main
local device = "PoKeys_24802" --Change this to the name of your PoKeys device
local analogPin = "45" --Analog input pin number

analogVal = ReadRegister(device, analogPin) --Save analog register value in variable
SetFRO(analogVal) -- Set FRO value in %



Here's what's at the end of my PLC script from the screen editor, it runs both an FRO/RRO and SRO script to do feed and speed with pots.

        -------------------------------------------------
        --My Stuff!!
        -------------------------------------------------
        --Runs the PoKeys FRO and SRO lua files as shown!
        --PoKeys Pin 44 is SRO
        --PoKeys Pin 45 is FRO
       
        dofile("C:\\Mach4Hobby\\Profiles\\ESS_New\\PoKeys_analog_FRO.lua")
        dofile("C:\\Mach4Hobby\\Profiles\\ESS_New\\PoKeys_analog_SRO.lua")
       
        --------------------------------------------------
        -------------------------------------------------------

Hopefully you can glean something here and come up with your own way.

Tom

80
Mach4 General Discussion / Re: Setting zero positions for G30
« on: November 17, 2021, 08:43:02 AM »
Wah, have I missed the entire point of the first two posters, one admittedly four years ago and unanswered? I thought they were trying to set # variables to some X/Y/Z/A/B/C position so that in their gcode they could have the machine go to this position. My machine does just that and I showed how I did it along with my code. What am I missing with all this programming, looping, watch windows and such?