3 - planning your application program, Chapter objectives, Include files – Rockwell Automation 6001-F2E AB STANDARD DRIVER SFTW User Manual

Page 12: Planning your application program

Advertising
background image

Chapter

3

3-1

Planning Your Application Program

This section guides you through the process of planning an application
program. It contains the following:

include files you need to put in your program
function calls
programming considerations

The include files contain declarations for the driver type you are using.
Define them at the top of your application program. The 6001-F2E
Standard Driver uses the following include files:

KRDEFS.H
STDDRV.H

Important: In addition to including header files in your application, you
need to link with an appropriate Standard Driver and Application Library
file (whether you are using the Application Library or not).

If you use multiple files, place KRDEFS.H and STDDRV.H in the main
file. Only one source per executable can reference each include file. If
additional source files within an executable reference the Standard Driver
software, you must do the following:

duplicate KRDEFS.H and STDDRV.H under different names
delete the following lines from the duplicate KRDEFS.H:

int max_umsg = Max_Umsg;

int max__smsg = 16;

delete from the duplicate STDDRV.H all lines beginning from the first

occurance of

/* ..... */

under the “Prototype” heading to the

end of the file

Use these edited versions in all remaining source files that reference the
6001-F2E Standard Driver software.

Chapter Objectives

Include Files

Advertising