751
Mach4 General Discussion / Re: more lua (?) questions
« on: May 02, 2017, 12:45:31 AM »Quote
Hm, ok - so an output can switch a relais, but if I want to connect a hardware toggle-button to the screen toggle-button, than I have to use an input event?Yes.
Quote
Yes, I realized, that some buttons are bound to external signals and have a function call attached.Yes. With and input signal. There are lots of examples of this on this forum. Also, one can use the PMC interface. Search for examples of this as well.
If I want to use the signal-line as connection between external and screen switch, shouldn't I then perform the action in the signal script?
You will have to read up on wxWidgets to see what all you can do with the codepage stuff. Yes, you will be using LUA, but wxWidgets is what is bound to LUA. We have other German users that have accomplished this stuff. Focus Paul is one of them. The codepage is set to an ASCII codepage in the GUI because G code does not allow anything other than ASCII. Other NLS settings such as the decimal character are purposely set as well. Meaning using a comma for a decimal character is not allowed in G code RS274NGC standard. So most things in the GUI are purposely set this way so that things like that don't accidentally end up in the interpreter. Excluding any custom LUA screen elements that you create, of course, so be careful how you integrate so that nothing non-ASCII gets into the interpreter. Filenames, profile names, etc.. are all a source of potential problems.
Steve