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 JavaScript
The component is a custom element: its properties are set on the element, its events are DOM CustomEvents with the data in event.detail, and its methods are called on the element. The properties can also be written as attributes in kebab case (precision-digits="1").
const jogPanel = document.querySelector('smart-jog-panel');
jogPanel.speed = 42;
jogPanel.addEventListener('homeRequest', (event) => console.log(event.detail));
jogPanel.update('value', {});
Properties
| Property | Type, default | Description |
|---|---|---|
axes | array | Sets 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(). |
step | number | 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. |
steps | array | Sets or retrieves the step sizes offered. |
allowContinuous | boolean | 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. |
speed | number | 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. |
speeds | array | Sets or retrieves the speed overrides offered, in percent. |
unit | string | Sets or retrieves the unit for axes that name none. |
precisionDigits | number | Sets or retrieves the decimal places in the position readout. |
showHome | boolean | Determines whether each axis has a home button. |
showStop | boolean | Determines whether the Stop button is shown. Escape stops either way. |
interlocked | boolean | 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. |
interlockReason | string | Sets or retrieves why the panel will not jog, shown under it while interlocked and read out when a button is pressed. |
label | string | Sets or retrieves the name of the mechanism the panel moves, shown in the header and used in the accessible name. |
density | 'normal' | 'touch' | Sets or retrieves the target size. touch makes the jog buttons 60px high for a gloved hand.normal touch |
Methods
| Method | Description |
|---|---|
update(id, patch) | Updates 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() | Returns the axes as the panel holds them, with everything update() has reported. |
jogStart(id, direction) | Begins 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() | Ends the continuous jog in progress, if there is one. |
jogStep(id, direction) | Requests 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() | Returns the continuous jog in progress as { axis, direction }, or null. |
home(id?) | Requests 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() | Ends 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.
| Event | Description and detail |
|---|---|
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. |
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. |
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. |
homeRequest | This event is triggered when a home is requested.axis string The axis id, or null for all. |
stop | This event is triggered by the Stop button, Escape, or stop(). |
stepChange | This event is triggered when a step is selected.step number The step, 0 for continuous.previousStep number The step before. |
speedChange | This event is triggered when a speed is selected.speed number The speed, in percent.previousSpeed number The speed before. |
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