Sensoray 118 Manuel d'utilisateur Page 21

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 38
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 20
Sensoray Model 118 Smart A/D™ Instruction Manual 19 Commands: Channel Configuration
6.2.2 SetFailMode
Establishes open sensor data values for all channels. The
second command byte contains eight flags, one for each
channel. Flags are mapped to channels as follows: bit 7
(most significant) to channel 7, bit 6 to channel 6, etc.
If a flag is set (logic 1) and the corresponding sensor is
open, the value 32767 will replace the sensor data. On the
other hand, if a flag is reset and the sensor is open, the
value -32768 will replace the sensor data.
This function is useful for triggering alarms when open
sensors are detected, and for forcing the desired system
response to fault conditions in closed-loop process
control applications.
Driver
// Set Open Sensor data values for all eight channels.
VOID SetFailMode( USHORT BasePort, UCHAR OpenFlags )
{
SendByte( CMD_SET_OPENFLAGS );
SendByte( OpenFlags );
}
Example
// A controller uses a thermocouple on channel 1 to monitor furnace
// temperature. If the thermocouple fails, the Smart A/D must indicate
// a high temperature on channel 1 to ensure that the controller turns off
// the furnace heater. This code segment sets up channel 1 to fail high
// and all other channels to fail low.
SetFailMode( MyBasePort, 0x02 ); // OpenFlags = (0,0,0,0,0,0,1,0)
Command: (80),(OpenFlags)
Response: None
Vue de la page 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 37 38

Commentaires sur ces manuels

Pas de commentaire