Hello Guest it is April 19, 2024, 03:08:42 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 - SwiftyJ

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 »
11
Mach4 General Discussion / Re: Video Panel (for Webcam) in wizard
« on: February 17, 2024, 04:41:52 AM »
I don't believe it's possible unless you had a lua version of something like OpenCV.

The easiest way to get a webcam feed in another window is to use the remote GUI. You can create a new screenset using all the normal Mach4 controls, and then you can launch it from a button.

They have a youtube video on it:
https://www.youtube.com/watch?v=UpjImHxr3o4

12
Mach4 General Discussion / Re: RefAllHome in Gcode end
« on: February 08, 2024, 03:35:36 PM »
You cannot use the RefAll API call during g-code execution, it will fail.

Mach4 supports G28.1 for homing using g-code so use this instead of your mcode. See explanation below

Code: [Select]
G28.1 – Home Axis
 G28.1 physically homes the specified axes.  If more than one axis is specified, then the axes are homed in order
specified by the control configuration.  The values of the parameters are ignored except in the case of P.  If P is
specified, the corresponding out of band axis is homed.  Valid values for P are P6 through P11.  P can only be
specified once.
 Format: G28.1  X__  Y__  Z__  A__  B__  C__ P__

13
Hi, check out this post

https://www.machsupport.com/forum/index.php?topic=41630.msg272402#msg272402

You can also use mcCntlMacroStop in place of mcCntlMacroAlarm as used in the example

14
Mach4 General Discussion / Re: 'Cannot initialise core instance'
« on: January 15, 2024, 03:04:07 AM »
Hi Craig,

This is Windows Security flagging the mach4core.dll file as a virus. If you go into the Windows Security you can allow the “threat” and restore the file

15
Hi, I found this note on the ESS website..

"NOTE!!!! Build 5000 is having probing issues with the ESS plugin... Mach4 Build 4809 with ESS 283 is what we are recommending at the moment. January 15th, 2023"

16
It looks like #2032 and #2035 is now #1232 and #1235.

Instead of using the values 1232 and 1235 you can use the following instead

mc.mcCntlGetPoundVar(inst, mc.SV_CUR_LENGTH_INDEX) --Current Selected H Offset
mc.mcCntlGetPoundVar(inst, mc.SV_CUR_TOOL_ZLENGTH_REGISTER) --Value of Current H Offset

17
Mach4 General Discussion / Re: Load FIle in MDI Button
« on: November 25, 2023, 12:37:21 PM »
Hi,

I have created this drop list that will display all files within a folder. It will look for files in 'C:\Mach4Hobby\MDI Files'. You can then select the file from the drop down and it will load it into the MDI window and you can run it as normal. I've also added a save button so you can easily create and save new files.

All the code is self contained within the MDI tab. I have exported it so you can easily import it without having to copy and paste code. First extract the attached .zip file. To import, go into the screen editor, right click 'nbGCodeMDI' and click import. Then select the .setc file you just extracted. Make sure the controls are named as in the picture otherwise it will not work. It may be best to delete your current MDI tab before importing. Also make a backup of your screen file before doing anything just in case!

18
Mach4 General Discussion / Re: Macro will not jog mill
« on: November 24, 2023, 03:16:56 PM »
Hi,

Add this function to the screen load script
Code: [Select]
function TestButton()
--Move axis 1/2 bit diameter in X+ and Y+
--Set current position as X and Y zero in work coordinates
local inst = mc.mcGetInstance()
--Get bit diameter and set jog distance
local strBitDiam = scr.GetProperty("JogToValue", "Value")
local AxisJog = tonumber(strBitDiam) / 2
   
-- Jog controller 0 in the X and Y axes;
mc.mcJogIncStart(inst, 2, 1)
coroutine.yield() --Wait for idle state
mc.mcJogIncStart(inst, 0, AxisJog)
mc.mcJogIncStart(inst, 1, AxisJog)
coroutine.yield() --Wait for idle state
   
-- Set local coordinates to zero for the X and Y axes
mc.mcAxisSetPos(inst, 0, 0)
mc.mcAxisSetPos(inst, 1, 0)
end

Add this to clicked script or left up script of a button
Code: [Select]
wait = coroutine.create(TestButton)

19
Initialise it at the start of the Screen Load script, not the PLC script. The Screen Load Script runs once when Mach4 starts

20
You can initialise variables at the top of the screen load script. Don’t make it a local variable though otherwise the PLC script won’t see it

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 »