Tags:   #   #   #   #   #   #   #   #

What is the “PID Fault” (e-PID), and why it shows up?


One of our customers received the error “PID Fault mkit: 1 error 251” and asked what it meant. In simple terms, it means that “MotionKit” (in the case of Mach3 – an axis, and Mach4 – a Motor) number 1 wanted to perform an uncontrolled movement of 251 pulses. A longer explanation is required to understand where it comes from and what it means.

Each controller has one PID position loop for each axis (Motor or MotionKit). PID loops are used to convert the trajectory of movement into step/dir pulses (CSMIO/IP-M and CSMIO/IP-S) or +/-10V (CSMIO/IP-A). The trajectory provided by the control software (Mach3, Mach4, and simCNC) is the set position, and the step/dir pulse counter (CSMIO/IP-M and CSMIO/IP-S) or the encoder pulse counter (CSMIO/IP-A) is the actual positionBoth values go to the PID loop, which results in the step/dir signal frequency (CSMIO/IP-M and CSMIO/IP-S) or the +/-10V voltage value (CSMIO/IP-A). In order to monitor the effects of the PID loop, security is used that constantly compares the value of the set and actual positionThis protection describes a very simple mathematical condition:


Setpointactual position <= following position error


If the set position minus the actual position is greater than the following position error, the machine immediately stops in an emergency, and the message “PID Fault” appears. The “PID Fault” message contains information about which “Motor” or “MotionKit” the problem is affected (e.g., “mkit: 1”) and what position error value we are dealing with (e.g., “error 251”)

In the case of the CSMMIO/IP-A controller, the user can set the value of the following position error because this value depends on the following:

  • Correct position regulator tuning in CSMIO/IP-A
  • Correct tuning of the velocity and current PID regulator in a servo drive.
  • Servo drive condition
  • Axis inertia
  • The desired value of acceleration and axis jerk.

For CSMIO/IP-M and CSMIO/IP-S controllers, the maximum following position error is permanently set to 200 pulses. This value is set rigidly because it does not depend on variable factors.

As I have already mentioned, the described security “constantly compares the value of the set and actual positionsAt this point, you may have a question, why should these values be constantly compared? Obviously, in the case of the CSMIO/IP-A controller, this should be done to control the correct operation of servo drives, but is there any other reason? Well, there are four serious reasons:

  • Mistake in control software calculations (Mach3, Mach4, and simCNC). In this situation, the CSMIO/IP motion controller receives an incorrect trajectory (i.e., a set position), which is a command for uncontrolled movement of an axis that may lead to a collision.
  • No synchronization between the control software (Mach3, Mach4, and simCNC) and the CSMIO/IP controller. The CSMIO/IP motion controller continuously transmits the actual axis position to the control software (Mach3, Mach4, and simCNC). This position is used to synchronize the control software with the motion controller. Lack of synchronization causes the control software to generate a false trajectory that could lead to a collision.
  • Lack of feature support or faulty operation of a feature on the side of the control software or motion controller. Threat identical to the above points.
  • Strong interference in network transmission causes the buffer of the set trajectory (set position) to run out.

[Source:] The text was created by CS-Lab’s Technical Support section for CSMIO/IP users.