Machinekit

Machinekit

Machinekit Documentation

HAL Component — SAFETY_LATCH

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

safety_latch — latch for error signals

SYNOPSIS

safety_latch

USAGE SYNOPSIS

loadrt safety_latch
OR
newinst safety_latch <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

DESCRIPTION

HAL component that implements a safety latch for error singnals with customizable harm, healing and latching features.

When the component is not enabled the error input value is forwarded to output without further modififactions.

If error-in is true the error count is increased by harm. If error-in is false the error count is decreased by heal. When the error count exceeds the threscold value error-out is set to true. If latching is false the error-out pin will only return to false when reset is set to true.

The inputs pin min and max clamp the error count value to a specified range.

FUNCTIONS

safety_latch.N.funct ( OR <newinstname>.funct )

PINS

safety_latch.N.error-in bit in (default: false) ( OR <newinstname>.error-in bit in (default: false) ) - Error Input

safety_latch.N.heal s32 in (default: 1) ( OR <newinstname>.heal s32 in (default: 1) ) - Heal when ok per tick

safety_latch.N.harm s32 in (default: 1) ( OR <newinstname>.harm s32 in (default: 1) ) - Harm when error per tick

safety_latch.N.latching bit in (default: true) ( OR <newinstname>.latching bit in (default: true) ) - If a reset is necessary to heal an error

safety_latch.N.reset bit in (default: false) ( OR <newinstname>.reset bit in (default: false) ) - Reset input

safety_latch.N.threshold s32 in (default: 100) ( OR <newinstname>.threshold s32 in (default: 100) ) - Error output threshold

safety_latch.N.min s32 in (default: 0) ( OR <newinstname>.min s32 in (default: 0) ) - Minimum count

safety_latch.N.max s32 in (default: 1000) ( OR <newinstname>.max s32 in (default: 1000) ) - Maximum count

safety_latch.N.enable bit in (default: true) ( OR <newinstname>.enable bit in (default: true) ) - If not enabled the error count is passed to the output

safety_latch.N.count s32 out (default: 0) ( OR <newinstname>.count s32 out (default: 0) ) - Current count

safety_latch.N.error-out bit out (default: false) ( OR <newinstname>.error-out bit out (default: false) ) - Error output

safety_latch.N.ok-out bit out (default: true) ( OR <newinstname>.ok-out bit out (default: true) ) - Ok output

AUTHOR

Alexander Roessler

LICENCE

GPL