Instrument readouts and controls

Jog Panel <smart-jog-panel>

JogPanel is the manual motion panel of a machine pendant.

<smart-jog-panel> · 14 properties, 8 methods, 8 events · source/modules/smart.jogpanel.js

Usage in React

The React wrapper is the JogPanel component: every property is a prop, every event a prop named on<Event> that receives the CustomEvent, and the methods are called on the element through a ref.

import { JogPanel } from 'smart-industrial/react/jogpanel';

const ref = useRef<JogPanel>(null);

<JogPanel ref={ref} speed={42}
    onHomeRequest={(event: CustomEvent) => console.log(event.detail)} />

// methods are called on the wrapper the ref holds, which calls the element
ref.current?.update('value', {});

Properties

PropType, defaultDescription
axesarraySets or retrieves the axes as [{ id, label, unit, position, homed, min, max, state }]. position, homed and state are reported by the drive; min and max are soft limits. Setting the same axes again, in the same order, updates the rows in place as update() does and keeps a jog in progress; setting different axes ends it. For a running feed use update().
stepnumber
0
Sets or retrieves the selected step: 0 for continuous jogging, otherwise an increment in the axis unit. Changing the step ends a jog in progress. The step is kept to what the panel offers: 0 only while allowContinuous is true, otherwise a positive size no larger than the largest of steps. Anything else - a negative, 0 with Continuous switched off, a size larger than any offered - becomes the smallest step offered.
stepsarray
[0.01,0.1,1,10]
Sets or retrieves the step sizes offered.
allowContinuousboolean
true
Determines whether Continuous is offered as a step. Off, every jog is a step: a step of 0 becomes the smallest step offered, a continuous jog in progress ends, and jogStart() does nothing.
speednumber
25
Sets or retrieves the speed override, in percent, sent with every jog. Kept above 0 and no higher than the largest of speeds (100 when none is offered); anything else becomes the slowest speed offered.
speedsarray
[10,25,50,100]
Sets or retrieves the speed overrides offered, in percent.
unitstring
mm
Sets or retrieves the unit for axes that name none.
precisionDigitsnumber
3
Sets or retrieves the decimal places in the position readout.
showHomeboolean
true
Determines whether each axis has a home button.
showStopboolean
true
Determines whether the Stop button is shown. Escape stops either way.
interlockedboolean
false
Determines whether the panel is interlocked, the machine not in manual, a guard open. An interlocked panel ends any jog in progress, stays readable, shows interlockReason, and raises blocked instead of moving anything.
interlockReasonstringSets or retrieves why the panel will not jog, shown under it while interlocked and read out when a button is pressed.
labelstringSets or retrieves the name of the mechanism the panel moves, shown in the header and used in the accessible name.
densityJogPanelDensity
normal
Sets or retrieves the target size. touch makes the jog buttons 60px high for a gloved hand.

Methods

MethodDescription
update(id: string, patch: object): voidUpdates one axis with the values reported by the drive (position, homed, state, min, max, label, unit) and updates its row in place. Intended for a position subscription. A jog into a limit that the update reports as reached is ended.
id string The axis.
patch object The fields to change.
axisList(): arrayReturns the axes as the panel holds them, with everything update() has reported.
jogStart(id: string, direction: number): booleanBegins a continuous jog, as holding a jog button does. The jog ends with jogStop(). The request is refused, with the blocked event, while the panel is interlocked, while another axis is jogging, or when the jog would move into a soft limit. Does nothing while allowContinuous is false.
id string The axis.
direction number 1 or -1.
jogStop(): booleanEnds the continuous jog in progress, if there is one.
jogStep(id: string, direction: number): booleanRequests one increment of the selected step, as pressing a jog button does when a step is selected. Does nothing when the step is continuous.
id string The axis.
direction number 1 or -1.
activeJog(): objectReturns the continuous jog in progress as { axis, direction }, or null.
home(id?: string): booleanRequests a homing cycle for one axis, or for all axes when no axis is given. Refused while the panel is interlocked or while an axis is jogging.
id string The axis. Omit for all.
stop(): voidEnds a jog in progress and raises the stop event for everything else that moves.

Events

The data of an event is in event.detail. jogStart, jogStop, jogStep, homeRequest and stop are commands: the jog panel raises them and leaves the axis positions in axes to the application, and an interlock, a limit or another jog in progress raises blocked in place of a jog or homing request. stepChange and speedChange follow a change the panel has already made to step or speed.

EventDescription and detail
onJogStart
jogStart
This event is triggered when a continuous jog begins. jogStop always follows.
axis string The axis id.
direction number 1 or -1.
speed number The speed override, in percent.
onJogStop
jogStop
This event is triggered when a continuous jog ends, for any reason.
axis string The axis id.
direction number 1 or -1.
duration number How long it ran, in milliseconds.
onJogStep
jogStep
This event is triggered when one increment is requested.
axis string The axis id.
direction number 1 or -1.
step number The increment, in the unit.
speed number The speed override, in percent.
onHomeRequest
homeRequest
This event is triggered when a home is requested.
axis string The axis id, or null for all.
onStop
stop
This event is triggered by the Stop button, Escape, or stop().
onStepChange
stepChange
This event is triggered when a step is selected.
step number The step, 0 for continuous.
previousStep number The step before.
onSpeedChange
speedChange
This event is triggered when a speed is selected.
speed number The speed, in percent.
previousSpeed number The speed before.
onBlocked
blocked
This event is triggered when a jog, step or home is refused. Nothing moves.
reason string Why, the interlock reason, the axis already jogging, or the limit.
axis string The axis id, or null.

Types

type JogPanelDensity

'normal' | 'touch'

CSS variables

The component declares 10 CSS variables; the CSS page shows how to set them.

--smart-jog-size --smart-jog-background --smart-jog-border --smart-jog-accent --smart-jog-stop --smart-jog-stop-text --smart-jog-warning-text --smart-jog-readout-font --smart-jog-selected --smart-jog-selected-text