Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2017, 07:24:50 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 »
71  Mach Discussion / Mach4 General Discussion / Re: Mach 4 Bug Reports on: May 26, 2015, 07:20:53 AM
OK. The workaround works.

Dan
72  Mach Discussion / Mach4 General Discussion / Re: Mach 4 Bug Reports on: May 26, 2015, 03:10:49 AM
Already have. Makes no difference.

Dan
73  Mach Discussion / Mach4 General Discussion / Re: Mach 4 Bug Reports on: May 26, 2015, 02:40:19 AM
I have this code in a button.

Dan
74  Mach Discussion / Mach4 General Discussion / Re: Mach 4 Bug Reports on: May 26, 2015, 02:18:02 AM
Not really explains the issue I mentioned...

Dan
75  Mach Discussion / Mach4 General Discussion / Re: Mach 4 Bug Reports on: May 26, 2015, 12:40:03 AM
Looks like a bug:

Trying to execute Gcode from LUA. This script works fine:

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecute(inst, "G0 X10 Y10\n")


However, with the below function, the numbers in the DROs do not continuously update, but only when the final destination is reached.

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecuteWait(inst, "G0 X10 Y10\n")


When trying to execute two line of Gcode, like below, the DROs again don't update continously, but only when the final point is reached.

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecute(inst, "G0 X10 Y10\n")
mc.mcCntlGcodeExecute(inst, "G0 X5 Y5\n")


Dan
76  Mach Discussion / Mach4 General Discussion / Re: Mach4 Executing Gcode from LUA on: May 25, 2015, 08:06:36 AM
Is the bug report thread being monitored by Steve?

Dan
77  Mach Discussion / Mach4 General Discussion / Mach4 Executing Gcode from LUA on: May 25, 2015, 05:37:04 AM
Trying to execute Gcode from LUA. This script works fine:

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecute(inst, "G0 X10 Y10\n")


However, with the below function, the numbers in the DROs do not continuously update, but only when the final destination is reached.

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecuteWait(inst, "G0 X10 Y10\n")


When trying to execute two line of Gcode, like below, the DROs again don't update continously, but only when the final point is reached.

local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecute(inst, "G0 X10 Y10\n")
mc.mcCntlGcodeExecute(inst, "G0 X5 Y5\n")


What is the correct way to programm in order for the DROs to continuously update?

Dan



78  Mach Discussion / Mach4 General Discussion / Re: Mach4 How to Change #Variable value from LUA on: May 25, 2015, 03:38:37 AM
OK, this worked:

local inst = mc.mcGetInstance()
local param = 1 -- variable #1
local val = 12
mc.mcCntlSetPoundVar(inst, param, val)
79  Mach Discussion / Mach4 General Discussion / Re: Mach4 How to Change #Variable value from LUA on: May 25, 2015, 03:08:59 AM
Scott, can you be more specific? Or is this documented anywhere?

Daniel, hardly understood a word of what you said.

Dan
80  Mach Discussion / Mach4 General Discussion / Mach4 How to Change #Variable value from LUA on: May 24, 2015, 02:00:24 PM
Trying to set a #Variable value by a script in a button. As per the Mach4 Scripting Manual, I have created this function in the ScreenLoad Script:

function WriteRegister(regname, regvalue)
  local inst = mc.mcGetInstance()
  local hreg = mc.mcRegGetHandle(inst, string.format("#Variables/%s", regname))
  mc.mcRegSetValueString(hreg, tostring(regvalue))
end

And in the buttin script I have this:

WriteRegister("#1", 15)

However, clicking the button doesn't change the value of #1 to 15. Following the example above, tried change iRegs0 and Sim0 register values and it worked fine, but not with #Variables. How should it be done?

Dan
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!