Skip to main content
WARNING! From February 2022, these pages are no longer maintained.
Please see the current Duet3D documentation at https://docs.duet3d.com/
Help

Revision to M957

Ian A-S

+[title|M957]
+[summary]Raises an event internally, based on the given parameters, as if the event had actually occurred, and executes any related handler macro for that event.[/summary]
+
+
+
+Back to the [[Gcode|Gcode Dictionary]]
+
+==== M957: Raise event ====
+
+Supported in RepRapFirmware 3.4 and later.
+
+***Parameters***
+
+* ***S"type"*** Event type name
+* ***Pnn*** or ***Pbb.nn*** Device number to which the event relates, optionally including the CAN address of the board concerned
+* ***Rnn*** Optional additional data about the event (unsigned integer)
+
+This command is used to raise an event internally as if the event had actually occurred, and execute any related handler macro for that event. Its main use is to test event handler macros.
+
+***Example***
+
+* M957 S"heaterFault" P1.1
+
+Raise a heater fault on expansion board at CAN address 1, on heater 1
+
+***Notes***
+
+The event type names are firmware-dependent. In RepRapFirmware they are: mainBoardPowerFail, heaterFault, driverError, filamentError, driverWarning, mcuTemperatureWarning.
+
+The meaning of the device number depends on the event type. For a driver error it is the driver number. For a heater fault it is the heater number. For a filament error it is the extruder number.
+
+The meaning of the optional additional parameter also depends on the event type. For example, for a driver error it is the driver status.