Pepper-computer Modular Computers RS485 Bedienungsanleitung Seite 221

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 320
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 220
SMART I/O Users Manual
©1996 PEP Modular Computers GmbHMarch 12, 1996 Page 5 - 65
5
Chapter 5 Analog Modules
To compile the source, execute the following commands at the shell prompt:
> chd /<dev>/APPLIC/SMART
> make all
To execute the example:
load /<dev>/BSP/SMART/SMADC/adc_task * load HW task
load /<dev>/APPLIC/SMART/CMDS/demoadc * load example
demoadc [slot]
Slot = 0,1 .. 10 specifies the port of the SM-THERM module. (Default = 0)
Note that the procedure names are generic and are applicable to both the
SM-PT100 and SM-THERM modules.
Initialization
To start the HW Task, the OS-9 module adc_task must be loaded, then the
function SMADCInit must be called. To read data from a channel, the type of
sensor attached to it must be known. The PEP header file BSP/SMART/
SMADC/DEFS/smadc.h contains a list of sensors that are supported. To set
the sensor type, the function SMADCSetSensorType needs to be called.
Read RAW Data
To force the HW task to read RAW data from a channel, the function
SMADCEnableRead must be called. As soon as the HW task has received
data from this channel, a flag is set indicating a valid RAW value. Now the
users application is able to read this value by using the function
SMADCReadRaw.
Seitenansicht 220
1 2 ... 216 217 218 219 220 221 222 223 224 225 226 ... 319 320

Kommentare zu diesen Handbüchern

Keine Kommentare