Skip to content

Scripting Mk3_9

GitHub Action edited this page Mar 3, 2024 · 1 revision

Scripting options for the selected printer:

E::

  • GetPosFloat() - Reports current position in mm.
  • SetStall(bool) - Sets the stallguard value as specified.
  • ToggleStall() - Toggles the stallguard value.
  • WaitUntilInsideZoneMM(float, float) - Wait until the axis reaches the requested absolute position +/- margin (mm,mm).
  • WaitUntilOutsideZoneMM(float, float) - Wait until the axis moves away from the requested absolute position +/- margin (mm,mm).

KeyCtl::

  • Key(string) - Simulates a keypress

ScriptHost::

  • Log(string) - Print the std::string to stdout
  • SetQuitOnTimeout(bool) - If 1, quits when a timeout occurs. Exit code will be non-zero.
  • SetTimeoutMs(int) - Sets a timeout for actions that wait for an event
  • WaitMs(int) - Wait the specified number of milliseconds. (10 ms resolution)

X::

  • GetPosFloat() - Reports current position in mm.
  • SetStall(bool) - Sets the stallguard value as specified.
  • ToggleStall() - Toggles the stallguard value.
  • WaitUntilInsideZoneMM(float, float) - Wait until the axis reaches the requested absolute position +/- margin (mm,mm).
  • WaitUntilOutsideZoneMM(float, float) - Wait until the axis moves away from the requested absolute position +/- margin (mm,mm).

Y::

  • GetPosFloat() - Reports current position in mm.
  • SetStall(bool) - Sets the stallguard value as specified.
  • ToggleStall() - Toggles the stallguard value.
  • WaitUntilInsideZoneMM(float, float) - Wait until the axis reaches the requested absolute position +/- margin (mm,mm).
  • WaitUntilOutsideZoneMM(float, float) - Wait until the axis moves away from the requested absolute position +/- margin (mm,mm).

Z::

  • GetPosFloat() - Reports current position in mm.
  • SetStall(bool) - Sets the stallguard value as specified.
  • ToggleStall() - Toggles the stallguard value.
  • WaitUntilInsideZoneMM(float, float) - Wait until the axis reaches the requested absolute position +/- margin (mm,mm).
  • WaitUntilOutsideZoneMM(float, float) - Wait until the axis moves away from the requested absolute position +/- margin (mm,mm).

cs30bl::

  • SetA(float) - Sets the voltage readout to a given value.

cs30bl1::

  • SetA(float) - Sets the voltage readout to a given value.

cs30bl2::

  • SetA(float) - Sets the voltage readout to a given value.

encoder-input::

  • Push() - Presses the encoder
  • Reset() - Resets the printer
  • Twist(int) - Twists the encoder up(1)/down(-1)

fan::

  • GetRPM() - Reports the current RPM
  • Resume() - Resumes a stalled fan.
  • Stall() - Stalls the fan tachometer

fan1::

  • GetRPM() - Reports the current RPM
  • Resume() - Resumes a stalled fan.
  • Stall() - Stalls the fan tachometer

generic-spi-display::

  • Screenshot(string) - Takes a screenshot to the specified file.

hall-sensor::

  • Set(int) - Sets the hall sensor to the given value
  • Toggle() - Toggles hall filament sensor enum state

heater::

  • Open() - Sets heater as open-circuit
  • Restore() - Restores normal (non-open or runaway) state
  • Runaway() - Sets heater as if in thermal runaway
  • SetTemp(float) - Sets the current temperature the heater uses to update the thermistor

heater1::

  • Open() - Sets heater as open-circuit
  • Restore() - Restores normal (non-open or runaway) state
  • Runaway() - Sets heater as if in thermal runaway
  • SetTemp(float) - Sets the current temperature the heater uses to update the thermistor

hx717::

  • Set(int) - Sets the load cell output to the given value

loadcell::

oc-latch::

  • Set() - Sets the overcurrent line to fault
  • Toggle() - Clears the overcurrent fault line

oc-latch1::

  • Set() - Sets the overcurrent line to fault
  • Toggle() - Clears the overcurrent fault line

oc-latch2::

  • Set() - Sets the overcurrent line to fault
  • Toggle() - Clears the overcurrent fault line

oc-latch3::

  • Set() - Sets the overcurrent line to fault
  • Toggle() - Clears the overcurrent fault line

oc-latch4::

  • Set() - Sets the overcurrent line to fault
  • Toggle() - Clears the overcurrent fault line

powersource::

  • SetPanic() - Trips the Power Panic line
  • SetV(float) - Sets the voltage readout to a given value.

powersource1::

  • SetPanic() - Trips the Power Panic line
  • SetV(float) - Sets the voltage readout to a given value.

thermistor::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor1::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor2::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor3::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor4::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor End Scripting options