Pepper-computer Modular Computers RS485 Instrukcja Użytkownika Strona 175

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 320
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 174
SMART I/O Users Manual
©1996 PEP Modular Computers GmbHMarch 12, 1996 Page 5 - 19
5
Chapter 5 Analog Modules
5.1.8.4 SMDAD1GetVRaw
Syntax
error_code SMDAD1GetVRaw(u_int8 PortNr, u_int8
Channel, int16 *pValue);
Description
This function fetches the conversion result of a selected channel without
performing a gain or offset correction. The result is always a signed integer
value. If bipolar mode is selected, the function returns the 2’s complement
value of the original read.
Input
u_int8 PortNr
SM-Port to be accessed
u_int8 Channel
Number of the ADC input channel to access
(0-3)
int16 *pValue
Pointer to the location where the conversion
result will be stored
Output
error_code SUCCESS
E_SEEK
if module was not initialized
E-BMODE
if the module is unknown
or standard OS-9 error code (refer to the OS-9
Technical Manual Error Codes Section).
Example
RetVal = SMDAD1GetVRaw(0, 2, 0x07FF);
Value (16-bit HEX)
Unipolar Bipolar
Positive Full-Scale $07FF Positive Full-Scale $07FF
+1LSB $0001 +1LSB $0001
0 $0000 -1LSB $FFFF
Negative Full-Scale $F800
Przeglądanie stron 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 319 320

Komentarze do niniejszej Instrukcji

Brak uwag