IMSE ExD8
Detaljer
- Typ
- Drivrutin
- Upplaggd av
- Daniel Carlson, Abelko Innovation
- Version
- 4
- Uppdaterad
- 2016-05-13
- Skapad
- 2015-01-15
- Kategori
- AEACom, IO enheter
- Visningar
- 4927
Beskrivning
Typdefinition för Abelkos expansionsmodul ExD8 som ingår IMSE-familjen. Detta skript används då modulen kopplas på en AeA-combuss.
Modulen har 4 digitala ingångar och 4 digitala reläutgångar.
Bruksanvisning
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 2016-05-13 DC Munit added for counters and frequency
%
AEADEVICE EX_D8 NAMED "ExD8" TYPEID 64001 IS
% Type definition
PARAMETER
%%%%%%%%%%%%%%%%%%%%%%%
% Communication timeout
ComTimeout: "Com timeout" [""] INT
| (sv) "Kommunikationstimeout"
| (en) "Communication timeout"
| (MENU) "YES";
%%%%%%%%%%%%%%%%
% Reset counters
DI1_CounterReset: "DI1 Reset counter" [""] INT
| (sv) "DI1 Nollställ räknare"
| (en) "DI1 Reset counter"
| (NODE) "DI1";
DI2_CounterReset: "DI2 Reset counter" [""] INT
| (sv) "DI2 Nollställ räknare"
| (en) "DI2 Reset counter"
| (NODE) "DI2";
DI3_CounterReset: "DI3 Reset counter" [""] INT
| (sv) "DI3 Nollställ räknare"
| (en) "DI3 Reset counter"
| (NODE) "DI3";
DI4_CounterReset: "DI4 Reset counter" [""] INT
| (sv) "DI4 Nollställ räknare"
| (en) "DI4 Reset counter"
| (NODE) "DI4";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Reset counter overflow flag
DI1_OverflowFlagReset: "DI1 Reset overflow" [""] INT
| (sv) "DI1 Nollställ fullindikering"
| (en) "DI1 Reset overflow flag"
| (NODE) "DI1";
DI2_OverflowFlagReset: "DI2 Reset overflow" [""] INT
| (sv) "DI2 Nollställ fullindikering"
| (en) "DI2 Reset overflow flag"
| (NODE) "DI2";
DI3_OverflowFlagReset: "DI3 Reset overflow" [""] INT
| (sv) "DI3 Nollställ fullindikering"
| (en) "DI3 Reset overflow flag"
| (NODE) "DI3";
DI4_OverflowFlagReset: "DI4 Reset overflow" [""] INT
| (sv) "DI4 Nollställ fullindikering"
| (en) "DI4 Reset overflow flag"
| (NODE) "DI4";
%%%%%%%%%%%%%%%%
% Flank Settings
DI1_FlankSettings: "DI1 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI1 Flankinställning"
| (en) "DI1 Flank setting"
| (NODE) "DI1"
| (MENU) "YES";
DI2_FlankSettings: "DI2 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI2 Flankinställning"
| (en) "DI2 Flank setting"
| (NODE) "DI2"
| (MENU) "YES";
DI3_FlankSettings: "DI3 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI3 Flankinställning"
| (en) "DI3 Flank setting"
| (NODE) "DI3"
| (MENU) "YES";
DI4_FlankSettings: "DI4 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI4 Flankinställning"
| (en) "DI4 Flank setting"
| (NODE) "DI4"
| (MENU) "YES";
%%%%%%%%%%%%%%
% Trip voltage
DI_TripVoltage: "DI Trip voltage" ["10V,4V"] ENUM
| (sv) "DI Omslagsspänning"
| (en) "DI Trip voltage"
| (MENU) "YES";
%%%%%%%%%%%%%%%%
% Digital output
DO1: "DO1" [""] INT
| (sv) "DO1"
| (en) "DO1"
| (NODE) "DO1";
DO2: "DO2" [""] INT
| (sv) "DO2"
| (en) "DO2"
| (NODE) "DO2";
DO3: "DO3" [""] INT
| (sv) "DO3"
| (en) "DO3"
| (NODE) "DO3";
DO4: "DO4" [""] INT
| (sv) "DO4"
| (en) "DO4"
| (NODE) "DO4";
PUBLIC
%%%%%%%%%%%%%%%%%%%%%%%
% Cable sequence number
CSN: "CSN" [""] INT
| (sv) "Kabelsekvensnummer"
| (en) "Cable sequence number"
| (MENU) "YES";
%%%%%%%%%%%%%%%
% Digital input
DI1: "DI1" [""] INT
| (sv) "DI1"
| (en) "DI1"
| (NODE) "DI1";
DI2: "DI2" [""] INT
| (sv) "DI2"
| (en) "DI2"
| (NODE) "DI2";
DI3: "DI3" [""] INT
| (sv) "DI3"
| (en) "DI3"
| (NODE) "DI3";
DI4: "DI4" [""] INT
| (sv) "DI4"
| (en) "DI4"
| (NODE) "DI4";
%%%%%%%%%%%
% Frequency
DI1_Freq :"DI1 Frequency" ["Hz"] FLOAT
| (sv) "DI1 Frekvens"
| (en) "DI1 Frequency"
| (NODE) "DI1"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI2_Freq :"DI2 Frequency" ["Hz"] FLOAT
| (sv) "DI2 Frekvens"
| (en) "DI2 Frequency"
| (NODE) "DI2"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI3_Freq :"DI3 Frequency" ["Hz"] FLOAT
| (sv) "DI3 Frekvens"
| (en) "DI3 Frequency"
| (NODE) "DI3"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI4_Freq :"DI4 Frequency" ["Hz"] FLOAT
| (sv) "DI4 Frekvens"
| (en) "DI4 Frequency"
| (NODE) "DI4"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
%%%%%%%%%
% Counter
DI1_Counter: "DI1 Counter" [""] INT
| (sv) "DI1 Räknare"
| (en) "DI1 Counter"
| (NODE) "DI1"
| (MUNIT) "pulses";
DI2_Counter: "DI2 Counter" [""] INT
| (sv) "DI2 Räknare"
| (en) "DI2 Counter"
| (NODE) "DI2"
| (MUNIT) "pulses";
DI3_Counter: "DI3 Counter" [""] INT
| (sv) "DI3 Räknare"
| (en) "DI3 Counter"
| (NODE) "DI3"
| (MUNIT) "pulses";
DI4_Counter: "DI4 Counter" [""] INT
| (sv) "DI4 Räknare"
| (en) "DI4 Counter"
| (NODE) "DI4"
| (MUNIT) "pulses";
%%%%%%%%%%%%%%%%%%
% Counter overflow
DI1_Overflow: "DI1 Counter Overflow" [""] INT
| (sv) "DI1 Räknare full"
| (en) "DI1 Counter overflow"
| (NODE) "DI1";
DI2_Overflow: "DI2 Counter Overflow" [""] INT
| (sv) "DI2 Räknare full"
| (en) "DI2 Counter overflow"
| (NODE) "DI2";
DI3_Overflow: "DI3 Counter Overflow" [""] INT
| (sv) "DI3 Räknare full"
| (en) "DI3 Counter overflow"
| (NODE) "DI3";
DI4_Overflow: "DI4 Counter Overflow" [""] INT
| (sv) "DI4 Räknare full"
| (en) "DI4 Counter overflow"
| (NODE) "DI4";
%%%%%%%%%%%%%%%
% Short circuit
DI_ShortCirc: "DI Short Circuit" [""] INT
| (sv) "DI Kortslutning"
| (en) "DI Short circuit"
| (MENU) "YES";
%%%%%%%%%%%%%
% DO Override
DO1_Overridden : "DO1 Manually overriden" [""] INT
| (sv) "DO1 Manuelt styrd"
| (en) "DO1 Manually overriden"
| (NODE) "DO1";
DO2_Overridden : "DO2 Manually overriden" [""] INT
| (sv) "DO2 Manuelt styrd"
| (en) "DO2 Manually overriden"
| (NODE) "DO2";
DO3_Overridden : "DO3 Manually overriden" [""] INT
| (sv) "DO3 Manuelt styrd"
| (en) "DO3 Manually overriden"
| (NODE) "DO3";
DO4_Overridden : "DO4 Manually overriden" [""] INT
| (sv) "DO4 Manuelt styrd"
| (en) "DO4 Manually overriden"
| (NODE) "DO4";
PRIVATE
MESSAGE MAXSIZE 46
DATA[0] -> BYTE(CSN := DATA;);
DATA[1] -> BYTE(DI1 := DATA;);
DATA[2] -> BYTE(DI2 := DATA;);
DATA[3] -> BYTE(DI3 := DATA;);
DATA[4] -> BYTE(DI4 := DATA;);
DATA[5] -> FLOAT(DI1_Freq := DATA;);
DATA[9] -> FLOAT(DI2_Freq := DATA;);
DATA[13] -> FLOAT(DI3_Freq := DATA;);
DATA[17] -> FLOAT(DI4_Freq := DATA;);
DATA[21] -> WORD32(DI1_Counter := DATA;);
DATA[25] -> WORD32(DI2_Counter := DATA;);
DATA[29] -> WORD32(DI3_Counter := DATA;);
DATA[33] -> WORD32(DI4_Counter := DATA;);
DATA[37] -> BYTE(DI1_Overflow := DATA;);
DATA[38] -> BYTE(DI2_Overflow := DATA;);
DATA[39] -> BYTE(DI3_Overflow := DATA;);
DATA[40] -> BYTE(DI4_Overflow := DATA;);
DATA[41] -> BYTE(DI_ShortCirc := DATA;);
DATA[42] -> BYTE(DO1_Overridden := DATA;);
DATA[43] -> BYTE(DO2_Overridden := DATA;);
DATA[44] -> BYTE(DO3_Overridden := DATA;);
DATA[45] -> BYTE(DO4_Overridden := DATA;);
ACKNOWLEDGE
DATA[0] := BYTE(ComTimeout);
DATA[1] := BYTE(DI1_CounterReset + DI1_OverflowFlagReset*2 + DI1_FlankSettings*4);
DATA[2] := BYTE(DI2_CounterReset + DI2_OverflowFlagReset*2 + DI2_FlankSettings*4);
DATA[3] := BYTE(DI3_CounterReset + DI3_OverflowFlagReset*2 + DI3_FlankSettings*4);
DATA[4] := BYTE(DI4_CounterReset + DI4_OverflowFlagReset*2 + DI4_FlankSettings*4);
DATA[5] := BYTE(DI_TripVoltage);
DATA[6] := BYTE(DO1);
DATA[7] := BYTE(DO2);
DATA[8] := BYTE(DO3);
DATA[9] := BYTE(DO4);
END;
END;
%
% 2016-05-13 DC Munit added for counters and frequency
%
AEADEVICE EX_D8 NAMED "ExD8" TYPEID 64001 IS
% Type definition
PARAMETER
%%%%%%%%%%%%%%%%%%%%%%%
% Communication timeout
ComTimeout: "Com timeout" [""] INT
| (sv) "Kommunikationstimeout"
| (en) "Communication timeout"
| (MENU) "YES";
%%%%%%%%%%%%%%%%
% Reset counters
DI1_CounterReset: "DI1 Reset counter" [""] INT
| (sv) "DI1 Nollställ räknare"
| (en) "DI1 Reset counter"
| (NODE) "DI1";
DI2_CounterReset: "DI2 Reset counter" [""] INT
| (sv) "DI2 Nollställ räknare"
| (en) "DI2 Reset counter"
| (NODE) "DI2";
DI3_CounterReset: "DI3 Reset counter" [""] INT
| (sv) "DI3 Nollställ räknare"
| (en) "DI3 Reset counter"
| (NODE) "DI3";
DI4_CounterReset: "DI4 Reset counter" [""] INT
| (sv) "DI4 Nollställ räknare"
| (en) "DI4 Reset counter"
| (NODE) "DI4";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Reset counter overflow flag
DI1_OverflowFlagReset: "DI1 Reset overflow" [""] INT
| (sv) "DI1 Nollställ fullindikering"
| (en) "DI1 Reset overflow flag"
| (NODE) "DI1";
DI2_OverflowFlagReset: "DI2 Reset overflow" [""] INT
| (sv) "DI2 Nollställ fullindikering"
| (en) "DI2 Reset overflow flag"
| (NODE) "DI2";
DI3_OverflowFlagReset: "DI3 Reset overflow" [""] INT
| (sv) "DI3 Nollställ fullindikering"
| (en) "DI3 Reset overflow flag"
| (NODE) "DI3";
DI4_OverflowFlagReset: "DI4 Reset overflow" [""] INT
| (sv) "DI4 Nollställ fullindikering"
| (en) "DI4 Reset overflow flag"
| (NODE) "DI4";
%%%%%%%%%%%%%%%%
% Flank Settings
DI1_FlankSettings: "DI1 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI1 Flankinställning"
| (en) "DI1 Flank setting"
| (NODE) "DI1"
| (MENU) "YES";
DI2_FlankSettings: "DI2 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI2 Flankinställning"
| (en) "DI2 Flank setting"
| (NODE) "DI2"
| (MENU) "YES";
DI3_FlankSettings: "DI3 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI3 Flankinställning"
| (en) "DI3 Flank setting"
| (NODE) "DI3"
| (MENU) "YES";
DI4_FlankSettings: "DI4 Pulse edge" ["Positiv,Negativ,Båda"] ENUM
| (sv) "DI4 Flankinställning"
| (en) "DI4 Flank setting"
| (NODE) "DI4"
| (MENU) "YES";
%%%%%%%%%%%%%%
% Trip voltage
DI_TripVoltage: "DI Trip voltage" ["10V,4V"] ENUM
| (sv) "DI Omslagsspänning"
| (en) "DI Trip voltage"
| (MENU) "YES";
%%%%%%%%%%%%%%%%
% Digital output
DO1: "DO1" [""] INT
| (sv) "DO1"
| (en) "DO1"
| (NODE) "DO1";
DO2: "DO2" [""] INT
| (sv) "DO2"
| (en) "DO2"
| (NODE) "DO2";
DO3: "DO3" [""] INT
| (sv) "DO3"
| (en) "DO3"
| (NODE) "DO3";
DO4: "DO4" [""] INT
| (sv) "DO4"
| (en) "DO4"
| (NODE) "DO4";
PUBLIC
%%%%%%%%%%%%%%%%%%%%%%%
% Cable sequence number
CSN: "CSN" [""] INT
| (sv) "Kabelsekvensnummer"
| (en) "Cable sequence number"
| (MENU) "YES";
%%%%%%%%%%%%%%%
% Digital input
DI1: "DI1" [""] INT
| (sv) "DI1"
| (en) "DI1"
| (NODE) "DI1";
DI2: "DI2" [""] INT
| (sv) "DI2"
| (en) "DI2"
| (NODE) "DI2";
DI3: "DI3" [""] INT
| (sv) "DI3"
| (en) "DI3"
| (NODE) "DI3";
DI4: "DI4" [""] INT
| (sv) "DI4"
| (en) "DI4"
| (NODE) "DI4";
%%%%%%%%%%%
% Frequency
DI1_Freq :"DI1 Frequency" ["Hz"] FLOAT
| (sv) "DI1 Frekvens"
| (en) "DI1 Frequency"
| (NODE) "DI1"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI2_Freq :"DI2 Frequency" ["Hz"] FLOAT
| (sv) "DI2 Frekvens"
| (en) "DI2 Frequency"
| (NODE) "DI2"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI3_Freq :"DI3 Frequency" ["Hz"] FLOAT
| (sv) "DI3 Frekvens"
| (en) "DI3 Frequency"
| (NODE) "DI3"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
DI4_Freq :"DI4 Frequency" ["Hz"] FLOAT
| (sv) "DI4 Frekvens"
| (en) "DI4 Frequency"
| (NODE) "DI4"
| (MUNIT) "Hertz"
| (RANGE) "0-200";
%%%%%%%%%
% Counter
DI1_Counter: "DI1 Counter" [""] INT
| (sv) "DI1 Räknare"
| (en) "DI1 Counter"
| (NODE) "DI1"
| (MUNIT) "pulses";
DI2_Counter: "DI2 Counter" [""] INT
| (sv) "DI2 Räknare"
| (en) "DI2 Counter"
| (NODE) "DI2"
| (MUNIT) "pulses";
DI3_Counter: "DI3 Counter" [""] INT
| (sv) "DI3 Räknare"
| (en) "DI3 Counter"
| (NODE) "DI3"
| (MUNIT) "pulses";
DI4_Counter: "DI4 Counter" [""] INT
| (sv) "DI4 Räknare"
| (en) "DI4 Counter"
| (NODE) "DI4"
| (MUNIT) "pulses";
%%%%%%%%%%%%%%%%%%
% Counter overflow
DI1_Overflow: "DI1 Counter Overflow" [""] INT
| (sv) "DI1 Räknare full"
| (en) "DI1 Counter overflow"
| (NODE) "DI1";
DI2_Overflow: "DI2 Counter Overflow" [""] INT
| (sv) "DI2 Räknare full"
| (en) "DI2 Counter overflow"
| (NODE) "DI2";
DI3_Overflow: "DI3 Counter Overflow" [""] INT
| (sv) "DI3 Räknare full"
| (en) "DI3 Counter overflow"
| (NODE) "DI3";
DI4_Overflow: "DI4 Counter Overflow" [""] INT
| (sv) "DI4 Räknare full"
| (en) "DI4 Counter overflow"
| (NODE) "DI4";
%%%%%%%%%%%%%%%
% Short circuit
DI_ShortCirc: "DI Short Circuit" [""] INT
| (sv) "DI Kortslutning"
| (en) "DI Short circuit"
| (MENU) "YES";
%%%%%%%%%%%%%
% DO Override
DO1_Overridden : "DO1 Manually overriden" [""] INT
| (sv) "DO1 Manuelt styrd"
| (en) "DO1 Manually overriden"
| (NODE) "DO1";
DO2_Overridden : "DO2 Manually overriden" [""] INT
| (sv) "DO2 Manuelt styrd"
| (en) "DO2 Manually overriden"
| (NODE) "DO2";
DO3_Overridden : "DO3 Manually overriden" [""] INT
| (sv) "DO3 Manuelt styrd"
| (en) "DO3 Manually overriden"
| (NODE) "DO3";
DO4_Overridden : "DO4 Manually overriden" [""] INT
| (sv) "DO4 Manuelt styrd"
| (en) "DO4 Manually overriden"
| (NODE) "DO4";
PRIVATE
MESSAGE MAXSIZE 46
DATA[0] -> BYTE(CSN := DATA;);
DATA[1] -> BYTE(DI1 := DATA;);
DATA[2] -> BYTE(DI2 := DATA;);
DATA[3] -> BYTE(DI3 := DATA;);
DATA[4] -> BYTE(DI4 := DATA;);
DATA[5] -> FLOAT(DI1_Freq := DATA;);
DATA[9] -> FLOAT(DI2_Freq := DATA;);
DATA[13] -> FLOAT(DI3_Freq := DATA;);
DATA[17] -> FLOAT(DI4_Freq := DATA;);
DATA[21] -> WORD32(DI1_Counter := DATA;);
DATA[25] -> WORD32(DI2_Counter := DATA;);
DATA[29] -> WORD32(DI3_Counter := DATA;);
DATA[33] -> WORD32(DI4_Counter := DATA;);
DATA[37] -> BYTE(DI1_Overflow := DATA;);
DATA[38] -> BYTE(DI2_Overflow := DATA;);
DATA[39] -> BYTE(DI3_Overflow := DATA;);
DATA[40] -> BYTE(DI4_Overflow := DATA;);
DATA[41] -> BYTE(DI_ShortCirc := DATA;);
DATA[42] -> BYTE(DO1_Overridden := DATA;);
DATA[43] -> BYTE(DO2_Overridden := DATA;);
DATA[44] -> BYTE(DO3_Overridden := DATA;);
DATA[45] -> BYTE(DO4_Overridden := DATA;);
ACKNOWLEDGE
DATA[0] := BYTE(ComTimeout);
DATA[1] := BYTE(DI1_CounterReset + DI1_OverflowFlagReset*2 + DI1_FlankSettings*4);
DATA[2] := BYTE(DI2_CounterReset + DI2_OverflowFlagReset*2 + DI2_FlankSettings*4);
DATA[3] := BYTE(DI3_CounterReset + DI3_OverflowFlagReset*2 + DI3_FlankSettings*4);
DATA[4] := BYTE(DI4_CounterReset + DI4_OverflowFlagReset*2 + DI4_FlankSettings*4);
DATA[5] := BYTE(DI_TripVoltage);
DATA[6] := BYTE(DO1);
DATA[7] := BYTE(DO2);
DATA[8] := BYTE(DO3);
DATA[9] := BYTE(DO4);
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.