LinuxCNC Documentation

SYNOPSIS

loadrt histobins [count=N|names=name1[,name2…​]]

DESCRIPTION

Read availablebins pin for the number of bins available. Set the minvalue, binsize, and nbins pins and ensure nbins ≤ availablebins.

For nbins = N, the bins are numbered: 0 …​ N-1

Iterate:

  • Set index pin to a bin number: 0 ≤ index < nbins.

  • Read check pin and verify that check pin == index pin.

  • Read outputs: binvalue, pextra, nextra pins.
    (binvalue is count for the indexed bin)
    (pextra is count for all inputs > maxvalue)
    (nextra is count for all bins < minvalue)

If index is out of range (index < 0 or index > maxbinnumber then binvalue == -1. The input-error pin is set when input rules are violated and updates cease. The reset pin may be used to restart.

The input used is selected based on pintype:

pintype inputpin

0

input

1

input-sint

2

input-uint

3

input-bool

Additional output statistics pins:

  • input-min

  • input-max

  • nsamples

  • variance

  • mean

The method input pin selects an alternate variance calculation.

Maintainers note: hardcoded for MAXBINNUMBER==200

FUNCTIONS

histobins.N

PINS

histobins.N.pintype uint in
histobins.N.input real in
histobins.N.input-sint sint in
histobins.N.input-uint uint in
histobins.N.input-bool bool in
histobins.N.nbins uint in (default: 20)
histobins.N.binsize real in (default: 1)
histobins.N.minvalue real in (default: 0)
histobins.N.index sint in
histobins.N.check sint out
histobins.N.reset bool in
histobins.N.method bool in
histobins.N.input-error bool out
histobins.N.binvalue real out
histobins.N.pextra real out
histobins.N.nextra real out
histobins.N.input-min real out
histobins.N.input-max real out
histobins.N.nsamples uint out
histobins.N.variance real out
histobins.N.mean real out
histobins.N.availablebins sint out (default: 200)

AUTHOR

Dewey Garrett

LICENSE

GPL