5.4 Using Multiple RTC
In One Computer
®
The RTC
4 driver DLL supports simultaneous control
®
of up to eight RTC
4 boards in one PC.
®
The RTC
4 boards work completely independently of
each other. Command lists for each board can be
loaded and executed at any time.
Command Set
There are two different methods for writing
application programs using several RTC
(A) Multi-Board Programming
In this programming method, so-called multi-board
®
versions of the RTC
4 commands are used. Each of
these multi-board commands allows specifying the
®
number of the RTC
4 board that shall receive the
command.
To use a multi-board command, simply
add the prefix n_ to the command name, and
include the number of the RTC
which the command shall be sent as the first
parameter (unsigned 16-bit value). The remain-
ing parameters of the command – if any – are
the same as for the normal (single board)
command.
®
The installed RTC
4 boards are numbered in the
order given by the PCI bus (from 1 to a maximum of
8). The command n_get_serial_number (see
page
85) can be used to determine which RTC
boards have been assigned numbers 1 to 8 (see
example 3 below). The command rtc4_count_cards
(see
page
101) can be used to check how many
boards are detected by the driver DLL.
All multi-board commands are listed in
page
69.
Examples: (Pascal)
1. n_jump_abs(1, 500, 500)
writes a jump command to the point (500, 500)
into the current list of RTC
2. n_execute_list(RTC4_no, list_no)
executes list number list_no (1 or 2) on the
®
RTC
4 board with the number specified by the
variable RTC4_no.
®
RTC
4 PC Interface Board
Rev. 1.3 e
5 Advanced Programming
®
4 Boards
3. sn_1 := n_get_serial_number(1)
(B) Sequential Programming
For sequential programming, the command
select_rtc (see page 103)
installed RTC
method, the normal (single board) commands can be
used. The multi-board commands are not affected by
the command select_rtc. All commands following
the select_rtc command are sent to the selected
board until the command select_rtc is used again.
The specified RTC
®
4 boards:
the total number of RTC
rtc4_count_cards (page
Care must be taken if several programs or processes
are running on one system simultaneously, because
the command select_rtc immediately redirects the
output of all currently running processes to the
specified RTC
In multi-tasking or multi-threaded applications, this
can result in programming errors. For such applica-
tions, only the multi-board commands described in
section (A) should be used.
®
4 board to
®
4
chapter 10.1,
®
4 board #1.
returns the serial number of board #1.
activates one of the
®
4 boards. In this programming
®
4 number must not be larger than
®
4 boards. Also see
101).
®
4 board.
Caution!
• The command select_rtc defines the active
®
RTC
4 board for all programs (threads) that are
currently running.
In multi-tasking or multi-threaded applications,
this can result in programming errors. For such
applications, only multi-board commands
should be used.
43
Need help?
Do you have a question about the RTC 4 and is the answer not in the manual?