Hello Guest it is March 28, 2024, 08:12:23 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 - Sergio007

Pages: 1
1
If you want to de activate an output with the e stop, you can put the estop in the signal library.  That's what I do with machines here in our shop.  If the Estop state = 1 then turn off outputs.

Hi Chad. Thank you for this. I have tried so many keywords to find this information. Now, if you or anyone would help me achieve this? I have no idea where to go to put the E-stop in the signal library.

After writing this, I found this other post, which refers to the same thing. I will try it and report the results.
https://www.machsupport.com/forum/index.php?topic=41540.0

Thanks

2
Mach4 General Discussion / Re: Slave Motor Will Not Home
« on: June 26, 2022, 02:32:09 PM »
Hi, thank you for your reply.

I contacted Poscope, who offer by the way an excellent support. The explained to me that each motor needs it own signal from limit switches. It doesn't matter that two motors are driving the same axis, the control board needs an input for each motor. In my case it is ok to wire the same limit switches to both motors, which I did and this fixed the issue.

3
Mach4 General Discussion / Re: Slave Motor Will Not Home
« on: June 19, 2022, 07:52:16 AM »
Hi,
Thank you! That would be great. I found some instructions, which will be able to check tomorrow. Anyway, here is the text  in case the webpage is not available in the future.

#######
Enable Slave Axis in Mach4
There are 2 configuration options:


Option A. Homing with Home/Limit switch on the Master:

First: In the Mach4 software go to Configure=>Control=>Axis Mapping

Select which motor is the slave under Slave 1

Second: Configure=>Plugins=>HiCON

Select the motor that you want to be the master and uncheck the Independent Master-Slave Home and make sure that the index pulse is unchecked.

Select the motor that you want to be the slave and uncheck the Independent Master-Slave Home and make sure that the index pulse is unchecked.

Third: Configure=>Control=>Input Signals

Make sure that the slave axis home switch, Motor - and Motor + are disabled

Option B. Homing with Home/Limit switch on Master and Slave:

In the Mach4 software go to Configure=>Control=>Axis Mapping
Select which motor is the slave under Slave 1

Configure=>Control=>Inputs Signals
Make sure that the Slave axis home switch, Motor - and Motor + are Enabled.

Configure=>Plugins=>HiCON
Select the motor that you want to be the master and check the Independent Master-Slave Home and make sure that the index pulse is unchecked.

Select the motor that you want to be the slave and check the Independent Master-Slave Home and make sure that the index pulse is unchecked.

Set Slave Misalignment value if needed to "square" the gantry
https://support.machmotion.com/books/knowledge-base/page/aligning-slave-axis-gantry---mach4

Troubleshooting:

If there are motion issues with the homing, it is likely the axis designation does not match the homing switch designation. In other words, the homing switch assigned to the master axis is likely actually on the slave axis.
After touching off the switches, if one of the sides of the gantry continues to travel, "dragging" the other side along with it, would be an example of such motion issue caused by "swapped" configuration of switch assignments.
#######

This is the original site
https://support.machmotion.com/books/software/page/enable-slave-axis-in-mach4

Cheers

4
Mach4 General Discussion / Re: Slave Motor Will Not Home
« on: June 18, 2022, 12:00:13 PM »
I have exactly the same issue with homing the slave motor. I was expecting to find a software-based solution, as I do in Mach4 when I set up Motor A as slave of another motor. If there is anyone who may know how to configure this, it would be very helpful. Thank you.

5
Mach4 General Discussion / Re: loop help
« on: August 01, 2020, 11:17:40 AM »
I see capital lettering on the M code.  Change M10 to m10 on the function name, the file name, and in the mcInEditor()  Test stub that calls M10.

M codes are ALWAYS lower case.  This is because the interpreter converts everything to lower case when it processes the G code line.

Steve

Hi Steve,

Thank you for clarifying that m codes should always go with lowercase. What I tried to say was that I got the function to work. My problem was the inconsistency between the name of the mcs file <M10.mcs> and the name of the function <m10()>. If both are lowercase or both are capital, then it works. Anyway, I will swap everything to lowercase, as you say it is more correct.

Sergio

6
Mach4 General Discussion / Re: loop help
« on: July 30, 2020, 11:23:46 PM »
Hi Bill,

That's a great document! Thank you for sharing it. The main bit I was missing is that the function name and the corresponding .mcs file are case sensitive. I'm putting the code here for other newbies like me who might find it useful.

function M10()

-- Instanciate the function
   local inst = mc.mcGetInstance()

-- Asign Output #2 to MyVariable
   MyVariable = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)

-- Asign the value 1 to the signal state, which activates the output.
   mc.mcSignalSetState(MyVariable, 1)
end

-- As explained in the manual and in the document prepared by Bill
if (mc.mcInEditor() == 1) then
   M10()
end


It was also useful to verify that the wiring on my boards is correct, by using a toggle button. For other users who may find this thread, here is a quick example of how to set up a toggle button on the screen, to ON/OFF the Output## of choice.

https://www.youtube.com/watch?v=3XY0o0gXz2A

So glad to have something, even so small, to give back.

7
Mach4 General Discussion / Re: loop help
« on: July 30, 2020, 04:35:50 PM »
Hello,

Thank you for sharing your knowledge and experience. Perhaps you could point me in the right direction too.

I'm trying to produce a couple M functions to turn on/off Output #2, but I can't get it to work. I will use it to trigger the arc on a welding machine. Here is the code I have for the ON function. I thought of adding the conditional at the end, as suggested in the manual, but that doesn't correct my error.

function m10()
inst=mc.mcGetInstance()
hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2);
mc.mcSignalSetState(hsig, 1);
end

if (mc.mcInEditor() == 1) then
m10()
end


There is also the option presented in "Down and Dirty “mcLua” scripting, quick ref guide." But I lack the knowledge to initialize the variables at the beginning, so I can't really implement the code. Also, I do not need the IF in the middle, as I just want the state to be ON.

hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT##);
local state = false;
local VarIamTestingFor = SomeThingIamWatchingOrSettingOrValue;
if VarIamTestingFor == WhatSetsTheOutputToOn then
state = true;
else
state = false;
end
mc.mcSignalSetState(hsig, state);


Any help or guidance will be much appreciated.

Cheers

8
Mach4 General Discussion / Re: Arduino, Mach4 and ModbusIP.
« on: July 17, 2019, 12:14:19 AM »
Hi Tim,

Thank you for sharing your progress on Arduino, Modbus, and Mach4. I am building a relatively gantry-type robot, for robotic welding. To achieve this, I need to define M codes (or any equivalent), to control multiple parameters of the welding machine from within the lines of G code. For instance, to increase arc voltage or wire feed speed, or accessing a memory slot in the welding machine, between lines of G code.

I wonder if you could help me understand how to define M codes to perform Modbus TCP communication. The relevant information from the welding machine manufacturer is here https://resources.userdoc.kemppi.com/manuals/a7-mig-welder-integration-om-en.pdf

At the moment, I understand that it is possible to configure the Modbus TCP protocol on Mach4. I just haven't figured out how to relate this to M codes.

Thank you in advance for any insights you may be able to share with me. Or publicly on the forum, that would be even better I guess.

Cheers

Sergio


Pages: 1