Hello Guest it is April 24, 2024, 09:39:43 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.


Messages - DazTheGas

271
You will find the label object in the screen editor.

Depending if you want the output updated or not to where you put the code, if you just want to display what has been loaded from the machine.ini then this would go in the screen load script, if you want the label to update during the session then this would go into the plc script.

DazTheGas

272
If you look in the docs directory at the api docs there is a section called profile which does what you need.

IE for CVMode would be  cvMode = mc.mcProfileGetString(inst, 'CVFeedrate', 'CVMode', 'G64') last param being default if not already in machine.ini

To write this too, lets say a label called lblCVMode then you can use scr.SetProperty('lblCVMode', 'Label', cvMode)

Hope this helps

DazTheGas

273
Mach4 General Discussion / Re: Lua Editor Crashing
« on: February 09, 2017, 04:58:38 PM »
Normal ending for me is

At Breakpoint line: 10 file: C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m6.mcs
Killed debuggee process 3052.
Debug session finished.

DazTheGas


274
Mach4 General Discussion / Re: Lua Editor Crashing
« on: February 08, 2017, 07:21:10 PM »
I think instead of finding a work around, the reason why it cant come out of a debug session should be found, I have never know this problem yet and adding wxExit could be problem for you down the line.

DazTheGas


275
Got to laugh Russ, ive just sat and typed basically the same with 1 finger on phone and press post to get

Quote
Warning - while you were typing a new reply has been posted. You may wish to review your post.

I must make my finger go faster.

DazTheGas

276
Mach4 Plugins / mcX360 Plugin for Lua Updated
« on: February 08, 2017, 09:26:20 AM »
Ok all sorted, they now work in percentage from 0 to 100%

Code: [Select]
local mInst = mc.mcGetInstance()

function SetXin(xinput, speed) -- 0 - 100%
    local hreg = mc.mcRegGetHandle(mInst, string.format("mcX360_LUA/%s", xinput))
    mc.mcRegSetValueLong(hreg, speed)
end

SetXin("LRumble", 100)

DazTheGas

277
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: February 08, 2017, 02:11:33 AM »
Didnt notice the rumblers wasnt  working i will have a look at the code and see why.

DazTheGas

278
Mach4 General Discussion / Re: Lua Editor Crashing
« on: February 07, 2017, 04:44:59 PM »
Well I have run both bits of code you posted and both ran fine, out of curiosity you might want to check to see if any firewall of any kind is blocking the editor from connecting to the mach4 core.

DazTheGas

279
Mach4 General Discussion / Re: Mach 4 some bugs - Help me.
« on: February 03, 2017, 11:22:00 AM »
Ok the answers to 1 and 3.

1. On the jogging tab you will see a button that says "Keyboard Inputs Enable" this needs to be green which will remove the red cross from the icon in the taskbar.
3. Open up mach4mill using the wx4 screenset,  then Operator->Edit Screen look under main tabs in the tree and highlight tabDiag and right click on it, you should find an export. export this then load your profile and do exactly the same but this time import it and you should then have Diagnostic tab.

DazTheGas

280
Mach4 General Discussion / Re: Mach4 Mcode script problem
« on: February 02, 2017, 07:04:38 AM »
I thought we sorted this out on the warp9 forum??

DazTheGas