the InTurn 4th Axis Mill/Turn Motor Control System User manual

InTurn™
4th Axis Mill/Turn
Motor Control System
Generation II
Installation Instructions
Featuring:
External High Speed DSS
Additional Serial Port (optional)
Smooth RPM Ramping
On-Screen Parameter Entry
Separate External Power
Matched Interface Board
400khz Differential Signals
Integrated Swapaxis function
Digital Signal Synthesizer
Stackable with companions
© 2012,13,14 www.theCUBEstudio.com -Rev 34 4/21/2015
™
the

2
Contents
Introduction:............................................................................................................................................................ 4
MACH3 new PROFILE creation:........................................................................................................................... 5
Download, UnZIP and Copy Files:......................................................................................................................... 6
MACH3 Brain Programs ........................................................................................................................................ 7
Drivers..................................................................................................................................................................... 8
Install the Arduino Drivers (only if this is a new install) ................................................................................... 8
Configuring MACH3.............................................................................................................................................. 9
Tell MACH3 to use the new screens:................................................................................................................. 9
Tell MACH3 to use the new Brain Programs:.................................................................................................... 9
Tell MACH to use the included Macro Pump.................................................................................................. 10
Set up ModBus in MACH: ................................................................................................................................... 11
ModBus notes:.................................................................................................................................................. 11
Enter ModBus Parameters ................................................................................................................................ 12
Test ModBus Communication with the InTurn™ Controller: ........................................................................ 13
Input/Output ASSIGNMENTS............................................................................................................................. 15
Hardware and Wiring............................................................................................................................................ 18
4th axis HOME INDEX SENSOR connection:................................................................................................ 18
Controller Combo Board Functions.................................................................................................................. 18
PRE-WIRED CONNECTIONS: InTurn™ controller to combo board........................................................... 19
Connect wires to Your Servo Drive:................................................................................................................. 19
Connect wires to Your Break Out Board:......................................................................................................... 19
‘A’ Axis STEP (color choice and Pin number choice by User) ................................................................... 19
‘A’ Axis DIRection....................................................................................................................................... 19
Connect wires to a 5 Volt DC power supply. ................................................................................................... 19
5V Power (Color choice by user –Red is suggested)................................................................................... 20
POWER GROUND (color choice by user –Black is Suggested)................................................................ 20
Adding your system Parameters into the InTurn™ Controller............................................................................. 21
AutoConfigure .................................................................................................................................................. 21
* Maximum motor RPM –this is the motor itself and not the 4th axis spindle............................................ 21
* Encoder resolution. This need to be in ‘counts’ or ‘steps’ and not ‘lines’ ................................................ 21
* Main Drive Ratio –this is the belt ration without double reduction (back gear). ..................................... 21
* Back Gear Ratio –borrowing the term from lathes, ‘Back Gear is the extra............................................ 21
*Drive Multiplier –many drives have step multipliers or ‘electronic gearing’. .......................................... 21
Addendum A........................................................................................................................................................ 23
Release Notes.................................................................................................................................................... 23

3
Addendum B......................................................................................................................................................... 26
Listing of Provided Macros .............................................................................................................................. 26
Addendum C......................................................................................................................................................... 27
Definitions......................................................................................................................................................... 27
CNC Terminology: ....................................................................................................................................... 27
Computer Terminology:................................................................................................................................ 27
InTurn™ Terminology: ................................................................................................................................ 28
MACH Terminology:.................................................................................................................................... 29
Servo Motor Terminology: ........................................................................................................................... 30
Signals and Hardware Terminology:............................................................................................................ 30

4
Introduction:
At the end of this document is an addendum that provides both the definition and a short description
of the long list of ‘keywords’ used in CNC and also in General Digital Communications.
It is not necessary to understand all of the terms used in this document since each task is presented
with the specific information you will need to provide and also the specific points where you need to
enter that information.
For those who would like a better understanding of the underlying processes provided by the device
they are installing as well as the device they are installing it on, each technical term that is blue in the
text will have a corresponding definition and brief description in the addendum. Often, only this little
bit of extra information can make a mysterious topic far more comprehendible.
The InTurn™ 4th axis Motor Control System is designed specifically to provide Mill/Turn capabilities
for Mach3 and Mach4 CNC control Software for any CNC mill.
Mill/Turn is a capability of high-end Machining Centers that have a starting price tag around
US$100,000, so it is a very significant achievement to bring some of those capabilities to an existing
benchtop of full size CNC mill for under US$5,000.
Mill/Turn requires the 4th axis to have the capability to spin continuously at high speed with a
significant amount of power over a wide range of speeds, and ALSO have the ability to stop spinning
and return to the conventional indexing process. To be useful as a CNC add-on capability, all of this
has to be controllable by the CNC system itself with minimal or no intervention by an operator.
While MACH software provides for indexing on a rotary axis, it has no ability to spin that axis
continuously. The InTurn™ 4th axis Motor Control System adds that basic capability and a lot more,
all controllable both from custom on-screen controls and also via macros embedded in the G-code for
a fully automated CNC process.
So let’s get on with the Installation!
Note: In the text, where the name of a parameter will vary from one system to another, or from one
version to another, the variable portion is represented by ‘placeholders’ using ‘xx’ to represent
numbers and square brackets around a descriptive word like ‘[date]’ to represent the variable part of a
filename or folder name. The actual name will contain the number or date, for example ‘COM10’ or
‘InTurn™Parameter041215.brn’

5
“Interviews are good if you want to be an actor because they raise your profile.” - Jack Gleeson
MACH3 new PROFILE creation:
Using the MACH ‘loader’ to start MACH, make a new profile by ‘cloning’ whatever profile you are
currently using. Name the new profile ‘InTurn™’.
Close Mach3 and restart using the new profile name. You can do this one of two ways:
1) Start Mach3 by starting the Mach3 Loader program and selecting the InTurn™ profile
2) Create a shortcut that starts Mach3 while automatically using the InTurn™ profile.
To create a Shortcut, follow these steps:
A) Using a RIGHT click and hold, drag the file C:\Mach3\Mach3.exe desktop.
B) On release of the mouse button, you will be presented with choices. Select ‘Shortcut’
C) Locate the new shortcut on your desktop and RIGHT click on the icon
D) Change the parameters to match the following screen shot:
All of your MACH3 settings should be retained in this new profile. Now we will change or add those
that pertain to the new InTurn™ controller and screen set.

6
Download, UnZIP and Copy Files:
Files are obtained by downloading. Links will be provided via e-mail for new controllers,
updates or upgrades.
Using the provided link, download the zip file and move it into C:\ and then unzip the file.
The files will be unzipped into folders that match the corresponding MACH folder name except that
the names have the prefix ‘InTurn_’ added. The InTurn files can be safely stored in these folders
since MACH does not recognize the folder names and therefore will not overwrite them.
Simply copy the entire contents of the unzipped ‘InTurn_[name]’ folders into the matching Mach
folders. For example, copy all of the files in “InTurn_MillBitmaps” into the \Mach3\Bitmaps\MillBitmaps
folder. Do the same with all of the new InTurn folders that appear after unzipping the file.
In the end, you need to have:
New macros from “InTurn_Macros” into the directory \Mach3\macros\InTurn
Note: Mach has a special macro named ‘HiddenScript.m1s which contains ALL of the macros
associated with the screen controls. This is a reserved name (cannot be changed) so there is no way
to know the version of the macro or what screen it goes with. For this reason, the InTurn™ version is
named ‘HiddenScript[date].m1s’. Do not change the name of this file. Instead, copy the file, for
example ‘HiddenScript012514.m1s’ into the Mach3\macros\InTurn folder and then change the name
of that file by removing the date.
Note: Some versions of MACH3 will unexpectedly overwrite the entire macro folder without warning
or notice. This will stop the InTurn™ from functioning. The remedy is to copy the macros from your
backup; “InTurn_Macros’ into the \Mach3\macros\InTurn folder again and then remove the date
from the name of ‘HiddenScript[date].m1s”.

7
MACH3 Brain Programs
“Why, I outta BRAIN ya” – the three Stooges
Copy the following from InTurn_Brains into C:\Mach3\Brains
InTurn4thAxis[date].brn
InTurnE-stop[date].brn
InTurnAxisFraction[date].brn
InTurnParam[date].brn
Note: for these brain programs, the date can be left in as part of the file name.
Later, you will activate the brains using the entire name including the date.
“Everyone can do simple things to make a difference, and every little bit really does count.” - Stella McCartney
Screen Bitmaps from “\InTurn_Bitmaps”into “\Mach3\Bitmaps\MillBitmaps”
Note: after copying the files into the above directory, look in the folder and there should be Cube
Studio specific graphics similar to those shown below.
There is one exception to the folder naming convention used in the InTurn™ distribution.
Copy the screen set ‘\InTurn_Screenset\InTurn1920[suffix].set’ into C:\Mach3
Note: The suffix is typically two letters, but in any case, use the actual filename as it
appears in the unzipped folder.

8
Drivers
“A careful driver is one who honks his horn when he goes through a red light.” - Henry Morgan
A folder named ‘InTurn_Drivers’appears after unzipping;
Install the Arduino Drivers (only if this is a new install)
Plug in the USB cable to any USB port on your computer.
Windows should complain about the new USB device.
Tell windows to look in the folder:
C:\InTurnMotorControllerDist2015-xx\InTurn_Drivers
Note: Bolded numbers are year and rev and may be different than shown.
Windows will find and install the drivers then be happy with the new USB device.
To determine which COM number the driver created, use the following steps
Make sure MACH3 is NOT running.
Power OFF the InTurn™ Controller.
Power ON the InTurn™ Controller.
On the menu bar at the lower left of the WINDOWS screen, click the following sequence:
Start->Control Panel -> System -> Hardware (tab) -> Device Manager (button) -> Ports (COM & LPT)
There should be a ‘Communications Port’ Identified as Arduino Mega and a COM# after it. Write the
port number of your InTurn™ Controller below. You will need it later.
___________ InTurn™ Communication Port Number

9
Configuring MACH3
“I've always been bossy.” - Shirley Temple
Tell MACH3 to use the new screens:
At the top of the MACH screen click on ‘view’, then ‘load screens’ then navigate to where you copied
‘InTurn1280IY.set’ and select it. The new screen should appear. Close Mach3 and restart it.
Tell MACH3 to use the new Brain Programs:
On the MACH3 screen, click on Operator. Choose Brain Control from the drop down list.
Find ‘InTurn4thAxis[date].brn’ on that list and click on it to highlight it.
If that name does not show up on the list, the file is probably in the wrong place.
Brain programs must be located in the folder . . . \Mach3\Brains
With the name highlighted, click the enable box.
Now do the same with ‘InTurnE-stop[date].brn’
And also with InTurnParam[date].brn
And lastly with InTurnAxisFraction[date].brn
Note: other listings in the window will not be related to the InTurn™.
Now click the OK button. Close Mach3 and restart it.

10
Tell MACH to use the included Macro Pump.
Check the box next to ‘Run Macro Pump’ on this ‘General Configuration’ screen accessed from the
‘Config’ drop down on the main MACH screen.
Add ‘M4444’ to the end of whatever is in the Initialization String.
Note: Mach will only run one ‘M’ code in this String, so if there is already an ‘M’ code, it will either
have to be removed or combined with the M4444 macro.

11
Set up ModBus in MACH:
“Setting goals is the first step in turning the invisible into the visible.” - Tony Robbins
First, it is helpful to understand what ‘ModBus’ is and also what it is not.
It is not something extra that you have to buy and install on your computer.
‘ModBus’ refers to an interface standard just like ‘serial’, ‘parallel’, ‘USB’, ‘Ethernet’, etc.
The physical connection varies, and in this case, the connection is made using any
normal USB port on your computer.
However, ‘ModBus’ is not a physical thing. It is a set of rules. When two devices follow
the same rules, they can communicate and send information back and forth.
The speed and capacity of a ‘ModBus’ setup depends on what kind of hardware it is
running on and what kind of ‘topology’ (serial, Ethernet, etc.) is being used.
Second, you just need to know the steps to take to set up your ModBus.
ModBus notes:
MACH3 ModBus starts automatically when MACH3 starts and it talks to the controller thru COMxx.
While xx can be any number, it must be the SAME for both the controller and ModBus, and that will
only happen if the correct sequence is followed in the startup.
In the explanation below, COM8 is used as an example for clarity, but remember that your number
may be different. It is important to recognize that these are not actual physical ports, but are ‘virtual’
ports created on-the-fly and reside in the computer’s memory ‘emulating’ a real port.
IMPORTANT: While plugged into the USB port, the controller will automatically create the
NEXT AVAILABLE COMxx in the computer EACH time it is powered on, so the COM number
that is created depends on the conditions AT THE TIME the controller is powered on.
In this example, COM8 is the next available so the Controller creates COM8. There is no physical
COM8, but the ‘fake’ COM8 behaves as if it was real.
In the configuration, MACH was told to use COM8 for ModBus communication, so if MACH3 is
started BEFORE the controller, it will still open ‘COM8’even though there is no controller present.
If the controller is started AFTER MACH is already running, when the controller scans for the next
available COMxx it will find COM8 is already ‘IN USE’ and will, therefore, skip past it and will create
COM9. If this happens, MACH and the Controller will be on different ports, so . . no talkie.

12
Enter ModBus Parameters
First go to config (pulldown) and in the first tab named ‘Port Setup and Axis Selection’, in the lower
right of the screen, check the ‘ModBus Input/Output Support’ checkbox.
ModBus Plugin Supported and TCP ModBus support should NOT be checked.
Note; the port Addresses and Enabled checkboxes may be set differently on your system. Do not
reset them to match this image. Those are not associated with the InTurn™ Controller.
Note: Do not change your Kernel Speed to match the image. It is also unrelated to the InTurn™
Controller and will likely be different on your system.
Close and restart MACH3.
Second, from the top of the MACH screen, go to Function Cfg’s and
choose Setup Serial ModBus Control from the drop down.
Change the following:
Port Num:Enter the InTurn™ Communication port number for your controller
(as determined earlier in the Installation process)

13
Baud Rate: 57600 8-1-N
Timeout 100
Input top line only
On <checked>, Slave Addr: 1, #Registers: 25, Holding <checked>
Output top line only
On <checked>, Slave Addr: 1, #Registers: 25,Holding <checked>
Update Frequency 60
Click Apply before leaving the config screen!
Close Mach3. Restart Mach3:
Test ModBus Communication with the InTurn™ Controller:
With MACH3 closed, Power up the InTurn™ Controller
Start Mach3 - be sure to use the InTurn™ Profile.
Click Function Cfg’s and choose Setup Serial ModBus Control from the drop down.
Click Test ModBus. On the next screen, make sure the Port is correct and click Open.
The Status box should say ‘no error’. Click ‘Read’and a number should appear in the window.
The Status box should still report ‘no error’.

14

15
Input/Output ASSIGNMENTS
“Management is getting people together to figure out how to transform inputs into outputs.”
- Clayton Christensen
Note: The actual pin numbers and I/O # will vary from one system to another.
Note: The physical pins are defined as either output or input. These are shown at the bottom of the
MACH configuration screens for Input and Output respectively.
If there is a conflict (an I/O # described below is already in use), then simply select any available
OUTPUT# and change the configuration accordingly. Fill in the pin number that you use.
Pin OUTPUT# I/O Active Function
_____ OUTPUT#18 Out High Spindle lock solenoid
The following do not apply to all drives:
____ OUTPUT#19 Out High Servo Enable (for drives with this feature)
_____ OUTPUT#17 Out High PC (Proportional Control, industrial drives only)
_____ OUTPUT#12 Out High TL1(Torque Limit, industrial drives only)
_____ OUTPUT#20 Out Low Surrogate E-stop signal
Notes on the OUTPUT#:
*You will want to use the Enable/Disable feature of your servo drive (if it has this feature).
*Some drives output an alarm (E-stop) when they are disabled and some do not.
*If your drive can be disabled, you do not want your CNC to E-stop every time you disable the drive,
so this surrogate signal is provided to splice into the normal E-stop line from the drive.
*This signal only comes on when the drive is disabled so it can be used as a ‘temporary’ E- stop
signal to prevent the system from stopping while the drive is disabled.
*When the drive is enabled, this signal is OFF and the drive provides the E-stop signal and can E-
stop the CNC if there is a problem.

16
A major difference between the mill spindle and the InTurn™ spindle is that the InTurn™ has a heavy
spindle with a heavy mounting flange and can have an even heavier chuck or faceplate and heavier
yet workpiece.
This mass takes time to accelerate from a dead stop and MACH has no mechanism to account for
this. The result can be a cutting tool advancing into the workpiece far ahead of the workpiece
reaching its target speed. This is most prevalent in running G-code where the InTurn™ spindle is
being switched on and off via embedded macros. The consequence of a timing error like this is
generally not good.
The InTurn™ Motor Control System is specifically designed for the features and needs of the unique
Mill/Turn capabilities the InTurn™ brings with it. The controller’s spindle control macros work with the
Controller which in turn controls MACH in order to coordinate the movement of the cutting tools with
the spindle readiness.
This feature is accomplished by the controller preventing MACH from moving any axis until the
InTurn™ spindle has reached the commanded speed. The communication with MACH requires an
‘INPUT’, but the previous hard wire connection for this signal has been moved to the ModBus, so all
that is needed is configuring the input a certain way and the rest is handled by the Controller.
MACH has a type of signal that is termed ‘emulated’and this must be selected for the INPUT being
discussed or it will not function.
In the ‘Ports & Pins’ configuration panel:
*click to activate INPUT4
*leave the pin numbers at zero.
*click the ‘emulated’ column
*make sure you click on the ‘APPLY’ button before closing this window.

17

18
Hardware and Wiring
4th axis HOME INDEX SENSOR connection:
As of 11/15/14, the InTurn™ has inherited a new sensor developed for the InTurn™ Mill Spindles.
This sensor is on a small PC board and required support components are located on the board so a
simple wire hook up is all that is required.
Connect wires from 4th axis home sensor to BOB.
Connect the RED sensor power to 5V from the BOB.
Connect the BLACK sensor ground to BOB ground.
Note: for 5V BOB, both sides of the sensor can be fed from the same 5V.
In this case, connect the RED and YELLOW wires both to the 5V supply.
Connect the WHITE sensor output to any available BOB input pin.
Go into the MACH ‘Configure Ports and Pins’ and assign the BOB input pin that was used to the ‘A’
Axis home and check ‘enable’ and ‘active high’.
Remove the 4th axis cover plate and rotate the spindle until the tiny
Shutter hole is within the sensor arms.
Move the hole slowly past the sensor and observe the A home LED on
The MACH diagnostic screen. It should light when the shutter hole
passes the sensor.
Note: there are two types of sensors. Those intended for more than 5V operation feature a Solid
State Relay on the switched side. This is a small black 6 pin chip in the center of the PC board. These
Sensors can switch up to 60V and the signal voltage is supplied on the YELLOW (or GREEN) wire
and is switched on and off to the WHITE wire.
The second type of sensor is identical except there is simply a jumper where the small black 6 pin
chip would have been. If the sensor is switching a 5V signal (from a typical BOB that would be used
with MACH3), then there is no need for a relay because the sensor is able to switch a 5V signal.
In all cases, the LED side of the sensor is 5V DC and the BLACK ground wire connected to the
SAME source as the 5V DC power is taken from.
Controller Combo Board Functions
The InTurn™ controller includes a remote circuit board that is typically mounted inside the
CNC electronics enclosure. It is important to have the wires from the BOB to the board as
short as possible. The board is not grounded by the mounting. Provide a separate ground as
shown in the diagram.
This board combines several functions onto one compact unit:

19
Digital Signal Synthesizer (clean Megahertz range pulse stream)
SwapAxis function (switches the InTurn™ from Indexing to Turning)
Line Driver (creates differential signals for Step and Dir)
PRE-WIRED CONNECTIONS: InTurn™ controller to combo board
See the attached wiring diagram
Connect wires to Your Servo Drive:
Step+ and Step- differential pairs. Use twisted pair wire.
Direction + and Direction - Shielded CAT6 wire recommended.
Note: some drives do not support differential pairs.
For those drives use only the +signals.
Leave the –terminals unconnected
Wire with both foil and braided shielding is recommended.
NOTE: Do NOT run power and signal wires in the same cable.
Example: the two twisted pairs that are used for the STEP and DIR should be in a separate shielded
cable. This is especially important with 24V industrial drive electronics.
NOTE: Operation of the high power 24V signals in the same cable as differential signals will induce a
spike in the STEP/DIR wires that will disable the Digital Signal Synthesizer on the InTurn™
Controller’s interface combo board.
Connect wires to Your Break Out Board:
‘A’ Axis STEP (color choice and Pin number choice by User)
Select any available OUTPUT pin on your BOB
Set MACH to output the A axis Step on this pin.
Wire from this BOB Pin TO the A Step pin on the Combo Board
‘A’ Axis DIRection
Connect in the same way as the Step Pin above
Connect wires to a 5 Volt DC power supply.
The InTurn™ motor controller draws more power than early USB ports can supply, so it must be fed
separately. The power supply wire in the InTurn™ USB cable is severed to prevent an overdraw
which will shut down your PC’s USB port(s).

20
The most convenient place to power the unit is from the Combo board as shown on the diagram.
Select a source of 5VDC and connect it to the appropriate pins on the Combo board, or connect to
the pigtails that are already on those pins as you receive the product.
5V Power (Color choice by user –Red is suggested)
A preferred source for clean filtered 5VDC is any hard drive power plug on your computer’s power
supply. These are the red and the black wire next to it.
You can take power from pins on your BOB if the BOB can supply at least 150mA.
You can use a separate filtered and regulated 5Volt DC supply. In this case, you MUST connect a
wire from the power supply ground to the PC ground. If you do not do this, current from the power
supply can travel over the USB cable seeking ground (this is called a ground loop). This will
completely disrupt the USB communication.
POWER GROUND (color choice by user –Black is Suggested)
Be sure to connect the InTurn™ power ground to the SAME source that you got the 5VDC power
from.
Table of contents
Popular Control System manuals by other brands

Castel
Castel XELLIP XEMED-P quick start guide

Exhausto
Exhausto VEX240HX installation guide

Lathem
Lathem PC600 Series quick start guide

Philadelphia Scientific
Philadelphia Scientific iBOS Pro 6 Series installation manual

Valeo
Valeo SC600 Revo-E Byd Hybrid operating instructions

Scarecrow
Scarecrow B.I.R.D. SYSTEM User instruction manual