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 nbinsavailablebins.

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-s32

2

input-u32

3

input-bit

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 ui32 in
histobins.N.input real in
histobins.N.input-s32 si32 in
histobins.N.input-u32 ui32 in
histobins.N.input-bit bool in
histobins.N.nbins ui32 in (default: 20)
histobins.N.binsize real in (default: 1)
histobins.N.minvalue real in (default: 0)
histobins.N.index si32 in
histobins.N.check si32 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 ui32 out
histobins.N.variance real out
histobins.N.mean real out
histobins.N.availablebins si32 out (default: 200)

AUTHOR

Dewey Garrett

LICENSE

GPL