Sets a parameter in the application's default parameter storage.
This allows the parameter to be stored for later retrieval or manipulation.
You can set only writable parameters.
planetcnc.param_set(name, value)
#! /usr/bin/env python import planetcnc # Set a parameter: name 'ping' with value 'pong' print("Setting parameter 'ping' to 'pong'...") set_result = planetcnc.param_set("ping", "pong") print("Parameter set:", set_result) # Retrieve the parameter's value retrieved_value = planetcnc.param_get("ping") print("Retrieved parameter 'ping':", retrieved_value) # Perform a 'ping/pong' check by confirming the retrieved value if retrieved_value == "pong": print("Ping/pong check passed.") else: print("Ping/pong check failed.") # Remove the parameter at the end of the test. remove_result = planetcnc.param_remove("ping") print("Parameter removed:", remove_result)