FieldTalk Modbus® Master Protocol Library
C++ Editions
FOCUS Software Engineering

Main Page | Modules | Class Hierarchy | Compound List | Compound Members | Related Pages

Installation and Source Code Compilation

Linux, UNIX and QNX Systems: Unpacking and Compiling the Source

1. Download and save the zipped tarball into your project directory.

2. Uncompress the zipped tarball using gzip:

# gunzip FT-MB??-??-ALL.2.0.tar.gz

3. Untar the tarball

# tar xf FT-MB??-??-ALL.2.0.tar

The tarball will create the following directory structure in your project directory:

             myprj
               |
               +-- fieldtalk
                   |
                   +-- doc
                   +-- src

4. Compile the library from the source code. Enter the FieldTalk src directory and call the make script:

# cd fieldtalk/src
# ./make

The make shell script tries to detect your platform and executes the compiler and linker commands.

The compiler and linker configuration is contained in the file src/platform.

5. The library will be compiled into one of the following platform specfic sub-directories:

Platform Library Directory
Linux lib/linux
QNX 6 lib/qnx6
QNX 4 lib/qnx4
Irix lib/irix
OSF1/True 64/Digital UNIX lib/osf
Solaris lib/solaris
HP-UX lib/hpux
IBM AIX lib/aix
Generic UNIX lib/unix

Also the necessary header files to link against the library are copied into a include directory.

Your directory structure looks now like:

             myprj
               |
               +-- fieldtalk
                   |
                   +-- doc
                   +-- src
                   +-- include
                   +-+ lib
                     |
                     +-- {platform}    (exact name depends on platform)

6. The library is ready to be used.

Windows Systems: Unpacking and Compiling the Source

1. Download and save the zip archive into a project directory.

2. Uncompress the archive using unzip or another zip tool of your choice:

# unzip FT-MB??-WIN-ALL.2.0.zip

The archive will create the following directory structure in your project directory:

             myprj
               |
               +-- fieldtalk
                   |
                   +-- doc
                   +-- src

3. Compile the library from the source code.

To compile using command line tools, enter the FieldTalk src directory and run the make file.

If you are using Microsoft C++ and nmake:

# cd fieldtalk\src
# nmake

If you are using Borland C++ and Borland's make:

# cd fieldtalk\src
# make

To compile using Visual Studio.net, open the supplied .vcproj project file with Visual Studio.net.

4. The library will be compiled into one of the following sub-directories of your project directory:

Platform Library Directory
Windows 32-bit Visual C++ lib\win32_vc
Windows 32-bit Borland C++ lib\win32_bc

Your directory structure looks now like:

             myprj
               |
               +-- fieldtalk
                   |
                   +-- doc
                   +-- src
                   +-- include
                   +-+ lib
                     |
                     +-- win32_??   (exact name depends on compiler)

5. The library is ready to be used.

Specific Platform Notes

QNX 4

In order to get proper control over Modebus timing, you have to adjust the system's clock rate. The standard ticksize is not suitable for Modbus RTU and needs to be adjusted. Configure the ticksize to a minimum of 1 ms.

VxWorks

There is no make file or script supplied for VxWorks because VxWorks applications and libraries are best compiled from the Tornado IDE.

To compile and link your applications against the FieldTalk library, add all the *.c and *.cpp files supplied in the src, src/hmlib/common, src/hmlib/posix4 and src/hmlib/vxworks to your project.