hw_jog()

Returns the state of the jog port or an individual jog switch on that port.

First jog switch has index 1.

When the index is omitted or set to -1, returns the entire jog value.

Syntax

planetcnc.hw_jog()
planetcnc.hw_jog(index)

Parameters

Parameter Type Description Comment
index int Optional pin index. First jog switch is 1. Omit to return full jog value. optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Get the complete jog port state
full_jog = planetcnc.hw_jog()
print("Full Jog State:", full_jog)
 
# Get the state of the first jog switch
jog1 = planetcnc.hw_jog(1)
print("Jog switch 1 state:", jog1)

See also