@linuxcnc-node/core - v2.0.0
    Preparing search index...

    Class PositionLogger

    Position Logger for tracking machine tool path

    This class provides functionality to log the position of a LinuxCNC machine tool over time. All positions are returned as Float64Array with 10 elements per point: [x, y, z, a, b, c, u, v, w, motionType]

    Use PositionLoggerIndex enum (or destructure it for shorter access like data[X]) and POSITION_STRIDE constant for array access.

    Index

    Constructors

    Methods

    • Get the current position as a Float64Array Layout: [x, y, z, a, b, c, u, v, w, motionType]

      Returns null | Float64Array<ArrayBufferLike>

      Float64Array with 10 values, or null if no position available

    • Get the number of points in the motion history

      Returns number

      Number of logged points

    • Get the motion history as a Float64Array Layout: [x, y, z, a, b, c, u, v, w, motionType] repeated for each point Use POSITION_STRIDE (10) to iterate through points

      Parameters

      • OptionalstartIndex: number

        Starting index (default: 0)

      • Optionalcount: number

        Number of points to retrieve (default: all)

      Returns Float64Array

      Float64Array with 10 values per point

    • Get the most recent points from the history

      Parameters

      • count: number = 10

        Number of recent points to get (default: 10)

      Returns Float64Array

      Float64Array with 10 values per point