Hello Guest it is April 13, 2021, 04:02:51 PM

Author Topic: Serial data out by Gcode  (Read 2268 times)

0 Members and 1 Guest are viewing this topic.

Serial data out by Gcode
« on: September 13, 2011, 06:30:57 PM »
Hi, All.
I need to program an external device using serial pulses generated from within Mach 3.
I can configure any pin I need on the parallel port to do this, but so far I have not found any G code command that will let me specify a number of on/off pulses to send to the specified pin.
The closest I can get is to configure a fake motor (in this case, Motor B) and tell Mach to toggle its Dir pin forward and back, which translates to on/off for the external device.
Is there a more streamlined way to use Gcode, or Mach, to toggle an I/O pin a specific number of times, quickly?

Offline BR549

  •  6,952 6,952
    • View Profile
Re: Serial data out by Gcode
« Reply #1 on: September 13, 2011, 06:44:49 PM »
OK I see your subject tile does not match your question(;-)

I was going to suggest aserial or USB port(;-)

You could use the Step pin and calibrate the Phantom axis to 100 steps per unit then program by the unit%    G1 B.5 F60  would send 50 pulses in 1 sec.

Just a thought 

(;-) TP
« Last Edit: September 13, 2011, 06:53:04 PM by BR549 »
Re: Serial data out by Gcode
« Reply #2 on: February 11, 2012, 06:31:20 AM »
I was wondering if mach3 can use serial port instead of parallel port, I want to build a controller with PIC and send data serially, but not sure if that would work with mach3.

Are there any guidelines for building such a serial controller that would work with mach3 ? , is there any reference design or recommendations ?