.\"******************************************************************* .\" .\" This file was extracted from hal/components/toggle2nist.comp using halcompile.g. .\" Modify the source file. .\" .\"******************************************************************* .TH TOGGLE2NIST "9" "2023-02-10" "LinuxCNC Documentation" "HAL Component" .SH NAME toggle2nist \- toggle button to nist logic .SH SYNOPSIS .HP .B loadrt toggle2nist [count=\fIN\fB|names=\fIname1\fB[,\fIname2...\fB]] .SH DESCRIPTION Toggle2nist can be used with a momentary push button to control a device that has separate on and off inputs and an is-on output. \[bu] On a rising edge on pin \fIin\fR when \fIis-on\fR is low: It sets \fIon\fR until \fIis-on\fR becomes high. \[bu] On a rising edge on pin \fIin\fR when \fIis-on\fR is high: It sets \fIoff\fR until \fIis-on\fR becomes low. ┐ ┏─────xxxxxxxxxxxx┐ ┏─────xxxxxxxxxxxx┐ .br in : └─────┛ xxxxxxxxxxxx└───────────┛ xxxxxxxxxxxx└───── .br ┐ ┌───────────┐ .br on : └─────┘ └───────────────────────────────────────── ┐ ┌───────────┐ .br off : └───────────────────────────────────┘ └─────────── .br ┐ ┌─────────────────────────────┐ .br is-on: └─────────────────┘ └─────────── .SH FUNCTIONS .TP \fBtoggle2nist.\fIN\fB\fR .SH PINS .TP .B toggle2nist.\fIN\fB.in\fR bit in \fR .br .ns .TP .B toggle2nist.\fIN\fB.is-on\fR bit in \fR .br .ns .TP .B toggle2nist.\fIN\fB.on\fR bit out \fR .br .ns .TP .B toggle2nist.\fIN\fB.off\fR bit out \fR .SH AUTHOR Anders Wallin .SH LICENSE GPL