Hello Guest it is March 29, 2024, 08:32:42 AM

Author Topic: problem about tool change M6  (Read 2253 times)

0 Members and 1 Guest are viewing this topic.

problem about tool change M6
« on: September 15, 2020, 03:42:12 PM »
hello every one
so my problem is when i call M6  command (lets say the current tool is 1 and i want to change to tool number 2 ) and when it move too return  the current  tool 
and lets say some one accidental  press stop the machine will stop and set the current tool to 2 even so it didn't change the tool
is there any thing to tell me that stop is pressed so i can have an if statement to to avoid this

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: problem about tool change M6
« Reply #1 on: September 15, 2020, 05:00:41 PM »
You need to put your M6Start.m1s on here for us to look at but rename it to ahmad1222.m1s so you do not get a error message saying already exists.
Without engineers the world stops
Re: problem about tool change M6
« Reply #2 on: September 16, 2020, 03:33:07 AM »
here is the code
Re: problem about tool change M6
« Reply #3 on: September 16, 2020, 06:23:12 AM »
Hi,
not quite sure what you guys are on about, files of type .m1s are for Mach3. This is a Mach4 board.

Lua source files are of type .mcs and compiled Lua files are of type .mcc.

Additionally its normal in Mach3 to have an M6Start script but not so in Mach4.

If your script is compiled VB then it won't run in Mach4.......Mach4 uses Lua 5.3 for scripting.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: problem about tool change M6
« Reply #4 on: September 16, 2020, 07:12:20 AM »
The file extension is .mcs then it compiled to .mcc
I program it in Lua
But I upload it with the extension you ask
Last I am working with mach 4

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: problem about tool change M6
« Reply #5 on: September 16, 2020, 09:56:57 PM »
My mistake, I was thinking it was Mach3.
Without engineers the world stops
Re: problem about tool change M6
« Reply #6 on: September 17, 2020, 03:44:23 AM »
No Problem so do you have any ideas ?

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: problem about tool change M6
« Reply #7 on: September 17, 2020, 09:43:11 PM »
It looks like the macro needs some flags to set as things happen so on exit it knows it completed the change, start a counter as the first thing and then at every stage increment it by 1 for moves open and close tool clamp etc. then when the macro exits check the value and see if its done all the steps.
Without engineers the world stops
Re: problem about tool change M6
« Reply #8 on: September 20, 2020, 07:19:28 AM »
i have try your idea but it doesnt work
as i press stop the tool change the number
i am thinking about to put a code in the PLC Script if the stop pressed and the machine doesn't change the tool it will undo any change
« Last Edit: September 20, 2020, 07:28:05 AM by ahmad1222 »