Pepper Computer RS232, RS485 8 ‘C’ Programming 5.5.8.1 SM-DAC1 Library, Hardware Requirements

Models: RS485 RS232

1 320
Download 320 pages 36.43 Kb
Page 269
Image 269

Chapter 5 Analog Modules

SMART I/O User’s Manual

 

 

 

 

 

 

 

 

 

 

5.5.8‘C’ Programming 5.5.8.1 SM-DAC1 Library

The SM-DAC1 library of functions smartio.l provide a convenient way of accessing the SM-DAC1 module.

All functions are written in ANSI C;

Prototypes are to be found in the file dac1lib.h.

Hardware Requirements

SMART I/O Base Module or Base Module and Extension unit;

SM-DAC1 Module.

Software Requirements

The compiler from one of the following:

Ultra C Version 1.1.2 or higher;

FasTrak 2.0.2 or higher.

The leftmost SM-Module has number 0 assigned to it a far as programming is concerned although physically this is slot 1!

Before a library function can be used, the function SMDAC1Init must first be called. This allocates the requested resources and should be noted that it is not designed for multi-tasking. Furthermore, this function needs to be called for each SM-DAC1 Module called within the task. Upon completion of the application, the function SMDAC1DeInit needs to be called for each SM- DAC1 Module that has been initialised.

In order to illustrate the use of the SM-DAC1 library, an application example called demodac1.c can be found in the SMART I/O application directory (normally found in /<device>/APPLIC/SMART/CMDS).

5

 

 

 

 

October 01, 1996

©1996 PEP Modular Computers GmbH

Page 5 - 113

 

 

Page 269
Image 269
Pepper Computer RS232, RS485 user manual 8 ‘C’ Programming 5.5.8.1 SM-DAC1 Library, Hardware Requirements