Hello Guest it is April 25, 2024, 05:20:04 AM

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.


Topics - Tweakie.CNC

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 »
93
Sieg Machines / MOVED: Seig 2.7
« on: November 11, 2020, 07:05:48 AM »

97
Tangent Corner / Nuts & Bolts.
« on: October 10, 2020, 03:57:00 AM »
Art never stops creating the amazing. Check out his latest; http://gearotic.com/ESW/FavIcons/index.php?topic=2057.msg15655#new

Tweakie.

98
Can anyone please help Coyote with getting this script to execute.

His posting, in German is here; https://www.machsupport.com/forum/index.php?topic=43750.msg281511#msg281511

A translation of his posting…

Morning,
according to the "Mach4 scripting manual" on page 16. When I establish code in the screen load script such as:

-------------------------------------------------- -------------
- Write register
-------------------------------------------------- -------------
function WriteRegister (regname, regvalue)
    local inst = mc.mcGetInstance ()
    local hreg = mc.mcRegGetHandle (inst, string.format ("iRegs0 /% s", regname))
    mc.mcCntlSetLastError (inst, string.format ("iRegs0 /% s", regname)) - for test if i can reach this line
    mc.mcRegSetValueString (hreg, tostring (regvalue))
end

then this function can be executed globally.

I would now like to use this also from the macro:

function m170_setSolderProg (number)
    local inst = mc.mcGetInstance ()
   
    if (mc.mcInEditor () == 0) then
        number = tonumber (number)
        WriteRegister ("SolCon / SolderProg", number)
    else
        local hreg = mc.mcRegGetHandle (inst, "iRegs0 / SolCon / SolderProg")
        mc.mcRegSetValueString (hreg, tostring (number))
    end
   
    SetSolConSolProgOutput (number)
       
    mc.mcCntlSetLastError (inst, string.format ("Solder Program% s updated", number))
end

but it is not executed / found. There is also no error message about it!

I have already entered this into the support of Newfangled, but only received irrelevant phrases as an answer. I have to hold back from writing an angry mail to Trevor W.

I suspect that the place for the function is the wrong one, as in the manual as an example it is only accessed by a screen button.

Does anyone have any advice for me to solve this problem?

Thank you
Coyote

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 »