RTC
®
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
62
innovators for industry
6.2 Initialization and Program
Start-Up
To use the RTC
®
5’s commands and functions in a user
program:
• The RTC
®
5 must be fully installed – this includes
the RTC
®
5’s hardware, driver and software (see
"Installation And Start-Up", page 56
)
• The desired DLL (Win32- or Win64-based) must
be called by the user program (see
• The DLL’s functions and procedures must be
initialized in the user program (see
)
At the beginning of each user program, commands
must be called:
• that initialize the DLL for the calling user program
and assigns access rights for the installed RTC
®
5
boards (see
"Initializing the DLL and Board
• that place the installed RTC
®
5 boards into the
desired default state (see
Only afterward can the user program load its
command lists into the RTC
®
5’s list memory and start
processing.
These steps are described individually in the
following sections and summarized via a simple
example program in the last section of this
subchapter (see
6.2.1 DLL Call
If a user program is to use the DLL’s commands and
functions, then the desired DLL (Win32- or Win64-
based) must be made available (as described in
"Installation And Start-Up", page 56
) and called by
the user program.
The DLL calling convention is
stdcall
. The structure
alignment is 4 byte (for Win32) or 8 byte (for Win64).
6.2.2 Importing Commands
To facilitate importing the commands of the DLL into
a C, C
++
, C
#
or Pascal application, the RTC
®
5
software package contains corresponding utility files.
The following sections describe how to use these files
in your particular software environment
(1)
.
Pascal
Use the file
RTC5Import.pas
as a unit and call the
RTC
®
5 commands you need, like
goto_xy(1000, 2500);
for performing a jump to location 1000, 2500.
(1) Other than with implicit linking under C/C
++
, the way to
proceed doesn’t depend on which DLL is used (Win32- or
Win64-based). Nevertheless, you must always comply with the
formats and value ranges of data types used in RTC
®
5
commands (see
Caution!
• Some of the commands included in the utility
files can only be used with the appropriate
optional hardware configuration of the RTC
®
5 –
chapter 2.3 "Optional Functionality",
.
Make sure to use only the commands supported
by your version of the RTC
®
5. Refer to the
descriptions of the individual commands in
.
The command
provides information about the options
currently installed on your RTC
®
5 board.