Pepper Computer RS232 Read Temperature Values, Calibration, Deinitialization, Other Functions

Models: RS485 RS232

1 320
Download 320 pages 36.43 Kb
Page 193
Image 193

Chapter 5 Analog Modules

SMART I/O User’s Manual

 

 

 

 

 

 

 

 

 

 

Read Temperature Values

The HW task is prepared with a function that converts RAW values of a channel to degrees Celsius. To enable this facility, the function SMADCEnableConversion must be called after calling SMADCEnableRead. If the HW task has calculated these converted values, the function SMADCReadConverted can be used to get the value.

Calibration

Before the first value is fetched from the ADC, a calibration cycle is per- formed by the HW task. The user also has the facility to force the HW task to execute a calibration cycle by calling either SMADCCalibrate for one calibration or SMADCSetCyclicCalib. Then a calibration is executed if a user defined interval has expired.

Deinitialization:

If the task calling the SMADC library function finishes, the function SMADCDeInit should be called by this task to free memory and resources otherwise tied up with the application.

Other Functions

For more information on other functions, refer to the description of the functions later in this document or the example demoadc.c.

LEDs

Both LEDs on the SM-PT100 module are used to show the status of the HW task. LED1 is the upper one; LED2 is the lower one.

L E D 1

L E D 2

S t a t u s

off

off

ADC is not in use

on

off

Calibration in progress

off

on

AD conversion in progress

on

on

Standardization to reference value in progress

5

 

 

 

 

March 12, 1996

©1996 PEP Modular Computers GmbH

Page 5 - 37

 

 

Page 193
Image 193
Pepper Computer RS232, RS485 user manual Read Temperature Values, Calibration, Deinitialization, Other Functions, LEDs