Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
MAXEENC.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: Positioning | ||||||
Description:
| ||||||
Documentation:
Encoders which are configured can be used as counters. This allows you to do scans to measure encoder ratio ( specially useful if it is not linear). The encoder readings will also be written to the scanfile to allow off-line analysis. . The encoder will be read during counting and the result will be the average of all these readings. You have to define a counter with controller set to NONE and call encsetup . If you do not want to use the encoder pseudo counter any more, just delete it with specs configuration editor. EXAMPLE SETUP The resource files of the Maxe server have to be configured for encoders. ATTENTION DEPENDENCIES The file maxeenc.mac has to be read in !done by: startup script (this file needs: cpseudo.mac stchanges.mac) | ||||||
Macros:
Usage: encsetup [counter-mne device channel] [counter-mne device channel] ... This macro defines the pseudo counters. The counter will read the encoder value from mxe device <device> channel <channel>. encset Usage: encset counter-mne value Resets the (incremental) encoder counted in counter-mne to value. Similar to set\ motor-mne\ value. encteston Usage: encteston [enc-mne sigma-mne first-mne last-mne] Switches on test mode where not only the average value for an encoder reading is calculated but also the sigma. (sigma = sqrt(sum(y-avarage)**2/ N)). sigma should not depend on the number of readings. The encoder mne specifies the encoder for which the sigma calculation has to be done. The sigma-mne is pseudo counter where the result has to be written to. (Can be empty - in this case there will be no sigma calculation but the values will still be stored in the ENC_TESTGRP enctestoff Usage: enctestoff Switches off test mode | ||||||
Internal Macros: | ||||||
Usage: encon encoff Usage: encoff encunsetup Usage: encunsetup encbody Usage: encbody(how) enc_precount Usage: enc_precount <counter-mne> <device> <channel> Resets internal registers enc_getcounts Usage: enc_getcounts <counter-mne> <device> <channel> The actual reading routine | ||||||
|