IEC61850_GVL (GVL) ¶ VAR_GLOBAL CONSTANT //Set by configurator C_IEC61850_MAX_CLIENTS : BYTE := 1; C_IEC61850_MAX_REPORTBUFFER_SIZE : DINT := 5000; C_IEC61850_MAX_DATASET_ENTRY : INT := 50; C_IEC61850_ALL_DATASET_ENTRIES : DWORD := 150; C_IEC61850_MAX_DATASETS : INT := 3; C_IEC61850_MAX_VSTRING32 : WORD := 0; C_IEC61850_MAX_VSTRING64 : WORD := 0; C_IEC61850_MAX_VSTRING255 : WORD := 0; C_IEC61850_MAX_OCTED64 : WORD := 0; C_IEC61850_MAX_OCTED255 : WORD := 0; C_IEC61850_MAX_UCSTRING255 : WORD := 0; C_IEC61850_CLOCK_TIMEZONE : SINT := 0; C_IEC61850_CLOCK_DST : INT := 0; C_IEC61850_ACCEPTED_CLIENTS : ARRAY[1..5] OF STRING := [‘0.0.0.0’,’0.0.0.0’,’0.0.0.0’,’0.0.0.0’,’0.0.0.0’]; C_IEC61850_REPORT_ENA : BOOL := FALSE; END_VAR InOut: Scope Name Type Initial Comment gdwIEC61850_SemHandle DWORD 16#FFFFFFFF MS??? gfbIEC61850_MMSInterpreter IEC61850_MMS_InterpreterFB gxIEC61850_InitSend BOOL gIEC61850Time IEC61850_DateTime gIEC61850_DTNow tyIEC61850_AT_EntryTime gIEC61850_UTC tyIEC61850_AT_TimeStamp gdwIEC61850_TimeStampMS_now DWORD gwIEC61850_TimeStampDay_now WORD gxIEC61850Report BOOL asIEC61850_BasicNames ARRAY [IEC61850_MMS_FC_START..IEC61850_MMS_FC_END] OF STRING Dynamic basicname array gaIEC61850_DataSetRef ARRAY [0..C_IEC61850_ALL_DATASET_ENTRIES] OF tyIEC61850_DataSetRef Alle Einträge der Datasets gnIEC61850_NumsOfDataSetEntries INT Anzahl von allen Datasetmembern gsIEC61850_ErrorMsg STRING gwIEC61850_CurrMaxMsgSize WORD Aktuell größtes Paket gsIEC61850_DatasetError ARRAY [0..15] OF STRING Debug Anzeige, wenn Dataseteinträge nicht gefunden werden gxIEC61850_ClientIsConnected ARRAY [1..C_IEC61850_MAX_CLIENTS] OF BOOL Verbindungsstatus jeder Connection gnIEC61850_SocketCounter INT gtyIEC61850_TxSPDUReports tyISO_SPDU gdwIEC61850_SocketClose DWORD Anzahl der Socket Schließungen gaWriteStringTable ARRAY [0..IEC61850_MAX_WRITETABLE] OF STRING gnWriteStringTableIx INT giLogicalDevice iIEC61850_LogicalDevice gxIEC61850_KeepAliveEna : BOOL := FALSE; (* Enable KeepAlive * ) gaVisSTRING32 ARRAY [0..C_IEC61850_MAX_VSTRING32] OF tyIEC61850_AT_VisSTRING32 gaVisSTRING64 ARRAY [0..C_IEC61850_MAX_VSTRING64] OF tyIEC61850_AT_VisSTRING64 gaVisSTRING65 ARRAY [0..C_IEC61850_MAX_VSTRING65] OF tyIEC61850_AT_VisSTRING65 gaVisSTRING129 ARRAY [0..C_IEC61850_MAX_VSTRING129] OF tyIEC61850_AT_VisSTRING129 gaVisSTRING255 ARRAY [0..C_IEC61850_MAX_VSTRING255] OF tyIEC61850_AT_VisSTRING255 gaOCTED64 ARRAY [0..C_IEC61850_MAX_OCTED64] OF tyIEC61850_AT_Octet64 gaOCTED255 ARRAY [0..C_IEC61850_MAX_OCTED64] OF tyIEC61850_AT_Octet255 gaUCSTRING255 ARRAY [0..C_IEC61850_MAX_UCSTRING255] OF tyIEC61850_AT_UCSTRING255 gsiIEC61850_CLOCK_TimeZone SINT C_IEC61850_CLOCK_TIMEZONE gnIEC61850_CLOCK_DST_Mode INT C_IEC61850_CLOCK_DST gxIEC61850_ClockBy_SNTP BOOL gxIEC61850_Clock_SyncOk BOOL TRUE, wenn die Synchronistaion der IEC-Clock erfolgreich war gdtIEC61850_Clock_DT DT die zuletzt aus dem RTC-Modul ausgelesene Zeit als IEC61131 Datentyp DT gIEC61850SyncTime TIME gxIEC61850_IntelByteOrder BOOL gfbIEC61850_ASN1_Decoder IEC61850_ASN1_NewDecoder geIEC61850_Subs_Sim_Mode ENUM61850_SIM_MODE Mode for the GOOSE Subscriber gwIEC61850_ISO8073_DstRef WORD ENUM61850C_SIM_MODE_NORMAL: All valid GOOSE messages will be processed. GOOSE Flag Simulation is FALSE; All GOOSE messages will be rejected. GOOSE Flag Simulation is TRUE; ENUM61850C_SIM_MODE_SIMULATION: All valid GOOSE messages will be rejected. GOOSE Flag Simulation is FALSE; All GOOSE messages will be processed. GOOSE Flag Simulation is TRUE; gwIEC61850_BufferStartIx WORD C_IEC61850_START_TX_IX gdwIEC61850_LocalDetailCall DWORD Max MMS PDU size geIEC61850_LLN0_Mode tyIEC61850_AT_ENUM_MODE gxIEC61850_ErrorPDU BOOL Error PDU should be send Constant C_IEC61850_VENDOR_NAME STRING(32) ‘3S-Smart Software Solutions GmbH’ C_IEC61850_MODEL_NAME STRING(30) ‘XXX-XXX’ C_IEC61850_REVISION STRING(6) ‘1.0.0’ C_IEC61850_DELAY_TIME_SENDMSG TIME TIME#0ms Verzögerungszeit beim senden großer Pakete. Zeit kann bei Remote-Verbindungen verändert werden. C_IEC61850_DATSETMASKE ARRAY [0..33] OF DWORD [0, 16#1, 16#2, 16#4, 16#8, 16#10, 16#20, 16#40, 16#80, 16#100, 16#200, 16#400, 16#800, 16#1000, 16#2000, 16#4000, 16#8000, 16#10000, 16#20000, 16#40000, 16#80000, 16#100000, 16#200000, 16#400000, 16#800000, 16#1000000, 16#2000000, 16#4000000, 16#8000000, 16#10000000, 16#20000000, 16#40000000, 16#80000000] C_IEC61850_FC_NAME ARRAY [1..17] OF STRING(3) [‘EX’, ‘US’, ‘MS’, ‘SE’, ‘SV’, ‘GS’, ‘GO’, ‘BR’, ‘LG’, ‘RP’, ‘SG’, ‘SP’, ‘DC’, ‘CF’, ‘CO’, ‘ST’, ‘MX’] C_IEC61850_ATTR_NAMES ARRAY [0..222] OF STRING(11) [‘d’, ‘dU’, ‘cdcNs’, ‘cdcName’, ‘dataNs’, ‘general’, ‘dirGeneral’, ‘phsA’, ‘dirPhsA’, ‘phsB’, ‘dirPhsB’, ‘phsC’, ‘dirPhsC’, ‘neut’, ‘dirNeut’, ‘q’, ‘t’, ‘operTm’, ‘setMag’, ‘origin’, ‘ctlModel’, ‘units’, ‘sVC’, ‘minVal’, ‘maxVal’, ‘stepSize’, ‘actVal’, ‘frVal’, ‘frTm’, ‘pulsQty’, ‘frEna’, ‘strTm’, ‘frPd’, ‘frRs’, ‘ctlVal’, ‘ctlNum’, ‘valWTr’, ‘stSeld’, ‘subEna’, ‘subVal’, ‘subQ’, ‘subID’, ‘persistent’, ‘instCVal’, ‘cVal’, ‘range’, ‘subCVal’, ‘db’, ‘zeroDb’, ‘rangeC’, ‘magSVC’, ‘angSVC’, ‘angRef’, ‘smpRate’, ‘xUnit’, ‘xD’, ‘yUnit’, ‘yD’, ‘numPts’, ‘setCharact’, ‘setParA’, ‘setParB’, ‘setParC’, ‘setParD’, ‘setParE’, ‘setParF’, ‘phsAB’, ‘phsBC’, ‘phsCA’, ‘stVal’, ‘pulseConfig’, ‘vendor’, ‘hwRev’, ‘swRev’, ‘serNum’, ‘model’, ‘location’, ‘phsABHar’, ‘phsBCHar’, ‘phsCAHar’, ‘numHar’, ‘numCyc’, ‘evalTm’, ‘frequency’, ‘hvRef’, ‘rmsCyc’, ‘har’, ‘phsAHar’, ‘phsBHar’, ‘phsCHar’, ‘neutHar’, ‘netHar’, ‘resHar’, ‘setVal’, ‘configRev’, ‘ldNs’, ‘lnNs’, ‘instMag’, ‘mag’, ‘subMag’, ‘min’, ‘max’, ‘cnt’, ‘sev’, ‘addr’, ‘addInfo’, ‘c1’, ‘c2’, ‘c3’, ‘seqT’, ‘phsRef’, ‘net’, ‘res’, ‘orCat’, ‘orIdent’, ‘sboTimeout’, ‘sboClass’, ‘multiplier’, ‘SIUnit’, ‘numPls’, ‘offDur’, ‘onDur’, ‘cmdQual’, ‘scaleFactor’, ‘offset’, ‘f’, ‘llLim’, ‘lLim’, ‘hLim’, ‘hhLim’, ‘posVal’, ‘transInd’, ‘xVal’, ‘yVal’, ‘crvPts’, ‘ang’, ‘RptID’, ‘RptEna’, ‘DatSet’, ‘ConfRev’, ‘OptFlds’, ‘BufTm’, ‘SqNum’, ‘TrgOps’, ‘IntgPd’, ‘GI’, ‘PurgeBuf’, ‘EntryID’, ‘TimeofEntry’, ‘ResvTms’, ‘Resv’, ‘Oper’, ‘T’, ‘Test’, ‘Check’, ‘mxVal’, ‘APPID’, ‘DstAddress’, ‘VID’, ‘PRIORITY’, ‘NdsCom’, ‘GoID’, ‘GoEna’, ‘Addr’, ‘alTm’, ‘alCt’, ‘cmTm’, ‘cmCt’, ‘stTm’, ‘stCt’, ‘numAlm’, ‘tot’, ‘yly’, ‘mly’, ‘dly’, ‘tmTot’, ‘oldTmVal’, ‘actTmVal’, ‘rsPer’, ‘hisRs’, ‘manRs’, ‘chaManRs’, ‘oldVal’, ‘sdvVal’, ‘totAvVal’, ‘maxMxVal’, ‘minMxVal’, ‘decRate’, ‘incRate’, ‘chaPerRs’, ‘spAcs’, ‘oldSp’, ‘actSp’, ‘datSetMx’, ‘smpTmms’, ‘pstTmms’, ‘preTmms’, ‘ctTot’, ‘oldCtVal’, ‘actCtVal’, ‘oldSt’, ‘actSt’, ‘cmAcs’, ‘almTm’, ‘almCt’, ‘seqId’, ‘oldStp’, ‘almAck’, ‘dataSetSt’, ‘almStPos’, ‘almLev’, ‘stDT’, ‘tmCountry’, ‘tmLang’, ‘tmTZ’, ‘tmAutoDT’, ‘tmDT’, ‘tmUseDT’, ‘tmOffset’, ‘SBO’, ‘operTmPhsC’, ‘operTmPhsB’, ‘operTmPhsA’] C_IEC61850_YEAR_TABLE ARRAY [1970..2149] OF WORD [0, 365, 730, 1096, 1461, 1826, 2191, 2557, 2922, 3287, 3652, 4018, 4383, 4748, 5113, 5479, 5844, 6209, 6574, 6940, 7305, 7670, 8035, 8401, 8766, 9131, 9496, 9862, 10227, 10592, 10957, 11323, 11688, 12053, 12418, 12784, 13149, 13514, 13879, 14245, 14610, 14975, 15340, 15706, 16071, 16436, 16801, 17167, 17532, 17897, 18262, 18628, 18993, 19358, 19723, 20089, 20454, 20819, 21184, 21550, 21915, 22280, 22645, 23011, 23376, 23741, 24106, 24472, 24837, 25202, 25567, 25933, 26298, 26663, 27028, 27394, 27759, 28124, 28489, 28855, 29220, 29585, 29950, 30316, 30681, 31046, 31411, 31777, 32142, 32507, 32872, 33238, 33603, 33968, 34333, 34699, 35064, 35429, 35794, 36160, 36525, 36890, 37255, 37621, 37986, 38351, 38716, 39082, 39447, 39812, 40177, 40543, 40908, 41273, 41638, 42004, 42369, 42734, 43099, 43465, 43830, 44195, 44560, 44926, 45291, 45656, 46021, 46387, 46752, 47117, 47482, 47848, 48213, 48578, 48943, 49309, 49674, 50039, 50404, 50770, 51135, 51500, 51865, 52231, 52596, 52961, 53326, 53692, 54057, 54422, 54787, 55153, 55518, 55883, 56248, 56614, 56979, 57344, 57709, 58075, 58440, 58805, 59170, 59536, 59901, 60266, 60631, 60997, 61362, 61727, 62092, 62458, 62823, 63188, 63553, 63919, 64284, 64649, 65014, 65380] C_IEC61850_START_TX_IX WORD 45000 Startindex des MMS Frames C_IEC61850_HEXCHAR ARRAY [0..15] OF BYTE [16#30, 16#31, 16#32, 16#33, 16#34, 16#35, 16#36, 16#37, 16#38, 16#39, 16#41, 16#42, 16#43, 16#44, 16#45, 16#46] C_IEC61850_MAX_TCP_DATA_SIZE DINT 46000 buffer for one TCP/IP package / frame IEC61850_STRING_SIZE_255 INT 80 IEC61850_STRING_SIZE_64 INT 64 STRING_LENGTH_80 INT 80 STRING_LENGTH_255 INT 255 IEC61850_MAX_WRITETABLE INT 20 C_IEC61850_MAX_RAW_DATA_SIZE WORD 5000 Buffer size for one RAW package or frame