Simple Temperature Control
Ta treść nie jest jeszcze dostępna w Twoim języku.
This example program switches the EM-486 relay on/off depending on sensor reading. If sensor reading is below minimum value, then relay is turned ON. If sensor reading is above maximum value, then relay is turned OFF. In between - relay state is undefined (not controlled by EM-486).
The program is controlled through Overvis using registers on EM-486 device.
| Address | Description |
|---|---|
| 5250 | Lower temperature threshold |
| 5251 | Upper temperature threshold |
!META* PROTOCOLVERSION 9
!PARAMS# EM-486 input 1 (connect temperature sensor to input 1)0 * INT16 H 150# Setting: Lower temperature threshold - Overvis parameter address 52501 * INT16 H 5500# Setting: Upper temperature threshold - Overvis parameter address 52512 * INT16 H 5501# EM-486 relay 1 state3 * UINT16 H 160
!VARS# Temperature sensor value0 PARAMVAL P0# Lower temperature threshold setting1 PARAMVAL P1# Upper temperature threshold setting2 PARAMVAL P2# Relay 1 state3 PARAMVAL P3
!CONDS# Temperature value is below lower border0 VARLSVAR V0 V1# Temperature value is higher than upper border1 VARGRVAR V0 V2# Relay 1 is switched on2 VAREQVAL V3 1# Relay 1 is switched off3 VAREQVAL V3 0# Relay should be switched on4 AND C0 C3# Relay should be switched off5 AND C1 C2
!ACTS0 RELAYON 1 11 RELAYOFF 1 1
!REACTS* C4 ACT A0* C5 ACT A1
# END.This program can easily be modified to control the OB-215 relay with EM-486. In that case, parameter P3 should be changed to relay value of OB-215 and ON/OFF actions (section !ACTS) should be changed to OB-215 control register modifications. See Astronomical Timer example for reference.