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 Blazor

The Razor component is <JogPanel> in Smart.Blazor.Industrial: every property is a parameter in PascalCase, every event an EventCallback<Event> named On<Event> whose ev["Detail"] is the typed detail class, and the methods are called on the @ref. String choices are enums. In a Blazor Web App (.NET 8 and later) the page needs an interactive render mode, for example @rendermode InteractiveServer; a statically rendered component stays empty.

@using Smart.Blazor.Industrial
@* .NET 8 and later: an interactive render mode, on the page or for the whole app *@
@rendermode InteractiveServer

<JogPanel @ref="jogPanel" Speed="42"
    OnHomeRequest="OnHomeRequest" />

@code {
    JogPanel jogPanel;

    void OnHomeRequest(Event ev)
    {
        JogPanelHomeRequestEventDetail detail = ev["Detail"];
    }

    // void Update(string id, object patch)
    void Call() => jogPanel.Update("value", new { });
}

Properties

ParameterType, defaultDescription
Axes
axes
IEnumerable<object>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
step
double
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.
Steps
steps
IEnumerable<object>
[0.01,0.1,1,10]
Sets or retrieves the step sizes offered.
AllowContinuous
allowContinuous
bool
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.
Speed
speed
double
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.
Speeds
speeds
IEnumerable<object>
[10,25,50,100]
Sets or retrieves the speed overrides offered, in percent.
Unit
unit
string
mm
Sets or retrieves the unit for axes that name none.
PrecisionDigits
precisionDigits
int
3
Sets or retrieves the decimal places in the position readout.
ShowHome
showHome
bool
true
Determines whether each axis has a home button.
ShowStop
showStop
bool
true
Determines whether the Stop button is shown. Escape stops either way.
Interlocked
interlocked
bool
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.
InterlockReason
interlockReason
stringSets or retrieves why the panel will not jog, shown under it while interlocked and read out when a button is pressed.
Label
label
stringSets or retrieves the name of the mechanism the panel moves, shown in the header and used in the accessible name.
Density
density
JogPanelDensity
normal
Sets or retrieves the target size. touch makes the jog buttons 60px high for a gloved hand.

Methods

MethodDescription
void Update(string id, object 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.
Task<IEnumerable<object>> AxisList()Returns the axes as the panel holds them, with everything update() has reported.
Task<bool> JogStart(string id, int 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.
Task<bool> JogStop()Ends the continuous jog in progress, if there is one.
Task<bool> JogStep(string id, int 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.
Task<object> ActiveJog()Returns the continuous jog in progress as { axis, direction }, or null.
Task<bool> Home()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.
void Stop()Ends a jog in progress and raises the stop event for everything else that moves.

Events

Every event is an EventCallback<Event>; Event is a dictionary and ev["Detail"] converts to the detail class named under the event.

EventDescription and detail
OnJogStart
jogStart
JogPanelJogStartEventDetail
This event is triggered when a continuous jog begins. jogStop always follows.
Axis string The axis id.
Direction double 1 or -1.
Speed double The speed override, in percent.
OnJogStop
jogStop
JogPanelJogStopEventDetail
This event is triggered when a continuous jog ends, for any reason.
Axis string The axis id.
Direction double 1 or -1.
Duration double How long it ran, in milliseconds.
OnJogStep
jogStep
JogPanelJogStepEventDetail
This event is triggered when one increment is requested.
Axis string The axis id.
Direction double 1 or -1.
Step double The increment, in the unit.
Speed double The speed override, in percent.
OnHomeRequest
homeRequest
JogPanelHomeRequestEventDetail
This event is triggered when a home is requested.
Axis string The axis id, or null for all.
OnStop
stop
no detail
This event is triggered by the Stop button, Escape, or stop().
OnStepChange
stepChange
JogPanelStepChangeEventDetail
This event is triggered when a step is selected.
Step double The step, 0 for continuous.
PreviousStep double The step before.
OnSpeedChange
speedChange
JogPanelSpeedChangeEventDetail
This event is triggered when a speed is selected.
Speed double The speed, in percent.
PreviousSpeed double The speed before.
OnBlocked
blocked
JogPanelBlockedEventDetail
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

enum JogPanelDensity

JogPanelDensity.Normal "normal" JogPanelDensity.Touch "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