logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

comp - Two input comparator with hysteresis

Author

       Jeff Epler

Functions

comp.N (requires a floating-point thread)
              Update the comparator

License

       GPL

LinuxCNC Documentation                             2025-08-07                                            COMP(9)

Name

       comp - Two input comparator with hysteresis

Parameters

comp.N.hyst float rw (default: 0.0)
              Hysteresis of the comparator (default 0.0)

              With  zero  hysteresis,  the  output  is true when in1 > in0.  With nonzero hysteresis, the output
              switches on and off at two different values, separated by distance hyst around the point where in1
              = in0.  Keep in mind that floating point calculations are never absolute and it is wise to  always
              set hyst if you intend to use equal

Pins

comp.N.in0 float in
              Inverting input to the comparator

       comp.N.in1 float in
              Non-inverting input to the comparator

       comp.N.out bit out
              Normal output. True when in1 > in0 (see parameter hyst for details)

       comp.N.equal bit out
              Match output.  True when difference between in1 and in0 is less than hyst/2

Synopsis

loadrtcomp[count=N|names=name1[,name2...]]

See Also