Hello Guest it is April 24, 2024, 05:39:48 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 - DazTheGas

311
Mach4 General Discussion / Re: Keyboard Inputs Enabled or Disabled Handle
« on: January 04, 2017, 03:46:56 PM »
If you just want to get the state you can use

Code: [Select]
local inst = mc.mcGetInstance()
local hIo, rc = mc.mcIoGetHandle(inst, "Keyboard/Enable")
if (rc == 0) then
   local KbdState =  mc.mcIoGetState(hIo)
end

wx.wxMessageBox(tostring(KbdState)) -- 0 = Off, 1 = On   Just a test to show returned code

code for the example in video is as posted, nothing more or less, well apart from missing local inst = mc.mcGetInstance() at the beginning.

DazTheGas

312
Mach4 General Discussion / Re: Keyboard Inputs Enabled or Disabled Handle
« on: January 04, 2017, 03:30:54 PM »
I tried to use the code form the video but it isn't working.  So I'm still stuck.   

Just tried the code myself and all is fine, make sure you have the plugin enabled as the keyboard icon will show in the taskbar wether the plugin is enabled or not.

DazTheGas

313
Mach4 General Discussion / Re: What is this error???
« on: January 04, 2017, 02:29:23 AM »
Well after a long night of debugging finally found the cause so this is purely for Steve`s info

My screen is totally different and don`t use the mach4 gui, this is hidden on startup with a winapi call from a plugin and my gui loaded written purely in lua.

On loading a gcode file a wxStyledTextCtrl is populated with the gcode and mach4 is passed the name of gcode to load, now also on my screen are dro`s to control jog and feed rates etc. These dro`s use the onFocus event when the mouse moves over them to allow the mouse wheel to change the values.

So heres the chain of events....

I click Load Gcode and a file dialog opens using the ShowModal() method so all should be safe (wrong)
If I accidently move over one of the dro`s then obviously these get focus and because there a part of my screen then this also gets focus moving the file dialog below it.
With the file dialog no longer there thinking it has closed I press Load GCode again, well ofcoarse this will open another file dialog allow me to select file and populate the wxStyledTextCtrl.
However under my screen is a file dialog still in the ShowModal state attached to a hidden mach4........ derrrrrrr me

Now fixed with a simple    local fileDialog = wx.wxFileDialog(MainFrame...etc  instead of local fileDialog = wx.wxFileDialog(wx.NULL...... so my own screen becomes modal.

Sleeeeeeeeeeeep time.

DazTheGas

314
Mach4 General Discussion / Re: What is this error???
« on: January 03, 2017, 03:43:23 PM »
Everything that you see in there is a copy of all the lua from screen load, plc, every button, the whole of the gui etc etc. its a very fast way of scanning through all the lua code in that profile for errors, would be rather cool if we could edit from there though.

DazTheGas

315
Mach4 General Discussion / Re: What is this error???
« on: January 03, 2017, 02:13:55 PM »
Sorry guys definately not a code issue with macros or gui as none of these have been changed for a while, and after restarting mach4 the same gcode etc worked fine.

I have a few workless days ahead so will try and retrace every step and see if i can find exactly where it happens.

DazTheGas

316
Mach4 General Discussion / What is this error???
« on: January 01, 2017, 10:18:40 AM »
Running some GCode this afternoon ( Oh Happy New Year BTW) first run went ok, loaded second piece of code for the part that would not run the api log shows this

2017-01-01 14:59:15.591 - Signal id 1050, (Output #0), changed from LOW to HIGH.
2017-01-01 14:59:24.232 - API: mcCntlCycleStart() called.
2017-01-01 14:59:24.233 - API: mcCntlCycleStart() returned MERROR_NOT_COMPILED.
2017-01-01 14:59:32.474 - Loggging Enabled.
2017-01-01 14:59:43.014 - API: mcCntlCycleStart() called.
2017-01-01 14:59:43.015 - API: mcCntlCycleStart() returned MERROR_NOT_COMPILED.

However MERROR_NOT_COMPILED isnt listed as one of the errors returned by mcCntlCycleStart() ??

DazTheGas

317
Mach4 General Discussion / Re: 3D printing and fan speed control
« on: December 31, 2016, 09:39:53 PM »
Rather curious in knowing a bit more about your setup, what are you communicating with ??? as in what is setting the extruder temp or bed temp ?? and what is telling mach4 that these are at temperature and it can print.

DazTheGas

318
Mach4 General Discussion / Re: Motors set up tab
« on: December 25, 2016, 05:46:06 PM »
The motor boxes normaly are greyed out until you select a motor.

DazTheGas

319
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: December 25, 2016, 05:43:34 PM »
Sometimes I forget when converting from my screenset to the GUI, a long while ago leaving a timer running would cause a fault and still does in my own, the lua panels in the gui are actually c++ classes and prob destroyed inc timer on shutdown so the x360 timer prob no longer exists, although still worth including but like this,

if X360_Timer then X360_Timer:Stop() end

if anything does change at a later date in the core then at least this is already there.

DazTheGas

320
Mach4 General Discussion / Re: Mach4 Probing
« on: December 24, 2016, 03:46:21 PM »
This is already included with mach4, when installing mach4 it is normaly set with the wxmach screenset,
Load mach4 and then on the menubar click on view then load screen, choose wx4 and you will find the probing tab there.

DazTheGas