Liyuxun PLC Host

LYX MotionPLC Documentation

PLC HOST Controller User Manual

Complete English operating guide for the STM32F103 MotionPLC host software, including connection, task programming, operation controls, motion parameters, monitoring, debugging, configuration, and troubleshooting.

Software: VisionPickPlaceSTM32F103   |   Interface version: V2.92   |   Platform: Windows 7, Windows 10, and Windows 11
This manual covers the host software workflow excluding the vision section. Vision Coordinate, Intrinsic Calibration, camera, ROI, and vision calibration workflows are not included.

1. Before Use

  1. Make sure the STM32 firmware has been downloaded to the controller board. Check the power supply, emergency stop, limit switches, air and vacuum circuits, and mechanical clearance.
  2. Connect the host PC to the controller communication port.
  3. Start the host software from the installation directory.
  4. After startup, the host tries to connect to the MCU automatically. When connected, the status bar displays the machine connection and heartbeat information.
Safety notes
  • Before running tasks, changing motion parameters, switching modes, or executing a multi-axis reset, confirm that the motion area is clear.
  • Immediate Stop stops all tasks and motors immediately. Buffered Stop stops after the current instruction finishes.
  • System Reset stops all tasks and motors, restarts the MCU, and waits for automatic reconnection.
  • Multi-Axis Reset is available only in interpolation mode. Confirm the homing direction, limit switches, and travel parameters before using it.

2. Main Window Overview

Top Tabs

This manual mainly uses Task, System Monitor, and System Parameters. Vision-related tabs are not covered here.

Instruction Editing Area

Select an instruction type on the left and edit its parameters in the middle.

Task Instruction Table

Shows the task sequence. Instructions can be inserted, deleted, moved up or down, and run step by step.

Operation Area

Provides global controls such as Multi-Axis Reset, System Reset, and Open Operation Panel.

Status Bar

Shows the operation result, machine connection, heartbeat, and runtime status.

Task Slots

  • Slots 0 to 9 are system task slots.
  • Test is used for temporary instruction testing and debugging.
  • Common task states include Empty, Stopped, Running, Paused, Done, and Error.
  • Double-click a task name to edit its display name.

3. Startup and Connection

  1. Open the host software and check the status bar at the bottom.
  2. If the machine is connected and the heartbeat updates normally, MCU communication is working.
  3. If the machine is not connected, open System Parameters and check the communication port settings.
  4. After changing communication settings, use Save and Download, then reconnect or restart as prompted.
Protocol portTTL
Trace/debug portCH340 serial

After connection, the host reads system parameters and task information from the MCU. If local default configuration exists at Data\ProjectDefault\config_default.json, the host also uses it for task names, point names, display names, and local metadata.

4. Operation Panel

Click Open Operation Panel on the Task page to open the large-button operation window.

Counter Area

Total is the accumulated total count. Count is the current count segment. Reset Count clears only the current segment.

Start Area

Run, Single Run, and Continuous Run/Resume.

Stop and Pause Area

Immediate stop, buffered stop, immediate pause, buffered pause, and resume.

Reset and Combined Controls

System reset, multi-axis reset, and run/pause/resume combined operations.

Button Functions

RunStarts all runnable tasks in continuous mode.
Single RunStarts all runnable tasks in single-run mode.
Continuous Run/ResumeStarts when stopped and resumes when paused.
Immediate StopImmediately stops all tasks and motors.
Buffered StopStops after the current instruction finishes and releases resources.
Immediate PausePauses all tasks immediately and releases resources.
Buffered PausePauses after the current instruction finishes while keeping resources.
ResumeResumes paused tasks.
System ResetStops all tasks and motors, restarts the MCU, and waits for host reconnection.
Multi-Axis ResetRuns the multi-axis homing/reset workflow in interpolation mode.
Continuous Run / Buffered Pause / ResumeRuns when stopped, pauses after the current instruction when running, and resumes when paused.
Continuous Run + Immediate Pause + ResumeRuns when stopped, pauses immediately when running, and resumes when paused.
Immediate Pause + ResumePress to pause immediately and release to resume.
Immediate Stop + System ResetPress to stop immediately and release to reset the system.

5. Task Editing Workflow

Typical Workflow

  1. Select task slot 0–9 or Test.
  2. Select an instruction from the instruction list, such as Output IO, Delay (ms), Motor Run, Move to Point, Pick/Place, or End.
  3. Click Add or Insert to add it to the task instruction table.
  4. Select an instruction row and edit its parameters.
  5. Use Move Up, Move Down, and Delete to adjust the sequence.
  6. Make sure the task ends with an End instruction.
  7. Click Save and Download for the current task to save it into the local default configuration and download it to the MCU.

Common Instruction Types

Output IOControls the state of a Y output.
Delay (ms)Waits for the specified time.
Set VariableModifies internal variables used for counters, flags, and conditional logic.
Jump / Conditional JumpChanges the next executed task row.
Motor Run / Set Motor Speed / Motor StopControls non-interpolation or auxiliary motors.
Run IndexerControls indexer or rotary-table actions.
Move to Point / Move to XYZR / Relative MoveControls interpolation-mode motion.
Pick/Place / Pick / PlacePerforms pick-and-place actions in interpolation mode.
Home / Single-Stage HomePerforms axis homing actions.
EndEnds the current task.

Task Read and Write Controls

  • Load From MCU: reads the current task slot from the MCU.
  • Save and Download: saves the current task to config_default.json and downloads it to the MCU.
  • Load From File: loads task data from the local default configuration.
  • Save to File / Save Local: saves the current task or all tasks for backup and recovery.
Important: If a task is not ready in the MCU, the software may try to download it and start again. The Test task and system tasks 0–9 are mutually exclusive while running or paused. After editing a task, save and download it before running.

6. Task Points and Point Matrix

The task point table stores X/Y/Z/R coordinates. These points are used by motion and pick/place instructions.

Common Operations

  • Add: add a point at the end.
  • Insert: insert a point above the selected row.
  • Delete: delete selected points.
  • Select All: select or clear all points.
  • Load From MCU: read the point table from the MCU.
  • Save and Download: save points to local default configuration and download them to the MCU.
  • Load From File: load points from the local default configuration.
  • Set Current Point: write the current machine position into the selected point.
  • Move to Selected Point: move the machine to the selected point.
  • Generate Matrix: generate evenly distributed points from the start/end coordinates and count.
  • Apply + / Apply −: apply a positive or negative offset to selected points.

Recommendations

  • Use a low speed and short movement for first-time point verification.
  • Before moving to a selected point, confirm that the coordinate is within the configured travel range.
  • Back up point data before applying batch offsets.

7. Single Task Running and Debugging

The current task area provides local controls for the selected task slot:

Run/ResumeRuns the selected task or resumes it if paused.
Immediate PausePauses the current task immediately and releases resources.
Buffered PausePauses after the current instruction finishes.
Immediate StopStops the current task immediately.
Buffered StopStops after the current instruction finishes.
Step RunExecutes the selected instruction row and is useful for debugging.

Debugging Suggestions

  • Verify new tasks in the Test slot or under a low-risk condition first.
  • Select the target instruction row before using Step Run.
  • For IO, vacuum, motor, and axis movement instructions, confirm the mechanism state first.

8. System Parameters: Common Settings

System Mode

Switch between Non-Interpolation Mode and Interpolation Mode.

Communication Ports

Configure the protocol port, debug/trace port, and UI language.

System Button Settings

Map physical X inputs to run, stop, pause, and reset functions, and choose momentary or hold button type.

Parameter Controls

Load from MCU, load from file, save to file, and save/download.

System Mode

  • Non-Interpolation Mode: mainly uses individual motor default speed and auxiliary motor actions.
  • Interpolation Mode: enables XYZR interpolation, task points, the pick/place workflow, and multi-axis reset.

Switch Mode requires a system restart. After confirmation, the software saves config_default.json, writes the mode parameters to the MCU, performs a system reset, and waits for reconnection.

Physical Button Settings

  • The left column shows the function name, the middle column selects the physical X input, and the right column selects the button type.
  • Unused means no physical input is assigned.
  • Safety-related functions such as Immediate Stop and Reset should use reliable, clearly labeled physical buttons.

9. System Parameters: Interpolation Settings

The interpolation settings include speed and acceleration parameters, multi-axis homing and travel parameters, auxiliary motor parameters (normally M4–M7), and parameter read/write controls.

Start Speed (Hz)Initial frequency for interpolation motion.
Linear Max Speed (Hz)Maximum speed for linear interpolation.
Linear Accel (pulse/s²)Acceleration for linear interpolation.
Circular Interp Max Speed / AccelSpeed and acceleration for arc interpolation.
Pulse EquivalentLinear distance per pulse, used for coordinate conversion.
R Axis Pulse Angle EquivalentR-axis pulse-to-angle conversion.
Home Search / Backoff / Latch SpeedControls each phase of the homing sequence.
Home Initial Position X/Y/Z/RTarget position after homing.
Run-End PositionConfigured endpoint used by the reset and travel workflow.
Axis Max X/Y/Z/RMaximum allowed travel for each axis.
Auto Multi-Axis Reset After System ResetAutomatically runs multi-axis reset after a system reset.

Recommendations

  • Record the original values before changing travel, pulse equivalent, or R-axis equivalent.
  • Save to file before downloading changed parameters to the MCU.
  • After parameter changes, verify operation with a low-speed dry run or step debugging.

10. System Parameters: Non-Interpolation Settings

The motor parameter table shows the default speed, base frequency, divider, and actual speed for M0–M7.

  • Change Default Speed (Hz) for each motor as needed. The actual output frequency is calculated from the base frequency and divider.
  • Before testing a motor individually, confirm that it is allowed in the current mode.
  • In interpolation mode, M0–M3 are normally controlled by interpolation and should not be manually tested as independent motors.

11. System Monitor

The System Monitor displays global variables, X input status, Y output status, motor status, runtime statistics, and the connection status bar.

Global Variables

  • Read: reads V0–V19 from the MCU.
  • Write Selected: writes the selected variable to the MCU.
  • Clear All: clears all 20 global variables.

IO and Motor Status

  • X inputs are status displays from heartbeat data.
  • Y output buttons can send IO toggle commands when allowed. In interpolation mode, some Y outputs are used for direction control and are display-only.
  • Motor buttons can start or stop default-speed motor tests when allowed. In interpolation mode, M0–M3 are normally display-only.

Statistics

  • Read MCU Statistics: refreshes task memory usage, interrupt timing, task stack statistics, and global variables.
  • Clear Statistics: clears MCU-side statistics.

12. Common Workflows

12.1 Download and Run a Task

  1. Select a task slot.
  2. Edit instructions and parameters.
  3. If the task uses points, edit and download the task points first.
  4. Click Save and Download for the current task.
  5. Click Run/Resume to run the selected task, or open the Operation Panel and click Run to run all runnable tasks.
  6. Watch the status bar, task state, IO status, and actual machine movement.

12.2 Modify System Parameters

  1. Open System Parameters.
  2. Click Load From MCU first.
  3. Modify the required parameters.
  4. Click Save to File for backup.
  5. Click Save and Download to write the parameters to the MCU.
  6. For motion-related changes, verify with a low-speed dry run.

12.3 Switch Between Modes

  1. Open System Parameters → Common Settings.
  2. Confirm that the machine is connected.
  3. Click Switch Mode.
  4. Check the current mode and target mode in the confirmation dialog.
  5. Confirm. The software writes mode parameters to the MCU, performs a system reset, and waits for reconnection.
  6. After reconnection, load parameters from the MCU again and confirm the mode.

12.4 Handle an Abnormal Stop

  1. If there is a collision, overtravel, or unsafe motion risk, use the emergency stop or Immediate Stop.
  2. If the current action can finish safely, use Buffered Stop.
  3. After stopping, check the mechanism state, point data, IO status, and task parameters.
  4. If necessary, perform a System Reset and wait for reconnection.
  5. Before running again, verify with a low-speed step run or single-task run.

13. Configuration Files

Local configuration is stored under the host software runtime Data directory:

Data\ProjectDefault\config_default.jsonDefault configuration for tasks, points, system parameters, and display names.
Data\ProjectDefault\project_default.jsonLegacy default configuration file, still supported for reading.
Data\display.jsonDisplay-name configuration.
Data\ui_settings.jsonUI language and UI settings.
Data\ui_text.json / ui_text_custom.jsonUI text resources.
Backup recommendation: Back up Data\ProjectDefault\config_default.json regularly, especially before changing many tasks, points, or system parameters.

14. Troubleshooting

Machine not connectedCheck controller power, the serial cable, port settings, and the driver.
No heartbeatCheck the MCU firmware, protocol port, and whether the serial port is occupied by another program.
Save/download failedConfirm that the machine is connected, task parameters are valid, and the MCU is not busy.
Multi-axis reset unavailableConfirm that the system is in interpolation mode.
Run blocked and reset requiredPerform a System Reset, wait for reconnection, and then run again.
IO or motor button has no effectConfirm that this IO or motor is allowed in the current mode and that the machine is connected.
Parameter text turns redThe UI value differs from the saved baseline. Save or reload the parameters to clear the warning.
Need an offline copy? Use the English Word manual download at the top of this page. For software installation, use the PLC HOST downloader, which supports Windows 7, Windows 10, and Windows 11.