Carrier Translator module
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Ove Jansson, Abelko Innovation
- Version
- 1
- Uppdaterad
- 2013-04-06
- Skapad
- 2013-04-06
- Kategori
- Modbus, Ventilation
- Visningar
- 4253
Beskrivning
The BACnet/MODBUS Carrier Translator is a micro controller-based module that provides the ability to integrate Carrier CCN-based controllers into BACnet or Modbus-based networks.
The BACnet/MODBUS Carrier Translator (33CNTRAN485) provides CCN-to-Modbus Remote Terminal Unit (RTU) or CCN-to-BACnet
Master-Slave/Token-Passing (MS/TP) protocol conversion over BACnet /MODBUS.
Bruksanvisning
Device definition for CARRIER read input registers 0x4100-0x4113,
Device definition for CARRIER read input registers 0x4114-0x4127
Device definition for CARRIER read input registers 0x4128-0x413B
Juridisk information
Alla skript tillhandahålls i befintligt skick och all användning sker på eget ansvar. Felaktig använding kan leda till skadad eller förstörd utrustning.
Skript kod
% Device definition for CARRIER read input registers 0x4100-0x4113
% (Modbus channel 0-19 with one decimal)
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-08-04 initial version
%
DEVICETYPE CarrierAnalogA NAMED "Carrier analogA" TYPEID 21250 IS
PARAMETER
Id : "Address";
PUBLIC
% Modbus channel Point name Register
R1 : "A Hotgas t mean" ["°C"]; % 0 Hetgas temp. Average dt_a 0x4100 (16640)
R2 : "A Hotgas t kpr1" ["°C"]; % 1 Hetgas temp. kompr A1 CPA1_DGT 0x4101
R3 : "A Hotgas t kpr2" ["°C"]; % 2 Hetgas temp. kompr A2 CPA2_DGT 0x4102
R4 : "A Suction gas t" ["°C"]; % 3 Suggas temp SST_A 0x4103
R5 : "A Fluid t ext." ["°C"]; % 4 Vätske temp. (extern) 0x4104
R6 : "A KB temp in" ["°C"]; % 5 KB temp. in COOL_EWT 0x4105
R7 : "A KB temp out" ["°C"]; % 6 KB temp. ut COOL_LWT 0x4106
R8 : "A KM temp in" ["°C"]; % 7 KM temp. in COND_EWT 0x4107
R9 : "A KM temp out" ["°C"]; % 8 KM temp. ut COND_LWT 0x4108
R10 : "A Hotgas press" ["Pa"]; % 9 Hetgas tryck DP_A 0x4109
R11 : "A Suction press" ["Pa"]; % 10 Sug tryck SP_A 0x410A
R12 : "A Power ext." ["W"]; % 11 Eleffekt (extern) 0x410B
R13 : "A Cooling kpr1" [" "]; % 12 Motorkylning kompr A1 cpa1_mc1 0x410C
R14 : "A Cooling kpr2" [" "]; % 13 Motorkylning kompr A2 cpa2_mc1 0x410D
R15 : "A Motor t kpr1" ["°C"]; % 14 Motor temp. kompr A1 CPA1_TMP 0x410E
R16 : "A Motor t kpr2" ["°C"]; % 15 Motor temp. kompr A2 CPA2_TMP 0x410F
R17 : "A R17" [" "]; % 16 0x4110
R18 : "A R18" [" "]; % 17 0x4111
R19 : "A R19" [" "]; % 18 0x4112
R20 : "A R20" [" "]; % 19 0x4113
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInputA NAMED "Circuit A" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(16640); % Start address register (0x4100)
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R1 := DATA/10;);
DATA[5] -> RWORD(R2 := DATA/10;);
DATA[7] -> RWORD(R3 := DATA/10;);
DATA[9] -> RWORD(R4 := DATA/10;);
DATA[11] -> RWORD(R5 := DATA/10;);
%DATA[13] -> RWORD(R6 := DATA/10;);
DATA[13] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R6 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R6 := DATA / 1000;
ENDIF;
);
%DATA[15] -> RWORD(R7 := DATA/10;);
DATA[15] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R7 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R7 := DATA / 1000;
ENDIF;
);
DATA[17] -> RWORD(R8 := DATA/10;);
DATA[19] -> RWORD(R9 := DATA/10;);
DATA[21] -> RWORD(R10 := DATA/10;);
DATA[23] -> RWORD(R11 := DATA/10;);
DATA[25] -> RWORD(R12 := DATA/10;);
DATA[27] -> RWORD(R13 := DATA/10;);
DATA[29] -> RWORD(R14 := DATA/10;);
DATA[31] -> RWORD(R15 := DATA/10;);
DATA[33] -> RWORD(R16 := DATA/10;);
DATA[35] -> RWORD(R17 := DATA/10;);
DATA[37] -> RWORD(R18 := DATA/10;);
DATA[39] -> RWORD(R19 := DATA/10;);
DATA[41] -> RWORD(R20 := DATA/10;);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CARRIER read input registers 0x4114-0x4127
% (Modbus channel 20-39 with one decimal)
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-08-04 initial version
%
DEVICETYPE CarrierAnalogB NAMED "Carrier analogB" TYPEID 21251 IS
PARAMETER
Id : "Address";
PUBLIC
% Modbus channel Point name Register
R21 : "B Hotgas t mean" ["°C"]; % 20 Hetgas temp. Average dt_b 0x4114 (16660)
R22 : "B Hotgas t kpr1" ["°C"]; % 21 Hetgas temp. kompr B1 CPB1_DGT 0x4115
R23 : "B Hotgas t kpr2" ["°C"]; % 22 Hetgas temp. kompr B2 CPB2_DGT 0x4116
R24 : "B Suction gas t" ["°C"]; % 23 Suggas temp SST_B 0x4117
R25 : "B Fluid t ext." ["°C"]; % 24 Vätske temp. (extern) 0x4118
R26 : "B KB temp in" ["°C"]; % 25 KB temp. in COOL_EWT 0x4119
R27 : "B KB temp out" ["°C"]; % 26 KB temp. ut COOL_LWT 0x411A
R28 : "B KM temp in" ["°C"]; % 27 KM temp. in COND_EWT 0x411B
R29 : "B KM temp out" ["°C"]; % 28 KM temp. ut COND_LWT 0x411C
R30 : "B Hotgas press" ["Pa"]; % 29 Hetgas tryck DP_B 0x411D
R31 : "B Suction press" ["Pa"]; % 30 Sug tryck SP_B 0x411E
R32 : "B Power ext." ["W"]; % 31 Eleffekt (extern) 0x411F
R33 : "B Cooling kpr1" [" "]; % 32 Motorkylning kompr B1 cpb1_mc1 0x4120
R34 : "B Cooling kpr2" [" "]; % 33 Motorkylning kompr B2 cpb2_mc1 0x4121
R35 : "B Motor t kpr1" ["°C"]; % 34 Motor temp. kompr B1 CPB1_TMP 0x4122
R36 : "B Motor t kpr2" ["°C"]; % 35 Motor temp. kompr B2 CPB2_TMP 0x4123
R37 : "B R37" [" "]; % 36 0x4124
R38 : "B R38" [" "]; % 37 0x4125
R39 : "B R39" [" "]; % 38 0x4126
R40 : "B R40" [" "]; % 39 0x4127
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInputB NAMED "Circuit B" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(16660); % Start address register (0x4114)
DATA[4] := RWORD(20); % Number of registers
ANSWER SIZE 45
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
DATA[2] = BYTE(40); % Byte count
DATA[3] -> RWORD(R21 := DATA/10;);
DATA[5] -> RWORD(R22 := DATA/10;);
DATA[7] -> RWORD(R23 := DATA/10;);
DATA[9] -> RWORD(R24 := DATA/10;);
DATA[11] -> RWORD(R25 := DATA/10;);
%DATA[13] -> RWORD(R26 := DATA/10;);
DATA[13] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R26 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R26 := DATA / 1000;
ENDIF;
);
%DATA[15] -> RWORD(R27 := DATA/10;);
DATA[15] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R27 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R27 := DATA / 1000;
ENDIF;
);
DATA[17] -> RWORD(R28 := DATA/10;);
DATA[19] -> RWORD(R29 := DATA/10;);
DATA[21] -> RWORD(R30 := DATA/10;);
DATA[23] -> RWORD(R31 := DATA/10;);
DATA[25] -> RWORD(R32 := DATA/10;);
DATA[27] -> RWORD(R33 := DATA/10;);
DATA[29] -> RWORD(R34 := DATA/10;);
DATA[31] -> RWORD(R35 := DATA/10;);
DATA[33] -> RWORD(R36 := DATA/10;);
DATA[35] -> RWORD(R37 := DATA/10;);
DATA[37] -> RWORD(R38 := DATA/10;);
DATA[39] -> RWORD(R39 := DATA/10;);
DATA[41] -> RWORD(R40 := DATA/10;);
TIMEOUT 2000
END;
END;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Device definition for CARRIER read input registers 0x4128-0x413B
% (Modbus channel 40-59 with one decimal)
%
% Settings module:
% Parity: None
% Baud: 9600
% Mode: RTU
%
% Note! Telegram for reading Analog status
%
% Author: Peter Widetun, ABELKO AB Luleå
% History: 2008-08-04 initial version
%
DEVICETYPE CarrierAnalogC NAMED "Carrier analogC" TYPEID 21252 IS
PARAMETER
Id : "Address";
PUBLIC
% Modbus channel Point name Register
R41 : "C Hotgas t mean" ["°C"]; % 40 Hetgas temp. Average dt_c 0x4128 (16680)
R42 : "C Hotgas t kpr1" ["°C"]; % 41 Hetgas temp. kompr C1 CPC1_DGT 0x4129
R43 : "C Hotgas t kpr2" ["°C"]; % 42 Hetgas temp. kompr C2 CPC2_DGT 0x412A
R44 : "C Suction gas t" ["°C"]; % 43 Suggas temp SST_C 0x412B
R45 : "C Fluid t ext." ["°C"]; % 44 Vätske temp. (extern) 0x412C
R46 : "C KB temp in" ["°C"]; % 45 KB temp. in COOL_EWT 0x412D
R47 : "C KB temp out" ["°C"]; % 46 KB temp. ut COOL_LWT 0x412E
R48 : "C KM temp in" ["°C"]; % 47 KM temp. in COND_EWT 0x412F
R49 : "C KM temp out" ["°C"]; % 48 KM temp. ut COND_LWT 0x4130
R50 : "C Hotgas press" ["Pa"]; % 49 Hetgas tryck DP_C 0x4131
R51 : "C Suction press" ["Pa"]; % 50 Sug tryck SP_C 0x4132
R52 : "C Power ext." ["W"]; % 51 Eleffekt (extern) 0x4133
R53 : "C Cooling kpr1" [" "]; % 52 Motorkylning kompr C1 cpc1_mc1 0x4134
R54 : "C Cooling kpr2" [" "]; % 53 Motorkylning kompr C2 cpc2_mc1 0x4135
R55 : "C Motor t kpr1" ["°C"]; % 54 Motor temp. kompr C1 CPC1_TMP 0x4136
R56 : "C Motor t kpr2" ["°C"]; % 55 Motor temp. kompr C2 CPC2_TMP 0x4137
R57 : "C R57" [" "]; % 56 0x4138
R58 : "C R58" [" "]; % 57 0x4139
R59 : "C R59" [" "]; % 58 0x413A
R60 : "C R60" [" "]; % 59 0x413B
PRIVATE
BAUDRATE 9600;
CHECKSUM MODBUS SWAPPED;
TELEGRAM AnalogInputC NAMED "Circuit C" IS
QUESTION
DATA[0] := BYTE(Id); % Modbus unit address
DATA[1] := HEX(04); % Modbus command "04h" Read registers
DATA[2] := RWORD(16680); % Start address register (0x4128)
%DATA[4] := RWORD(20); % Number of registers
DATA[4] := RWORD(19); % Number of registers
%ANSWER SIZE 45
ANSWER SIZE 43
DATA[0] = BYTE(Id); % ID
DATA[1] = HEX(04); % Modbus command "04h" Read registers
%DATA[2] = BYTE(40); % Byte count
DATA[2] = BYTE(38); % Byte count
DATA[3] -> RWORD(R41 := DATA/10;);
DATA[5] -> RWORD(R42 := DATA/10;);
DATA[7] -> RWORD(R43 := DATA/10;);
DATA[9] -> RWORD(R44 := DATA/10;);
DATA[11] -> RWORD(R45 := DATA/10;);
%DATA[13] -> RWORD(R46 := DATA/10;);
DATA[13] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R46 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R46 := DATA / 1000;
ENDIF;
);
%DATA[15] -> RWORD(R47 := DATA/10;);
DATA[15] -> RWORD(IF DATA > 32767 THEN % Negativ ?
R47 := 0 - (1 + (65535-DATA)) / 1000;
ELSE
R47 := DATA / 1000;
ENDIF;
);
DATA[17] -> RWORD(R48 := DATA/10;);
DATA[19] -> RWORD(R49 := DATA/10;);
DATA[21] -> RWORD(R50 := DATA/10;);
DATA[23] -> RWORD(R51 := DATA/10;);
DATA[25] -> RWORD(R52 := DATA/10;);
DATA[27] -> RWORD(R53 := DATA/10;);
DATA[29] -> RWORD(R54 := DATA/10;);
DATA[31] -> RWORD(R55 := DATA/10;);
DATA[33] -> RWORD(R56 := DATA/10;);
DATA[35] -> RWORD(R57 := DATA/10;);
DATA[37] -> RWORD(R58 := DATA/10;);
DATA[39] -> RWORD(R59 := DATA/10;);
%DATA[41] -> RWORD(R60 := DATA/10;);
TIMEOUT 2000
END;
END;
Användarnas noteringar
Du måste vara inloggad för att göra en notering. Bli medlem eller logga in. Vi använder en moderator som godkänner noteringarna innan de visas.