Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: excusme2004 on June 16, 2013, 06:33:54 PM

Title: M10P1 NOT WORK USB MOTION CARD :o
Post by: excusme2004 on June 16, 2013, 06:33:54 PM
Hii all

This card works very well, but there is an important missing .. :/ :o

outputs, this card is not running USB as fast as M10 and M11 or M10P1 - M11P1..

  What do you think? What ı can Do ???

card model: http://www.alibaba.com/product-gs/445057014/4_Axis_CNC_Breakout_Board_Mach3.html

orjinal;
m10 code;

rem #define DIGTRIGGER  0

rem #define ENABLE1     1

rem #define ENABLE2     2

rem #define ENABLE3     3

rem #define ENABLE4     4

rem #define ENABLE5     5

rem #define ENABLE6     6

rem #define EXTACT1     7

rem #define EXTACT2     8

rem #define EXTACT3     9



rem the following activated signal 9 (EXTACT3)



ActivateSignal(  9 )

orjinal
m11 code;

rem #define DIGTRIGGER  0

rem #define ENABLE1     1

rem #define ENABLE2     2

rem #define ENABLE3     3

rem #define ENABLE4     4

rem #define ENABLE5     5

rem #define ENABLE6     6

rem #define EXTACT1     7

rem #define EXTACT2     8

rem #define EXTACT3     9



rem the following de-activates signal 9 (EXTACT3)



DeActivateSignal(  9 )
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: BR549 on June 16, 2013, 08:36:39 PM
IF I remember correctly M10 and M11 or M10P1 - M11P1.. only work correctly with the LPT driver.

(;-) TP
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Tweakie.CNC on June 18, 2013, 05:02:38 AM
Just a note…

The M11 / M10 commands (with config. defined output pin of choice) now seem to work just fine with the latest revisions of the Smooth Stepper software.

Tweakie.
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: stirling on June 18, 2013, 05:50:45 AM
Virtually all that "code" in M10 and M11 is comment. There is only ONE executable statement in each i.e.

M10 is:

ActivateSignal(9)

and M11 is:

DeActivateSignal(9)

Surely any external motion card should be able to handle this - it's just toggling an output pin after all.

Can't speak for M10P1 / M11P1 because I don't know what they are (I use R3.043.022) - but if they're a newer version of M10/11 that take a parameter defining the pin - then the code you've posted for M10/11 has no code to handle any parameter.

Ian
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Tweakie.CNC on June 18, 2013, 07:44:43 AM
Ian,

The M11 / M10 commands are pretty much an exception in so far as they are not treated by Mach3 as ‘stand alone’ commands. They must be followed by the Px parameter (where x = the Output# that is switched) and they then only come into effect upon subsequent Axis (any axis) movement.
Greg (at Warp9) has not succeeded in getting Mach3 to pass the associated Px parameter (together with the M11 /M10 commands) to his external motion controller so assuming this is always going to be the case then other external motion controllers may suffer with the same issue. (Greg’s solution is to define the Px parameter in his SS config. file then associate it with the M11 / M10 commands at run-time within the SS engine).

Tweakie.
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: excusme2004 on June 18, 2013, 07:57:40 AM
Is it possible to run commands as you think m10p1 with usb? I do not understand what I should do. ???
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Tweakie.CNC on June 18, 2013, 08:07:36 AM
Quote
Is it possible to run commands as you think m10p1 with usb? I do not understand what I should do.

As said in my previous post, currently the answer is no, it is not possible.

Which external motion controller are you using ?

Tweakie.
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: excusme2004 on June 18, 2013, 08:09:31 AM
this card: http://www.alibaba.com/product-gs/445057014/4_Axis_CNC_Breakout_Board_Mach3.html
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Tweakie.CNC on June 18, 2013, 11:28:52 AM
My apologies, you had posted a link to the card in your first post - I overlooked that.

Sorry, but the M11P1 / M10P1 commands will not operate as intended with the LeafBoy card.

(Your best alternative for high speed switching would probably be to set-up a dummy axis and then use it's Direction pin for triggering your device).

Tweakie.
Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Vogavt on May 02, 2018, 06:17:55 PM
From another thread here:
The technique here is to edit the existing GCode so that the +Z moves are just one step (in my case +0.002) and the –Z moves are also just one step (-0.002) then set the Z axis direction pin to the laser trigger pin allocation. The time delay between the Z axis completing the two virtual steps and the laser switching is so small that it can almost be considered instantaneous and when I return to engraving the fine line in a soft wood there is no longer a dot at each end of the line.

An alternative option, which is also worth investigating, is the B axis direction pin. This is probably much easier to implement where the B axis ‘steps per’ are set to 1 and the B axis direction pin is mapped to the laser trigger (pin 16 in my case) then any GCode is edited to replace the Z axis moves with B1 to turn the laser on and B0 to turn it off. Again this command can almost be considered as instantaneous and tests have shown it to have equal results to when the Z axis direction pin was used.


I have the USB XHC MachIV controller (Rev 5) and at this point can't get the M11/M10 working. Understood per this current thread. My controller is 4-axis and I'm using the JTechPhotonics driver and their Pic-Convert (DAC) board which takes signals from the A-axis. Since M11/M10 aren't working and of course I'm getting delays and burning at endpoints, I'm intrigued with the above comments about using the B-axis (or C) but I'm confused as to how to set up the triggering with the dummy axis and how it comes into play regarding GCode.

An example of GCode might help me understand the difference between:
1. Switching an output utilizing a macro that contains the "ActivateSignal(Output 5)" for output 5
2. An M3 call.
3. Or using a dummy drive, i.e., how does that make things faster than options 1 or 2?

Also, I don't understand the part about using/mapping the B-Axis direction pin to trigger something?

Title: Re: M10P1 NOT WORK USB MOTION CARD :o
Post by: Tweakie.CNC on May 03, 2018, 02:29:49 AM
Hi Vogavt,

Within Mach3, running a macro or calling an M3/M5 takes some 100mS of time to complete and thus causes unwanted laser burn at the start or end of an engraved line. Because Mach3 blends axis moves then the TTL level of the A (or B or C) axis direction pin can be changed at the exact instant (or al least within 2mS) the X,Y or Z axis start to move. This principle is demonstrated in the linked video (although this one was made in the early days of Mach4 when there was still some confusion between Imperial and Metric units for the A axis).

https://www.flickr.com/photos/tweakie-cnc/27822699768/in/dateposted/

I have attached my Gcode for a similar part (another Mach4 test). Here the A axis direction pin toggles when the A axis moves between 0 and 0.01. Although the code was produced for Mach4 it will operate perfectly with Mach3.

My laser switches ON when its trigger input is TTL(low) and OFF when the trigger input is TTL(high) so within Mach3 the Active Low state of my A ( or B) axis direction pin would be set to switch my laser accordingly.

(There are some safety concerns when using an axis direction pin (because a Direction pin TTL level is modal and the laser could be left ON when in EStop) so certain precautions have to be taken).

Hope this makes sense.

Tweakie.