Difference between revisions of "Mach4 SimpleMotion drive plugin"

From Granite Devices Knowledge Wiki
Jump to: navigation, search
[checked revision][checked revision]
(Mach4 installation & configuration)
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[http://www.machsupport.com/software/mach4/ Mach4] is a CNC motion control software developed by Newfangled Solutions. The Mach4 SimpleMotion drive plugin is needed to run motor drivers connected to [[SimpleMotion V2|SimpleMotion]] bus with Mach4.
+
[[Mach4]] is a CNC motion control software developed by Newfangled Solutions. The Mach4 SimpleMotion drive plugin is provided by Granite Devices to run any [[SimpleMotion V2|SimpleMotion]] compatible motor drivers, such as [[IONI]] or [[ATOMI]] with [[Mach4]].
 +
[[File:mach4.png|thumb|Mach4 main screen]][[File:Mach4 plugin atomi lohkokaavio.svg|thumb|Typical usage of Mach4, Mach4 plugin and [[ATOMI]] drive]]
  
== '''Requirements''' ==
+
{{Info|The plugin has been developed and tested with industrial version 4.2.0.3481. Hobby version 4.2.0.3804 does not work.}}
 +
 
 +
== Features ==
 +
The plugin seamlessly integrates Granite Device drives into Mach4 CNC software. The supported features are:
 +
* Control up to 6 independent motor axes
 +
* Direct USB connection to drives by using with highly reliable built-in FTDI USB chipset on the drives
 +
* Uses non-real-time dependent [[Buffered motion stream in SimpleMotion V2]] method to feed trajectory points to drives
 +
* Support axis homing/referencing with built-in [[Homing|homing functions]] of the drive, including [[Hard-stop homing]]
 +
* Support spindles in various operating modes
 +
** Velocity controlled spindle
 +
** Position controlled spindle with rigid tapping
 +
* Continuous error & fault monitoring on communication link and on each drive individually
 +
 
 +
== Requirements ==
 
The following things are needed for building a CNC machine using Mach4 and motor drivers connected with SimpleMotion bus:
 
The following things are needed for building a CNC machine using Mach4 and motor drivers connected with SimpleMotion bus:
 
* [[ATOMI|Atomi]], [[IONI Servo & Stepper Drive|IONI]] or [[ARGON Servo Drive|Argon]]-based motion system, e.g. CNC mill, connected with [[SimpleMotion V2|SimpleMotion]] bus
 
* [[ATOMI|Atomi]], [[IONI Servo & Stepper Drive|IONI]] or [[ARGON Servo Drive|Argon]]-based motion system, e.g. CNC mill, connected with [[SimpleMotion V2|SimpleMotion]] bus
* Windows PC
 
 
* Mach4 software + license
 
* Mach4 software + license
 
* SimpleMotion adapter depending on selected motor drivers
 
* SimpleMotion adapter depending on selected motor drivers
 +
* [[Granity]] software for configuring the motor drivers
  
==== '''Mach4 installation''' ====
+
== Motor driver configuration with Granity software ==
* Download and install Mach4
+
'''NOTE: The SimpleMotion motor drivers must be configured before trying to control them with Mach4!'''
* Download the plugin files to the Mach4 plugin folder
+
* Read the Mach4 installation, configuration and operation [http://www.machsupport.com/help-learning/product-manuals/ manuals] before use
+
  
== '''Configuration''' ==
+
This section shows the basic configuration for motor drivers with [[Granity]] software. More support for using this software can be found from the [[Granity user guide]]. The following subsection titles are links to corresponding guide pages. Download the Granity software from its wiki page, launch it and follow these steps:
  
==== '''Motor driver configuration''' ====
+
==== [[Granity user guide/Connect|Connect to the motor driver]] ====
Configure the motor drivers with [[Granity]] software:
+
Connect to a motor from the "Connect" tab by selecting the interface device, and clicking "Connect to drive".
* Motor specific settings
+
* Set position mode for every driver except for possible velocity-controlled spindle motor
+
* Set suitable max. speed
+
* Configure homing for all possible axes to ensure the positioning accuracy
+
* Set soft travel limits
+
  
==== '''Mach4 configuration''' ====
+
[[File:GranityConnect.png|400px]]
1. Open the Mach4 Configuration dialog
+
[[File:MachConfigurationTab.png|400px]]
+
  
 +
From the opening list, select a motor driver and click "Open"
  
2. Enable the SimpleMotion drive plugin from the plugins tab.
+
[[File:GranityConnectSelectDriver.png|400px]]
 +
 
 +
==== [[Granity user guide/Goals|Goals]] ====
 +
The goals tab contains the driver function, input signal, motion dynamics, homing and soft limit settings.The following table shows the most important settings in the goals tab. All settings are explained in Granity software in more depth.
 +
{| class="wikitable"
 +
!Setting
 +
!Value
 +
|-
 +
|{{param|CM}}
 +
|Position control in motion drivers, position or velocity control in spindle driver
 +
|-
 +
|{{param|CEN}}
 +
|Enable this if you don't want the motor driver to be enabled automatically during the startup
 +
|-
 +
|{{param|CEI}}
 +
|Standard
 +
|-
 +
|{{param|CRI}}
 +
|Serial only
 +
|-
 +
|{{param|HME}}
 +
|Select "Homing on external command" if you want to home the axis from Mach4 GUI
 +
|}
 +
If homing is enabled, the position soft limits can also be used to limit the axis motion. The soft limits can be set by following:
 +
# Home the axis by pressing button "Start homing now". After homing, the axis stops and it's setpoint is zero
 +
# Set the position low limit to zero
 +
# Go to Testing tab and find a good high limit position by incrementing the setpoint
 +
# Read the current setpoint, go to the Goals tab and set it to the position high limit
 +
 
 +
==== [[Granity user guide/Machine|Machine]] ====
 +
The machine tab lets you to choose the axis type and scale, the motor type and properties and the feedback device type and properties. The values can be anything depending on the system, so any good values can't be shown here.
 +
 
 +
==== [[Granity: Tuning|Tuning]] ====
 +
In the tuning tab you can set the torque, velocity and position controller settings.
 +
 
 +
==== [[Granity: Tuning|Fault limits]] ====
 +
In this tab, you can set the fault triggering levels and tolerances
 +
 
 +
==== [[Granity user guide/Testing|Testing]] ====
 +
This tab lets you to test your motor by changing its setpoint. It also shows the device state.
 +
 
 +
'''NOTE: Ensure that the motors work correctly before trying to control them with Mach4!'''
 +
 
 +
== Mach4 installation & configuration ==
 +
 
 +
==== Mach4 installation ====
 +
* Download and install Mach4
 +
* Download the plugin files to the Mach4 plugin folder that is located inside of its installation folder (i.e. C:\Mach4\Plugins). The download link can be found at the end of this page.
 +
* Read the Mach4 installation, configuration and operation [http://www.machsupport.com/help-learning/product-manuals/ manuals] before use
 +
 
 +
==== Open the Mach4 Configuration dialog ====
 +
[[File:MachConfigurationTab.png|400px]]
 +
 
 +
====  Enable the SimpleMotion drive plugin from the plugins tab ====
 
[[File:MachConfigurationPlugins.png|800px]]
 
[[File:MachConfigurationPlugins.png|800px]]
  
 
The program should ask to restart Mach4 after enabling the plugin. Restart Mach4 before continuing.
 
The program should ask to restart Mach4 after enabling the plugin. Restart Mach4 before continuing.
  
Select The SimpleMotion drive plugin to the motion device
+
==== Select the SimpleMotion drive plugin to be used as a motion device ====
 
[[File:SelectMotionDevTab.PNG|400px]]
 
[[File:SelectMotionDevTab.PNG|400px]]
 +
 
[[File:SelectMotionDev.png|400px]]
 
[[File:SelectMotionDev.png|400px]]
  
 +
==== Configure the motors ====
 +
Open the Mach configuration again, and select the motors tab.
  
 
+
Select each used motor and configure them as following:
* Motors
+
* The motor indexes are always one smaller than the SimpleMotion axis numbers. For example, Motor0 means drive 1 in the SimpleMotion bus.
** Counts/unit, velocity, acceleration, reverse
+
* How many steps the motors should move for each unit of measure
 +
* The maximum velocity of each motor
 +
* The maximum acceleration of each motor
 +
* Motors can also be reversed here
 
[[File:MachConfigurationMotors.png|800px]]
 
[[File:MachConfigurationMotors.png|800px]]
  
 
+
==== Axis mapping ====
* Axis mapping
+
Enable the axes used in your machine in the Axis Mapping tab. The following picture shows configuration for a 3-axis machine where the spindle motor is also controlled by Mach4. The axes X-C (0-5) are for motion axes, and any of the OB axes (6-11) can be used for controlling a spindle motor.  
** Select motors. The motor index numbers in Mach4 are one smaller than the motor driver numbers in the SimpleMotion bus. For example, Motor0 in Mach4 controls the motor driver 1.
+
* Enable used axes
** One OB (Out-of-Band) axis can be selected for being used as a velocity or position controlled spindle. An OB axis can be selected for position controlled spindle in the Mach4 spindle configuration, and for velocity controlled spindle in the SimpleMotion drive plugin configuration.
+
* The motor indexes are always one smaller than the SimpleMotion drive numbers. For example, Motor0 means drive 1 in the SimpleMotion bus
** Do not enable axes without motors
+
* Select a motor for each axis. Slave motors can also be set for an axis if they use more than one motor
 +
* Do not enable axes without motors
 +
* The spindle control type (velocity or position-controlled) will be set later
 
[[File:MachConfigurationAxisMapping.png|800px]]
 
[[File:MachConfigurationAxisMapping.png|800px]]
  
 
+
==== Homing / Soft limits ====
* Homing/SoftLimits
+
* Set the homing order. If some axes have the same number, they will be homed at the same time
** Set the homing order
+
* Enable soft limits for motion axes
** The homing direction is selected in Granity software, not here
+
* Set the soft limits to prevent axes from hitting their physical limits. If you don't know what to put here, you can also configure them later. NOTE: these soft limits are not same as the limits configured for the motor drivers in Granity software!
** Set home in place if needed
+
* The homing direction, offset and speed are selected in Granity software, the values here don't have any effect in motion.
** Set soft travel limits
+
 
[[File:MachConfigurationHomingAndSoftLimits.png|800px]]
 
[[File:MachConfigurationHomingAndSoftLimits.png|800px]]
  
 
+
==== Spindle configuration ====
* Spindle
+
* Set min. and max. rpm for the spindle motor if it is controlled by Mach4.
** Set min. and max. RPM.
+
* The max. rpm set here doesn't have effect to the real speed of velocity-controlled spindle. Running a velocity-controlled spindle by here configured max. speed runs the spindle motor at the maximum speed configured in the SimpleMotion drive.
** A position controlled spindle can be selected here if it's enabled in motors tab
+
* If the spindle is position-controlled, the spindle motor should be selected in the "Step/Dir Spindle Axis"-dropdown. The axis must be enabled and mapped before this.
 
[[File:MachConfigurationSpindlePos.png|800px]]
 
[[File:MachConfigurationSpindlePos.png|800px]]
  
 +
==== SimpleMotion drive plugin configuration ====
 +
Save the Mach4 configuration by pressing the OK button. Then open the SimpleMotion drive plugin configuration:
  
==== '''SimpleMotion drive plugin configuration''' ====
 
 
[[File:PluginConfigurationTab.PNG|400px]]
 
[[File:PluginConfigurationTab.PNG|400px]]
[[File:PluginConfiguration.PNG|600px]]
 
* FTDI port number, usually 0
 
* Buffer max fill percentage. Defines the percentage of the motor driver buffer used for buffering motion.
 
* Select a velocity-controlled axis to be used as a spindle
 
** To use an axis as a velocity-controlled spindle, enable it as an OB axis in the Mach4 settings and select the same axis from this list
 
  
== Other ==
+
Set the following settings. The default values work in most cases.
 +
* SimpleMotion V2 adapter FTDI COM port number
 +
* SimpleMotion V2 buffer max. fill percentage
 +
* In the case of using a velocity-controlled spindle, its axis should be selected here. The list shows only mapped and enabled axes that are not selected as position-controlled spindle
 +
[[File:PluginConfiguration.PNG|400px]]
  
==== '''Versions''' ====
+
Save the SimpleMotion drive plugin configuration by pressing "OK", and start using the software!
 +
 
 +
== Downloads ==
 +
 
 +
==== Versions ====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Version
 
!Version
Line 81: Line 151:
 
!Download
 
!Download
 
|-
 
|-
|0.1
+
|0.9.0b
 
|The first beta release
 
|The first beta release
|
+
|[[:File:M4SM.zip]]
 
|}
 
|}
  
==== '''Known issues''' ====
+
==== Known issues ====
 
* A possible small bump after disabling or stopping motion due to aborted buffered motion
 
* A possible small bump after disabling or stopping motion due to aborted buffered motion
  
==TODO==
+
=== Giving ideas, bug reports, general discussion===
{{param|CVL}}
+
To discuss about the plug-in and it's features, join the community at: https://community.granitedevices.com/t/mach4-granite-devices-motion-plugin-open-beta/1022
 
+
 
__FORCETOC__
 
__FORCETOC__
 +
 +
[[Category:ATOMI_features]]
 +
[[Category:Application]]
 +
[[Category:CNC]]
 +
[[Category:IONI_features]]
 +
[[Category:IONI_user_guide]]

Latest revision as of 18:39, 29 December 2018

Mach4 is a CNC motion control software developed by Newfangled Solutions. The Mach4 SimpleMotion drive plugin is provided by Granite Devices to run any SimpleMotion compatible motor drivers, such as IONI or ATOMI with Mach4.

Mach4 main screen
Typical usage of Mach4, Mach4 plugin and ATOMI drive

Features[edit | edit source]

The plugin seamlessly integrates Granite Device drives into Mach4 CNC software. The supported features are:

  • Control up to 6 independent motor axes
  • Direct USB connection to drives by using with highly reliable built-in FTDI USB chipset on the drives
  • Uses non-real-time dependent Buffered motion stream in SimpleMotion V2 method to feed trajectory points to drives
  • Support axis homing/referencing with built-in homing functions of the drive, including Hard-stop homing
  • Support spindles in various operating modes
    • Velocity controlled spindle
    • Position controlled spindle with rigid tapping
  • Continuous error & fault monitoring on communication link and on each drive individually

Requirements[edit | edit source]

The following things are needed for building a CNC machine using Mach4 and motor drivers connected with SimpleMotion bus:

  • Atomi, IONI or Argon-based motion system, e.g. CNC mill, connected with SimpleMotion bus
  • Mach4 software + license
  • SimpleMotion adapter depending on selected motor drivers
  • Granity software for configuring the motor drivers

Motor driver configuration with Granity software[edit | edit source]

NOTE: The SimpleMotion motor drivers must be configured before trying to control them with Mach4!

This section shows the basic configuration for motor drivers with Granity software. More support for using this software can be found from the Granity user guide. The following subsection titles are links to corresponding guide pages. Download the Granity software from its wiki page, launch it and follow these steps:

Connect to the motor driver[edit | edit source]

Connect to a motor from the "Connect" tab by selecting the interface device, and clicking "Connect to drive".

GranityConnect.png

From the opening list, select a motor driver and click "Open"

GranityConnectSelectDriver.png

Goals[edit | edit source]

The goals tab contains the driver function, input signal, motion dynamics, homing and soft limit settings.The following table shows the most important settings in the goals tab. All settings are explained in Granity software in more depth.

Setting Value
Control modeCM Position control in motion drivers, position or velocity control in spindle driver
Require software enableCEN Enable this if you don't want the motor driver to be enabled automatically during the startup
Electrical interfaceCEI Standard
Setpoint inputCRI Serial only
Homing enabledHME Select "Homing on external command" if you want to home the axis from Mach4 GUI

If homing is enabled, the position soft limits can also be used to limit the axis motion. The soft limits can be set by following:

  1. Home the axis by pressing button "Start homing now". After homing, the axis stops and it's setpoint is zero
  2. Set the position low limit to zero
  3. Go to Testing tab and find a good high limit position by incrementing the setpoint
  4. Read the current setpoint, go to the Goals tab and set it to the position high limit

Machine[edit | edit source]

The machine tab lets you to choose the axis type and scale, the motor type and properties and the feedback device type and properties. The values can be anything depending on the system, so any good values can't be shown here.

Tuning[edit | edit source]

In the tuning tab you can set the torque, velocity and position controller settings.

Fault limits[edit | edit source]

In this tab, you can set the fault triggering levels and tolerances

Testing[edit | edit source]

This tab lets you to test your motor by changing its setpoint. It also shows the device state.

NOTE: Ensure that the motors work correctly before trying to control them with Mach4!

Mach4 installation & configuration[edit | edit source]

Mach4 installation[edit | edit source]

  • Download and install Mach4
  • Download the plugin files to the Mach4 plugin folder that is located inside of its installation folder (i.e. C:\Mach4\Plugins). The download link can be found at the end of this page.
  • Read the Mach4 installation, configuration and operation manuals before use

Open the Mach4 Configuration dialog[edit | edit source]

MachConfigurationTab.png

Enable the SimpleMotion drive plugin from the plugins tab[edit | edit source]

MachConfigurationPlugins.png

The program should ask to restart Mach4 after enabling the plugin. Restart Mach4 before continuing.

Select the SimpleMotion drive plugin to be used as a motion device[edit | edit source]

SelectMotionDevTab.PNG

SelectMotionDev.png

Configure the motors[edit | edit source]

Open the Mach configuration again, and select the motors tab.

Select each used motor and configure them as following:

  • The motor indexes are always one smaller than the SimpleMotion axis numbers. For example, Motor0 means drive 1 in the SimpleMotion bus.
  • How many steps the motors should move for each unit of measure
  • The maximum velocity of each motor
  • The maximum acceleration of each motor
  • Motors can also be reversed here

MachConfigurationMotors.png

Axis mapping[edit | edit source]

Enable the axes used in your machine in the Axis Mapping tab. The following picture shows configuration for a 3-axis machine where the spindle motor is also controlled by Mach4. The axes X-C (0-5) are for motion axes, and any of the OB axes (6-11) can be used for controlling a spindle motor.

  • Enable used axes
  • The motor indexes are always one smaller than the SimpleMotion drive numbers. For example, Motor0 means drive 1 in the SimpleMotion bus
  • Select a motor for each axis. Slave motors can also be set for an axis if they use more than one motor
  • Do not enable axes without motors
  • The spindle control type (velocity or position-controlled) will be set later

MachConfigurationAxisMapping.png

Homing / Soft limits[edit | edit source]

  • Set the homing order. If some axes have the same number, they will be homed at the same time
  • Enable soft limits for motion axes
  • Set the soft limits to prevent axes from hitting their physical limits. If you don't know what to put here, you can also configure them later. NOTE: these soft limits are not same as the limits configured for the motor drivers in Granity software!
  • The homing direction, offset and speed are selected in Granity software, the values here don't have any effect in motion.

MachConfigurationHomingAndSoftLimits.png

Spindle configuration[edit | edit source]

  • Set min. and max. rpm for the spindle motor if it is controlled by Mach4.
  • The max. rpm set here doesn't have effect to the real speed of velocity-controlled spindle. Running a velocity-controlled spindle by here configured max. speed runs the spindle motor at the maximum speed configured in the SimpleMotion drive.
  • If the spindle is position-controlled, the spindle motor should be selected in the "Step/Dir Spindle Axis"-dropdown. The axis must be enabled and mapped before this.

MachConfigurationSpindlePos.png

SimpleMotion drive plugin configuration[edit | edit source]

Save the Mach4 configuration by pressing the OK button. Then open the SimpleMotion drive plugin configuration:

PluginConfigurationTab.PNG

Set the following settings. The default values work in most cases.

  • SimpleMotion V2 adapter FTDI COM port number
  • SimpleMotion V2 buffer max. fill percentage
  • In the case of using a velocity-controlled spindle, its axis should be selected here. The list shows only mapped and enabled axes that are not selected as position-controlled spindle

PluginConfiguration.PNG

Save the SimpleMotion drive plugin configuration by pressing "OK", and start using the software!

Downloads[edit | edit source]

Versions[edit | edit source]

Version Comments Download
0.9.0b The first beta release File:M4SM.zip

Known issues[edit | edit source]

  • A possible small bump after disabling or stopping motion due to aborted buffered motion

Giving ideas, bug reports, general discussion[edit | edit source]

To discuss about the plug-in and it's features, join the community at: https://community.granitedevices.com/t/mach4-granite-devices-motion-plugin-open-beta/1022