RTC
®
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
85
Also see "Starting and Stopping Lists via External
Control Signals and Master/Slave Synchronization",
page 209.
6.7 Usage by Multiple Applica-
tions
Usage of installed RTC
®
5 boards by multiple applica-
tions (user programs) is coordinated by the DLL’s
internal board management, which is initiated via the
command init_rtc5_dll (see page 306).
Via acquire_rtc (see page 227), the init_rtc5_dll
command automatically assigns access rights to the
found boards, as long as access rights aren’t already
assigned to another application (any number of
RTC
®
5 boards or applications can be used simultane-
ously, but no board can be simultaneously used by
multiple applications). Access rights (even if
temporary) to existing boards are assigned on an
exclusive basis by the DLL. Multiple threads of one
application can use the same board, but can not send
commands to it at the same time (the DLL automati-
cally serializes the command calls).
Without access rights, a board can only be accessed
by an application through purely DLL-internal
functions that don’t require access rights – e.g.
get_error (page 263), get_last_error (page 270) or
select_rtc (page 403). Most multi-board commands,
too, are only executable for boards for which access
rights exist.
If an application has gained access rights for a board,
then this board can be accessed by another
application only after the original application
explicitly releases its access rights via release_rtc
(page 392) or free_rtc5_dll (page 259). Acquisition
of a released board can then be achieved via
acquire_rtc (or init_rtc5_dll or select_rtc).
When a board is acquired via acquire_rtc (or
init_rtc5_dll or select_rtc), a version compatibility
check is performed on the driver DLL and the
program files
RTC5OUT.out
,
RTC5RBF.rbf
and
RTC5DAT.dat
. If no program files have been loaded,
then a version check cannot be explicitly performed
but the check will still be regarded as successful and
will thus not hinder the board’s acquisition. If
program files have been loaded and the version check
detects an error, then access will be denied
(get_last_error return code:
RTC5_ACCESS_DENIED
|
RTC5_VERSION_MISMATCH
).