Hello Guest it is April 19, 2024, 04:19:48 AM

Author Topic: Simple one line MDI required  (Read 6594 times)

0 Members and 1 Guest are viewing this topic.

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Simple one line MDI required
« Reply #20 on: May 29, 2018, 05:41:56 PM »
MyMdi:SetValue("") after mc.mcCntlMdiExecute(inst,mdiCode) will clear the txt and mc.mcCntlSetLastError(inst,mdiCode) will add the txt to the message box.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Simple one line MDI required
« Reply #21 on: May 30, 2018, 05:20:00 PM »
MyMdi:SetValue("") after mc.mcCntlMdiExecute(inst,mdiCode) will clear the txt and mc.mcCntlSetLastError(inst,mdiCode) will add the txt to the message box.

DazTheGas
Many thanks Daz, I'll try that out as soon as my current job is finished and I can tinker with it.

Is there a list of all the MyMidi: function calls? I couldn't really see how this works if I'm being honest. It's a lot to take in having only been playing with this for a couple of weeks.
Roger

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Simple one line MDI required
« Reply #22 on: May 30, 2018, 05:47:18 PM »
MyMidi is not a function as such, its just a name that has been assigned to an instance of wxTextCtrl, things like GetValue and SetValue are functions of this class, so to get a list of the functions contained in this class you would need to look at something like http://docs.wxwidgets.org/3.1/classwx_text_ctrl.html
Although this is for C++ the function names etc are the same for wxLua.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Simple one line MDI required
« Reply #23 on: May 31, 2018, 06:24:46 AM »
Thanks for that Daz, more bedtime reading for me then. That site looks like a good resource, I've bookmarked that.

The code does exactly what I want, it's even better than the Mach3 MDI which wouldn't take any notice of what you typed unless the pop up box was visible. This works straight away with whatever you type, and it's ready for the next command to be typed as soon as the previous one has executed. It ignores anything you type and press enter if the previous command isn't complete which is fine.
I've kept the default mulit-line MDI for anything that might benefit from more than one line being executed. It's just a pity that you can't hit a check box along side the MDI to select single or multi line mode.

There's just one more MDI modification I'd like to do. I'd like a Clear button next to the Multi-Line MDI to clear out the text. Is there a way to do that?

Re: Simple one line MDI required
« Reply #24 on: May 31, 2018, 06:37:47 AM »
Anyway, moving on to the next bug which is in the Feedrate and Spindle realtime DROs on the Mach4Mill screen.

Both of these have the same issue. All the time the machine is moving and the spindle is running, both of these flicker all the time, mostly reading zero, but you can just make out that they're also flashing up the correct values from time to time.

The dro144 component has DRO Code set to Current Feed Rate, and the droTrueSpindle component has DRO Code set to Spindle True RPM

I've searched through the ScreenScript for the component name and also anything to do with the words DRO and feed and there's nothing in there.

So my guess is that this is another bug and the variable is repeatedly set back to zero for some reason.

I'm using an ESS, so maybe that's somehow involved.

I've looked in dignostic->Regfile to see if I can see a variable there that represents this value, but I don't see one or anything flicking.  Again, a lack of documentation about these variables makes it difficult to check something like that.
I can see the first #variables but I have no idea whether it's one of those or not.

Any ideas how to fix this?

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Simple one line MDI required
« Reply #25 on: May 31, 2018, 02:08:43 PM »
It ignores anything you type and press enter if the previous command isn't complete which is fine


I have given you the bare min to get you started, consider adding to the code things like if the controller state is not idle disable the ability to execute another command, as for clearing any control of txt you can use the scr. api commands to do this.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Simple one line MDI required
« Reply #26 on: May 31, 2018, 03:55:07 PM »
It ignores anything you type and press enter if the previous command isn't complete which is fine


I have given you the bare min to get you started, consider adding to the code things like if the controller state is not idle disable the ability to execute another command, as for clearing any control of txt you can use the scr. api commands to do this.

DazTheGas
Thanks Daz, will do.