LinearMotorHost User Guide
This document serves as a guide for controlling and debugging motors using LinearMotorHost.
LinearMotorHost is a debugging tool designed for closed-loop motors, specifically for in-depth parameter setting and visual debugging of MagnetoX motors. With this tool, you can optimize the motor's motion state.
This document will cover the following topics:
Download the LinearMotorHost PC software:
Download Link
USB Driver (CH340 Driver):
Download Link
Prepare a mini USB data cable.
Purchase Link
After downloading the CH340 driver, double-click to install.
First, disconnect the printer's power supply, then connect the mini USB to the linear motor driver's mini USB port, and the other end to your PC.
Once the USB cable is connected, manually move the toolhead to the center of the PEI plate as shown in the image below:
At this point, power on the printer.
Open LinearMotorHost and go to System Settings > Connect Settings. On the right side, select the appropriate driver model and communication method as shown below.
Double-click the port number to complete the connection.
Once connected, click the real-time icon. At this point, if you lightly move the corresponding motor by hand, you can see the curve change on the display.
Motor parameter auto-tuning allows you to reset parameters to adapt to changes such as wiring, inductance, or load variations. After tuning, the motor's motion state will better match the current device status.
Click Device Control, and you will see the following interface:
Scroll down to find the Identification button, and click it.
Once initiated, the motor will automatically identify parameters such as load and electrical properties.
You can reference the sound of the process in this video:
Watch Video
After one-click identification is complete, click Save Parameters. Then, also click the save button on the left side.
After automatic identification, a low-order filter is usually enabled. You need to disable this filter as shown in the figure below.
Go to Device Control > Filter Settings, click Disable, which will disable the motor to allow changes to the left-side options.
Then set all Command Current Filter to No filter.
Next, set Low Frequency Vibration Filter to No filter as well.
Motor test runs are crucial to observe waveform patterns while adjusting specific parameters. Each adjustment should be followed by a test run to evaluate the motor's performance.
While the software is connected to the motor driver, go to Device Control > Trajectory > Current Mode > Position Mode.
After setting to Position Mode, scroll down, disable the motor, then enable Reciprocating Motion Switch (note that the motor must be disabled to switch modes).
Once the Reciprocating Motion Switch is enabled, the interface will look like this:
In the previous step, we disabled the motor. Now, manually move the motor's mover to one end.
Once moved, you will see the position value change in the software. This value indicates the motor's position:
Enter this Position Actual Value into the Target Position input box.
If the status box turns yellow when entering data, it means the data hasn't taken effect. Press the "Enter" key to confirm, and the input box border will turn blue.
Next, move the mover to the other end.
Enter the Position Actual Value into the Target Position 2 input box.
After setting the positions, adjust the movement speed and acceleration as shown below. Enter the desired test values. When unloaded, keep the acceleration below 30,000.
In position #2, set the pause time after reaching the target. A 100ms pause is recommended.
After completing the previous steps, scroll down to see the buttons below. First, click Enable, then click Send to start the reciprocating motion.
After starting the reciprocating motion, observe the waveform display to monitor motor behavior. You can adjust the speed and acceleration in real-time as shown below.
Go to the position shown below to adjust the motor's maximum current limit:
In the position below, modify the motor's maximum speed limit.
After modification, click Deliver Configuration, then click Save Parameters on the left side.
Sometimes, the auto-detected inertia value may not be optimal. You can adjust the inertia value here for better performance:
The motor includes three main controllers: Current Controller, Position Controller, and Speed Controller. You can find them in the following location:
For a detailed description of each parameter's meaning and impact, please refer to this wiki: https://wiki.peopoly.net/en/magneto/magneto-x/parameters-introduce
Firmware like Klipper and Marlin use pulse/direction signals for motion control. We need to configure the linear motor to support this signal type.
First, go to Device Control > Trajectory Planner > Current Mode > Plus Control Position as shown below:
After completing this step, configure the following parameters:
Pulse Input Resolution affects the distance moved per pulse. Setting it to 20,000 means one pulse equals 1 µm of movement.
If you want one pulse to move the motor 4 µm, set Pulse Input Resolution to 5,000.
The Smoothing Factor affects motion smoothness. Higher values result in smoother motion around sharp corners, but may produce curved edges. Lower values may cause noise, but this won't affect motion precision.
Once configured, click Save Setting, then click Save Parameters on the left side.
After completing all settings, refer to steps 1 to 6 below to set the motor to auto-initialize after power-on.