You can't control the power of the laser by the TB6560 as it is just a stepping motor card, nothing else.
To control the laser power, you have to do manually by using the potentialmeter built-in on the machine.
In order to fire a laser on by the TB6560, here is what you need to do:
1) G-code file contain Z motion.
2) Enable Output on pin 6 to the relay COM port
3) Enable Spindle (relay) on Pin14
4) Connect the normally open (N.O.) to the laser power supply Input pin
Note, it must be a 3 axis board as I was using Z stepping down to simulate "Fire" action. Making sense so far? I used the on board relay for safe guard and you don't have to use it but dangerous if you forgot to code the file to shut off. Relay engaged only if the X,Y in motion. So, why fire the laser when X,Y still in origin, right? The relay is providing a layer of safety protection.
The pin6 is the Step Of Z axis. Or, you can try PIN17 for PWM control but it's not easy to make it right with Mach3. To avoid pre-ignition, I believe you have to use the command M1P1 and M1P0, I forgot it as it's been almost 2 years since my 1st try.
Hope this help
Marco
===========================================================================
Story about my TB6560 and others selling on eBay:
Do not buy those cheap cheap 3 axis on eBay. Dont' get me wrong, I'm not trying push my business here. It's just a fun story about it.
The price selling on eBay is very low some even selling as low as $45 for a 3 axis. Not sure how could they survive with such low price. Well, you never know. Those boards were manufacutered in a city name call
DongGuan a base famous of manufacturering all kind of electronics products selling world wide. Those cheap cards were sold by a guy who used cheap cheap parts he could find. He would use any possible used part to cut the cost. One thing to know for sure is that he used two voltage regulator to get 5V from DC24V: LM7812 for 1st stage then using LM7805 for the 2nd stage instead of using a bit higher cost but higher effective DC-DC step down module. That way, it save him $2.5. All we know that LM78XX is very low efficiency and it generate a lot of heat. Those card are very unstable in overall. All chipset used on board were low speed or recycled. I feel sorry for those guy who bought from them. Some buyer asked me to beat the price and complain why I was selling $79 for the same card. They are wrong, it's not the same!
There was a long and horrible story talking about who's copying who's design on one of the Blog in China. And, I know one guy and he is muy supplier. Unbelievable that the discussion was extended to 34 pages and hit rate was uncountable. No one could image a simple copying issue ended up such a long flight on the web. It's a shame that the guy in Dongguan lied about his company from location to scale wise. From his website it's showing a hugh 5 stories buidling but acutally it' fake! A guy (the boss) of a famous website worshop started an investigation to figure out who is telling true. He found that the guy in Dongguan is a shame. There was no such address or buidling exist! I can post the story here if anyone interested to "see" the story but it's all in Chinese.
After reading that story, I was sweating as I was almost made a deal with that guy beore. While having a doubt how bad a card could be and the picture got clear up after I met a friend 3 months ago. What a coincident, he bought the card made by that guy! Guess what, two card blew out in 2 weeks!!
Stop here.