Hello Guest it is November 18, 2019, 11:09:13 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.

Topics - qwertysimo

Pages: 1
Mach4 General Discussion / M code macros do not run
« on: September 20, 2017, 05:21:50 PM »

this might be a trivial issue but I cannot figure it out. Mach4 ignores all mcs files in my C:\Mach4Hobby\Profiles\QR\Macros\ (profile name is QR). Bottom of wxMach screen shows active profile QR.

I created m111.mcs for testing with this content:
Code: [Select]
function m111()
wx.wxMessageBox( "here" )

if (mc.mcInEditor() == 1) then
After running m111 from MDI nothing happens.

I copied m111.mcs to \Profiles\Mach4Mill\Macros, loaded Mach4Mill profile and the macro works. Mach4 upon startup also compiled mcs files in folder and corresponding mcc files appeared in the same folder. This does not happen with my QR profile.

Please, can you advice how to fix this? It looks like it is related only to my custom profile.



Best regards

Modbus / Mach4 and modbus - help needed
« on: September 21, 2016, 05:15:51 AM »

please, can you help me with actual problem? While I can read (0x03) and write (0x06) holding register and I can read (0x01) coil, I cannot write coil (0x05). This is the code, a snippet from signal library definition, with some debug output:

Code: [Select]
[mc.OSIG_RUNNING_GCODE] = function( state )

    local hregTestCoil, rc = mc.mcRegGetHandle( inst, "modbus0/testCoil" );   -- THIS COMMAND IS FAILING
    mc.mcCntlSetLastError( inst, "testCoil handle: " .. tostring( hregTestCoil ) .. ", rc: " .. tostring( rc ) );

    local hregTestRegister, rc = mc.mcRegGetHandle( inst, "modbus0/testRegister" );
    mc.mcCntlSetLastError( inst, "testRegister handle: " .. tostring( hregTestRegister ) .. ", rc: " .. tostring( rc ) );

    if( state == 1) then
        mc.mcCntlSetLastError( inst, "signal changed to 1" );
        mc.mcRegSetValue( hregTestCoil, 1 );
        mc.mcRegSetValue( hregTestRegister, 101 );
        mc.mcCntlSetLastError( inst, "signal changed to 0" );
        mc.mcRegSetValue( hregTestCoil, 0 );
        mc.mcRegSetValue( hregTestRegister, 100 );

Attempt to get handle for testCoil fails with return code of -27 which should mean MERROR_REG_NOT_FOUND. What is wrong?


Mach4 General Discussion / Jog problem, stuck key symptom
« on: September 04, 2016, 05:11:52 PM »

I noticed that my actual machine ignores Page Down key press for "Z Jog-" function...

To troubleshoot (late night here), I loaded default Mach4Router profile, with Simulator and Keyboard Inputs plugins enabled.
When I display Keyboard Diagnostics window, I see (to my surprise) that Page Down key is pernamently lit green. (Arrow Right Shift as well.)
Page Down key is definitely not stuck and it works as expected outside Mach4!
What is interesting, when I press Page Down Shift or Page Down Ctrl, it is indicated correctly in diagnostics.
Restarting Mach4 neither PC did not help.

Can you advice please how to fix? Screen attached.


Pages: 1