Open
returned
SCFN_OPEN
. (The value of the string usually is the value that
can be retrieved by the .#VI
command.)
Open
returned
SCFN_OPEN
. (The value of the string usually is the value that
can be retrieved by the .#SN
command.)
SCFN_OPEN
message.
Apply()
command. If the Apply()
is
not successful you will need to modify some or all of the parameters, before you
can successfully apply them to the instrument. The library aids you in this process
by means of the Calc()
function.
dClock
) by the total number of points (nlNumPhi * nlNumTheta
),
since the measurements are not evenly distributed over the complete rotation of the
mirror wheel. The remaining pause accounts for an additional time proportional
to the number of total rotations needed for an entire scan.
dClock
will be activated through isuue of the Apply()
command.
If the Apply
fails, you can use the Calc()
command to get assistance to get applicable values.
Calc()
to have the library adjust the variables and
follow with Apply()
to activate the settings.
dClock
is [Hz].
SCF_MOTION_SINGLE_UNIDIRECTIONAL
;
SCF_MOTION_SINGLE_BIDIRECTIONAL
;
SCF_MOTION_CONTINUOUS
;
nMotion
variable controls the scanning head movements. It is valid after
a succesful Open()
of the scanner. After changing it's value you have to
Apply()
and/or Calc()
as in the case of the other variables. Please note that single frame mode is not compatible
with all open modes of the Scanner library. You will need to specify an
OpenEx() call in this case.
dTotalTime
is [s].
dTemperature
is [Celsius].
dSupplyVoltage
is [V].
nlOperatingTime
is [s].
nlLaserTime
is [s].
nlScanTime
is [s].
\\.\COM1:19200
specifiy the serial port. In this example COM1 with 19200 Baud//hostname:servicename
on all platforms to establish a TCP/IP connectionWM_USER
,
but you are free to use any other value in case it interferes with your software. (WM_USER
is
defined as the numerical value of 1024 in the system header files of windows.)
wParam = HIWORD(MESSAGE), LOWORD(wId)
.\\.\
followed by the name of the device, which is
COM
followed by a numerical identifier of the respective port. //
. You may omit the host and service names in which
case a default of ib90eth:scancmd will be used. The mapping between hostnames and IP addresses
will depend on the network setup of your machine, as is the mapping between service name and port numbers.
(Usually they are defined in the hosts and services files.) It is possible however to directly specify
an IP address / port number pair e.g. 192.168.11.222:20001, in which case there is no need for
hosts and services files.wParam
and lParam
parameter. The HIWORD(wParam)
contains the scanner
messages as defined in this document. The LOWORD(wParam)
contains the Id value you
have specified in the call to Open
. The lParam
contains message specific information
such as error number.SCN_OPEN
message.Open, Close, Apply
and Calc
calls will wait until the operation has been completed. This mode is useful,
if you do not have a window handle, e.g. when calling from a console application or from a worker thread.
However, you will block your current thread, and so it is not recommended for GUI threads. You
should avoid calling other functions while one of the pending operations is in progress, since this will
result in errors. Also an end of file condition will be reported as an error in this case.Open
funtion before.
SCFN_CLOSE
message.SCFN_APPLY | signals the sucessful application of settings |
dPhi, dDeltaPhi, nlNumPhi, dTheta, dDeltaTheta, nlNumTheta, dClock
)
have a nontrivial interdependence. As there is no simple formula that can describe this interdependence,
it is checked when you issue the Apply()
call. If your requested settings would
result in a violation of maximum or minimum motor speeds, or contradict eye-safety rules,
the Apply()
will fail. You then have the option to supply a different set
of parameters based on some knowledge of your own or have the library suggest you
a set of parameters that will fit your original parameters as close as possible, while
still satisfying the constraints of the scanner head.
SCFN_CALC | Calculation has been finished. |
Apply()
the constraints, that have to be fullfilled are checked and if cannot be met need to
be adjusted by you. The Calc()
function helps you in doing that. It tries to find as close
as possible to your original parameters, that meet the constraints.
Calc()
after you have set the parameters and before
calling Apply()
, but you should be aware, that the parameters may differ from
the original supplied set. So you should read back the final values and show them
to the user, so as to inform him/she what is the actual state of the scanner.
SCF_CARTESIAN
or SCF_POLAR
.
SCFN_ERROR
).
The library has a sticky error behaviour. e.g. the first error is locked until you call this fuction,
which resets the error condition.GetErrNmb
is equal to the lParam
value that
you have received with the SCFN_ERROR
message there have been no additional errors.Open
function.SCF_ERROR_NOERROR | No error |
SCF_ERROR_CANNOT_OPEN | Cannot open |
SCF_ERROR_CANNOT_READ | Cannot read |
SCF_ERROR_NOMEM | Cannot allocate memory |
SCF_ERROR_EDOM | Argument out of function's domain |
SCF_ERROR_ASYNC_CALL | Unexpected behaviour, likely related to async call |
SCF_ERROR_BAD_APPLY | Apply failed |
SCF_ERROR_UNKNOWN | Unknow error reason |
SCF_ERROR_DEMO_MODE | Requested operation is not licensed |
SCF_ERROR_SCANNER | Scanner dependent error, more info in GetErrStr |
GetErrNmb
to reset the error.
The strings are stored in a windows resource that is located in scannermod.dll
and therefore
automatic language conversion will take place when possible.SCF_ERROR_SCANNER
, since this error string is retrieved
directly from the instrument. This string also may change or even be empty depending on the current
state of the scanning device.
Apply()
will fail.
SCFN_OPEN
message.
Apply()
command. If the Apply()
is
not successful you will need to modify some or all of the parameters, before you
can successfully apply them to the instrument. The library aids you in this process
by means of the Calc()
function.
Calc()
function to calculate the tightest row/cols for your scan-pattern.Calc()
after you have set your pattern.SCFN_OPEN
message.
Apply()
command. If the Apply()
is
not successful you will need to modify some or all of the parameters, before you
can successfully apply them to the instrument. The library aids you in this process
by means of the Calc()
function.