RTC6 boards
Doc. Rev. 1.0.21 en-US
10 RTC6 Commands
316
Ctrl Command acquire_rtc
Function Acquires the specified RTC6 board for a user program.
Call
NoOfAcquiredCard = acquire_rtc( CardNo )
Parameters
CardNo
RTC6 DLL-internal number (RTC6 board management index) of the desired
board. As an unsigned 32-bit value.
Result The return value is:
•
CardNo
, if the acquisition has been successful
• 0, if the board is currently acquired by another user program or the version check
detects an error
As an unsigned 32-bit value.
Comments • acquire_rtc is also useful for single-board systems which need to coordinate the use
of a RTC6 board by different user programs.
• acquire_rtc has no effect (return value 0, get_last_error return code
RTC6_PARAM_ERROR),
if:
–
CardNo
> number of RTC6 PCIe Boardns found during initialization (see
rtc6_count_cards) and no RTC6 Ethernet Board is entered there
–
CardNo
= 0 (real boards begin with 1)
• Access rights to existing boards are granted exclusively (always to only one
user program at a time). Therefore, acquire_rtc has no effect if the specified board is
already acquired by another user program (return value 0, get_last_error return code
RTC6_ACCESS_DENIED
). This must explicitly release the RTC6 board (by release_rtc or
free_rtc6_dll) before the RTC6 board can be acquired by another user program (with
acquire_rtc).
On the other hand, if the board has been already freed prior to initialization of a
user program, then initialization by init_rtc6_dll result in RTC6 board management
assigning board access rights for the user program. In this case, an explicit acquire_rtc
call is not needed and has no effect. Nevertheless, the return value is
CardNo
.
• Assorted versions of the RTC6 DLL and the files
RTC6OUT.out
,
RTC6RBF.rbf
and
RTC6DAT.dat
cannot be arbitrarily combined with another. acquire_rtc performs a
version compatibility check. If
RTC6OUT.out
,
RTC6RBF.rbf
and
RTC6DAT.dat
are not yet
loaded, then this check cannot be explicitly executed (get_last_error return code
RTC6_TIMEOUT
), but the check still regarded as successful and acquisition is not
hindered. If
RTC6OUT.out
,
RTC6RBF.rbf
and
RTC6DAT.dat
are loaded and the version check
determines an error, then access is denied (return value 0, get_last_error return code
RTC6_ACCESS_DENIED
|
RTC6_VERSION_MISMATCH
). With RTC6 Ethernet Boards,
RTC6OUT.out
must be replaced by
RTC6ETH.out
. init_rtc6_d
ll does not automatically
ac
quire RTC6 Ethernet Boards.
• With RTC6 Ethernet Boards, acquire_rtc can take up to 1 s.
• A board successfully acquired by acquire_rtc does not automatically become the
“active” board. Activation of a board is only achieved by select_rtc or init_rtc6_dll.
• Running boards are neither halted nor initialized by acquire_rtc.