Hello Guest it is March 28, 2024, 06:14:20 PM

Author Topic: Need spindle use the other M command ,not M3,M4 and M5 ,How to set up ?  (Read 4835 times)

0 Members and 1 Guest are viewing this topic.

 
   Dear Sir,
   I need the help, I know the spindle need the M command to rotate.
   M03 to rotate forward , M04 to rotate rev and M05 to stop.
   But I am building CNC plasma machine with both spindle and the machine torch of plasma on one Z-axis
   I know M03 is the command to open the fire torch and M05 is the command to close the torch fire also.
   Is it possible to use the other Mxx command to operate the spindle ?
    I don't want to use M03 and M05 both the spindle and the torch fire. I want to separate.
   How to set up ? Pls advise.

   Mongkol

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
You could use M7 or M8 and M9 would switch them off, they are meant for Mist and Flood coolant but that doesnt mean you have to use them for that. If you want to use them then just set up the relay option for Flood/mist on Spindle setup page of Ports and Pins and then set the output to the pin you will use.

You could also write a custom macro and name it something like m101.m1s and another called m102.m1s and place them in the macro folder of the profile you use.

If you had for example

ActivateSignal(OutPut1)

in m101.m1s macro it would switch output 1 on when you called m101 from code or MDI. Likewise the m102.m1s macro would have

DeActivateSignal(OutPut1)

in it and when you called M102 it would turn off Output 1


Hood
 Hood ,
 I have not ever writen macro. Could you pls help me ?
 Here's my e-mail :mongkolnum@gmail.com

 Hope your help
   Mongkol

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
All you need to do is open notepad, type in ActivateSignal(OutPut1) and then save that notepad file to the macro folder of the Mach profile you use as m101.m1s.

Then when you call m101 from code or MDI it will turn on OutPut 1

Do the same for m102.m1s except have DeActivateSignal(OutPut1) in it and when you call m102 from code it will switch off output 1

If you want to use OutPut 3 then just have that instead in the macro.

You dont need to call it m101.m1s, you could call it m222.m1s if you wanted but you need to be sure there is not already a macro of the same name there already. Also macro numbers under 100 are reserved for Mach even though some are not used it is best to not use under 100.

Hood
Thanks.
I will try
Hood,
Do you have your e-mail ?
If I have any problem, Can I ask you ?
Is it possible ?

Mongkol

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
I  think its better to ask questions here on the forum if you have problems. Two reasons, one is there are lots of people here who will be able to advise and second it helps others if they have the same questions.
Hood

Offline Greolt

*
  •  956 956
    • View Profile
I assume that you will not be operating the spindle and plasma at the same time.

Why not set up a plasma profile and a spindle profile?

Simply start up with the appropriate profile depending how you want to use the machine.

Each profile could have its own custom screenset dedicated to either plasma or spindle.

Greg