EM Control Function Summary
int emcOpen(EM **em, char *device);
- Create and initialize a new EM handle. The EM handle is returned in the em
variable (you pass a pointer to an EM structure pointer). device is a string
describing the EM device to be opened. Valid values for this variable are defined by the
implementation of the EMC Library. A default value for device is taken from the
environment variable
EMC_DEVICE. If using the WICS-based EMC Library then the
device string is the URL of the instrument's WICS server.
int emcClose(EM *em);
- Close and free the given EM handle. No further communication with device will be
possible through this EM handle.
int emcGetGoniometerPosition(EM *em, int units, double *x, double *y,
double *z, double *a, double *b);
- Retrieve the x,y,z axis position of the goniometer, as well as the a (tilt) and b
(rotation) tilt parameters of the goniometer if available. If a given axis is not
supported by the instrument then the special value
EM_NAN is returned. If the
given axis' pointer is NULL then the value for that axis is not returned.
int emcSetGoniometerPosition(EM *em, int units, int correction, int relative,
double x, double y, double z, double a, double b);
- Set the x,y,z axis position of the goniometer, as well as the a (tilt) and b (rotation)
tilt parameters of the goniometer if available. If a give axis' value is
EM_NAN
then that axis is left unchanged. If a requested axis change is not supported by the
instrument an error value is returned.
int emcSetBeamTilt(EM *em, int units, int correction, int relative,
double xamount, double yamount);
- Set the x and y axis beam tilt on the instrument.
int emcGetBeamTilt(EM *em, int units, double *x, double *y);
- Retrieve the current x and y axis beam tilt of the instrument.
int emcSetIntensity(EM *em, int units, int correction,
int relative, double intensity);
- Set the beam intensity (spread) of the instrument.
int emcGetIntensity(EM *em, int units, double *intensity);
- Retrieve the beam intensity (spread) of the instrument.
int emcGetFocus(EM *em, int units, double *defocus);
- Retrieve the current defocus distance.
int emcSetFocus(EM *em, int units, int correction, int relative,
double defocus);
- Set the current defocus distance.
int emcSetAstigmator(EM *em, int units, int correction,
int relative, double x, double y);
- Set the current astigmator values.
int emcGetAstigmator(EM *em, int units, double *x, double *y);
- Retrieve the current astigmator values.
int emcSetBeamShift(EM *em, int units, int correction, int relative,
double x, double y);
- Set the current x and y axis beam shift.
int emcGetBeamShift(EM *em, int units, double *x, double *y);
- Retrieve the current x and y axis beam shift.
int emcSetImageShift(EM *em, int units, int correction, int relative,
double x, double y);
- Set the x and y axis image shift.
int emcGetImageShift(EM *em, int units, double *x, double *y);
- Retrieve the current x and y axis image shift.
int emcGetHighTension(EM *em, int units, double *ht);
- Retrieve the current high tension value.
int emcSetHighTension(EM *em, int units, int correction,
int relative, double ht);
- Set the high tension.
int emcGetMagnification(EM *em, int units, double *mag);
- Retrieve the current magnification factor.
int emcSetMagnification(EM *em, int correction, int relative, double mag);
- Set the current magnification factor.
int emcSetDarkField(EM *em, int state);
- Place the instrument in Dark Field mode (or turn off dark field mode).
int emcGetDarkField(EM *em, int *state);
- Retrieve the current dark field mode status (on or off).
int emcNormalizeLenses(EM *em);
- Normalize lenses.
int emcSetBeamBlank(EM *em, int state);
- Enable or disable beam blanking.
int emcGetBeamBlank(EM *em, unsigned int *state);
- Retrieve state of beam blanker.
int emcGetSpecimenLoadState(EM *em, unsigned int *state);
- Retrieve state of specimen holder (loaded, notready, ready to be loaded).
int emcGetGridAlignments(EM *em, int units, double *x0, double *y0,
double *theta, double *delta);
- Retrieve the current specimen grid alignments.
int emcSetGridAlignments(EM *em, int x0, int y0, double theta, double delta);
- Set the specimen grid alignment.
Page 5 of 54 