Hello Guest it is April 25, 2024, 03:23:21 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 - arhimedoffs

Pages: « 1 2 3 4 »
11
Mach4 General Discussion / Re: Enabling motor from script
« on: March 20, 2018, 12:29:29 AM »
Thanks for reply.
I read this post before, it is very usefull for motor remap.
But I want not only unmap, but disable motor, like uncheck enabled checkbox in configuration tab. I have try simple write configuration string via Lua into profile and reload config, but without luck.

12
Mach4 General Discussion / Machine Enabled state
« on: March 19, 2018, 04:22:18 PM »
There is function mcCntlEnable which can Enable/Disable machine, like Enable button on standard screens. But I can`t find function for get current sate. Function mcCntlGetState return MC_STATE_IDLE regardless of Enabled state. Or I must do this via signal OSIG_MACHINE_ENABLED?

13
Mach4 General Discussion / Lua interpreters
« on: March 19, 2018, 03:50:49 PM »
How much Lua interpreters run in Mach4?
As I check by module loading M-commands scripting and loading the same module in Screen load. Module loaded both even with check

if package.loaded.EWelder == nil then
    ew = require "EWelder"
    mc.mcCntlSetLastError(inst, "load_modules. EWelder loaded")
else
    mc.mcCntlSetLastError(inst, "load_modules. EWelder already loaded")
end

That is why question: there are two separate threads for UI and G-code execution? Or more. And where PLC script and Signal script executed, in UI thread?

14
Mach4 General Discussion / Enabling motor from script
« on: March 18, 2018, 02:41:32 PM »
I use two motors for X axis. There are two separate heads on X axis, they do not work simultaneously. For this purpose script move current carriage to parking position, remapt axis to ther motor and do homing. The problem is "Enable" output signal still persist on, even for unmapped motor and go to false only if I disable motor in config manualy. The same problem - if I disable axis, then enable signal still True. How can I Enable/Disable motor from Lua script?

15
This is huge problem about documentation on such things :)

Instance - may be this is for UI when there are multiple Mach4 instances, I am not shure, but never paid attention on this field.
Scale Method - where you find it?

16
Mach4 General Discussion / Re: Mach4 MQTT Client
« on: March 16, 2018, 02:13:46 AM »
Yes. Thats why I say, I have missed this options  :)

17
Mach4 General Discussion / Re: Mach4 MQTT Client
« on: March 16, 2018, 01:40:22 AM »
Sorry, I miss something.

18
Mach4 General Discussion / Re: Mach4 MQTT Client
« on: March 15, 2018, 10:43:50 AM »
Hm, this is problem with documentation. I found all by my self with testing.
Plugin installed and activated by default. In configuration you setup exchanges - command, first register and count. As result you have virtual IO. Bits can be mapped to the signals, words is mapped to registers. From script bits can be accesed as local handler, rc = mc.mcIoGetHandle(inst, "PLC/"..name); local value, rc = mc.mcIoGetState(handler). Registres like local handler, rc = mc.mcRegGetHandle(inst, "PLC/"..name); local value, rc = mc.mcRegGetValue(self.h). All this functions described in manual, Get/Set supported.
Exchange speed pretty fast with some CPU load. Main limitation - Modbus serial not supported.

19
Mach4 General Discussion / Re: Mach4 MQTT Client
« on: March 15, 2018, 09:58:50 AM »
Wow! Why so difficult path? I use direct ModbusTCP from Mach4 and all works fine.

20
Mach4 General Discussion / Re: Mach4 MQTT Client
« on: March 15, 2018, 08:24:35 AM »
I check mqttlua/utility, socket_receive can be blocked by empty receive buffer, but socket creaed as socket.select({socket_client}, nil, 0.001), where 0.001 - 1ms is timeout value. So I assume there are no blocking processes exist.

Pages: « 1 2 3 4 »