Error messages - understanding
In TwinCAT you receive very detailed information about errors that occur.
For instance, this error message means:
- The error occurred during the transition from SAFE OP to OP.
- The affected object is "Untitled1_Obj1" (CModule1).
- The error code 1821 / 0x71d indicates that the object ID is invalid.
Therefore, you should examine the method "SetObjStateSP()", which is responsible for this transition, in more detail. In the case of the generated standard code, you can see that the addition of the module takes place there.
The reason for this error is that no task has been assigned to this module, so the module cannot have a task in which it is executed.