Instructions
This is the suggested wiring diagram for the breakout board with relay. The breakout board is composed of many output and input terminals. These terminals are directly related to the parallel port pins but contain circuitry that only allows pins to provide signals in the directions labeled (input or output). Use the output to control the machine, like making a motor turn, or controlling a device on the machine, like coolant, mist, etc. Use the input pins to receive information from the machine, like a limit switch to provide travel limits for each axis.
This tutorial will show you how to interface your Spindle Controller with Mach 3. This will turn the spindle on or off when Mach 3 gets a M3 or M5 command. In order to complete this setup you will need the following: a spindle, VFD spindle controller, parallel breakout board with relay, computer with parallel port and Mach 3.
Open the front panel on the VFD. Connect two wires long enough to reach your breakout board to the terminals labeled FOR and DCM.
On the breakout board connect the wires to the S and P terminals.
On Mach 3 -> Config -> Ports and Pins -> Spindle Setup -> Relay Control set the Clockwise(M3) Output # to the Output number of your choice. We have it shown here as Output # 1.
On Mach 3 -> Config -> Ports and Pins -> Output Signals make sure that Output # 1 is enabled, the port # is set to 1 and the Pin Number to the pin 16 which controls the onboard realy.
We need to program the VFD to receive the run command from and external source. Press PRGM. This will display Pd000. Press the up arrow to change to Pd001. Press SET. The display will read 0. Press the up arrow to change the value to 1. The VFD is now programmed for external control for run commands.
Now you should be able to turn on and off the spindle by pressing the "Spindle CW F5" button on the bottom right of the Mach 3 control window.
Relay Operation: The relay on the breakout board is like having an automatic switch that can be triggered by g-code M3/M4 and M5. As shown in the picture, there are three connections for the relay: P, S and O. The P is the general connection. If you want to use the relay, there will always be a wire in the P terminal. The S and O are the other terminals that you may use. The S a normally open connection to P and O is a normally closed connection to P. In other words, the connection between P and S will only connect together if the relay is active and will be unconnected if the relay is not active.
Pin #16 will control the relay from the control software such as Mach3 or Linuxcnc. For instance, in Mach3, go to config -> ports and pins -> click on the output signals tab and enter the pin number 16 on the signal that you wish to control. To connect the desired output signal to an actual function, click on the spindle setup tab and specify the output number that you applied the pin #16 (under relay control, or flood mist control).
Example: if you want to control a router from the relay from the AC line (white = neutral, black = live and green = ground), understanding that the neutral and live create the completed circuit, either the black or the neutral can pass through the relay. Let's use the neutral wire as an example. The live wire would be cut and one end of the cut would be secured into the P terminal and the other cut end would be secured into the S terminal (use the O terminal if you want a normally closed connection). The live and ground wire would be uncut and travel from the plug to the router.
The relay is non latching, which means that the relay is activated while current is applied to the relay. for instance, if you need the connection between P and S to be connected, then the signal to the relay must be live the entire time, which is typical with most relays.
The typical connection that is made with this breakout board is as follows:
Pin 2 terminal is wired to the X-axis driver CP- terminal
Pin 3 terminal is wired to the X-axis driver CW- terminal
5V terminal is wired to the X-axis CP+ and CW+
Pin 4 terminal is wired to the Y-axis driver CP- terminal
Pin 5 terminal is wired to the Y-axis driver CP- terminal
5V terminal is wired to the Y-axis CP+ and CW+
Pin 6 terminal is wired to the Z-axis driver CP- terminal
Pin 7 terminal is wired to the Z-axis driver CP- terminal
5V terminal is wired to the Z-axis CP+ and CW+
The extra output terminals can be used for other axes or to control devices, like routers and spindles.
In Mach3 or other control software, the low active should be enabled for the step. This is not necessary for the direction unless the axes is moving in the wrong direction.
Enter the numbers associated with the pin numbers above in Mach3 (config -> ports and pins -> motor outputs) or other control software.