# ===================================================================== #
# Erzeugt: 18.12.2024 12:08:57                                          #
# --------------------------------------------------------------------- #
# User   : MSCHREITER                                                   #
# Host   : SCHREITER                                                    #
# Pfad   : C:\Users\mschreiter\Documents\BACeye                         #
# Datei  : 20230807_Projektierung BACnet Modbus Master_v3.xlsm          #
# ===================================================================== #

# Kommunikationsstörung
[80 mod 20 failure]
  target = 940 bac local.BI 1

# Ist_Außenlufttemperatur
[80 mod 20 input 30]
  target = 940 bac local.AI 4
  value = formula((X-1000)/10)

# Ist_Fortlufttemperatur
[80 mod 20 input 31]
  target = 940 bac local.AI 5
  value = formula((X-1000)/10)

# Ist_Ablufttemperatur
[80 mod 20 input 32]
  target = 940 bac local.AI 6
  value = formula((X-1000)/10)

# Ist_Zulufttemperatur
[80 mod 20 input 33]
  target = 940 bac local.AI 7
  value = formula((X-1000)/10)

# Ist_externe Zulufttemperatur
[80 mod 20 input 4]
  target = 940 bac local.AI 8
  value = formula((X-1000)/10)

# Ist_externe Außenlufttemperatur
[80 mod 20 input 5]
  target = 940 bac local.AI 9
  value = formula((X-1000)/10)

# Ist_externe Raumlufttemperatur
[80 mod 20 input 9]
  target = 940 bac local.AI 10
  value = formula((X-1000)/10)

# Ist_Zuluftvolumenstrom
[80 mod 20 input 46]
  target = 940 bac local.AI 11

# Ist_Abluftvolumenstrom
[80 mod 20 input 47]
  target = 940 bac local.AI 12

# Ist_Ausgang Heizregister
[80 mod 20 input 11]
  target = 940 bac local.AI 13

# Ist_Ausgang Kühlregister
[80 mod 20 input 12]
  target = 940 bac local.AI 14

# Ist_Ausgang Vorheizregister / Solepumpe / EWT-Klappe
[80 mod 20 input 16]
  target = 940 bac local.BI 15

# Ist_Ausgang Heizanforderung Kombiregister
[80 mod 20 input 17]
  target = 940 bac local.BI 16

# Ist_Ausgang Kühlanforderung Kombiregister
[80 mod 20 input 18]
  target = 940 bac local.BI 17

# Ist_Betriebsmeldung Lüftung
[80 mod 20 input 19]
  target = 940 bac local.AI 18

# Ist_Ausgang Bypassklappe
[80 mod 20 input 20]
  target = 940 bac local.BI 19

# Ist_aktuelle Lüftungsstufe
[80 mod 20 input 59]
  target = 940 bac local.MI 20

# Ist_aktueller Betriebsstatus
[80 mod 20 input 48]
  target = 940 bac local.MI 21

# Para_Freigabe Heizung
[80 mod 20 holding 89]
  target = 940 bac local.BV 22
  prio = 8
[940 bac local.BV 22]
  target = 80 mod 20 holding 89

# Para_Freigabe Kühlung
[80 mod 20 holding 90]
  target = 940 bac local.BV 23
  prio = 8
[940 bac local.BV 23]
  target = 80 mod 20 holding 90

# Soll_Volumenstrom Lüftungsstufe 1
[80 mod 20 holding 9]
  target = 940 bac local.AV 24
  prio = 8
[940 bac local.AV 24]
  target = 80 mod 20 holding 9

# Soll_Volumenstrom Lüftungsstufe 2
[80 mod 20 holding 10]
  target = 940 bac local.AV 25
  prio = 8
[940 bac local.AV 25]
  target = 80 mod 20 holding 10

# Soll_Volumenstrom Lüftungsstufe 3
[80 mod 20 holding 11]
  target = 940 bac local.AV 26
  prio = 8
[940 bac local.AV 26]
  target = 80 mod 20 holding 11

# Soll_Volumenstrom Grundlüftung
[80 mod 20 holding 12]
  target = 940 bac local.AV 27
  prio = 8
[940 bac local.AV 27]
  target = 80 mod 20 holding 12

# Soll_Zulufttemperatur
[80 mod 20 holding 22]
  target = 940 bac local.AV 28
  value = formula((X-1000)/10)
  prio = 8
[940 bac local.AV 28]
  target = 80 mod 20 holding 22
  value = formula((X*10)+1000)

# Soll_Raumlufttemperatur
[80 mod 20 holding 23]
  target = 940 bac local.AV 29
  value = formula((X-1000)/10)
  prio = 8
[940 bac local.AV 29]
  target = 80 mod 20 holding 23
  value = formula((X*10)+1000)

# Soll_Ablufttemperatur
[80 mod 20 holding 24]
  target = 940 bac local.AV 30
  value = formula((X-1000)/10)
  prio = 8
[940 bac local.AV 30]
  target = 80 mod 20 holding 24
  value = formula((X*10)+1000)

# Ist_CO2-Wert
[80 mod 20 input 5212]
  target = 940 bac local.AI 31

# Para_Regelungsart Temperatur
[80 mod 20 holding 7]
  target = 940 bac local.MV 33
  prio = 8
[940 bac local.MV 33]
  target = 80 mod 20 holding 7

# Soll_Betriebsmode Sommer/Winter
[80 mod 20 holding 1]
  target = 940 bac local.MV 34
  prio = 8
[940 bac local.MV 34]
  target = 80 mod 20 holding 1

# Soll_Lüftungsstufe
[80 mod 20 holding 2]
  target = 940 bac local.MV 35
  value = formula(X+1)
  prio = 8
[940 bac local.MV 35]
  target = 80 mod 20 holding 2
  value = formula(X-1)

# Alarm_Lüftungsgerät
[80 mod 20 input 29]
  target = 940 bac local.BI 36

# Alarm_Reset + Neustart
[80 mod 20 holding 63]
  target = 940 bac local.BO 37
  prio = 8
[940 bac local.BO 37]
  target = 80 mod 20 holding 63
  value = formula(if(X==1;3;0))

