Skip to content

Commit c83773c

Browse files
committed
add udt type
1 parent 385f460 commit c83773c

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

src/S7CommPlusDriver/Core/Ids.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ public static class Ids
135135
public const int AS_CGS_AckTimestamp = 3646;
136136
public const int ControllerArea_ValueInitial = 3735;
137137
public const int ControllerArea_ValueActual = 3736;
138-
public const int ControllerArea_RuntimeModified = 3737;
138+
public const int ControllerArea_RuntimeModified = 3737;
139+
public const int UDT_Class_Rid = 3932;
139140
public const int DAI_MessageType = 4079;
140141
public const int ConstantsGlobal_Symbolics = 4275;
141142
public const int ASObjectES_Comment = 4288;

src/S7CommPlusDriver/S7CommPlusConnectionHighLevel.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public enum BlockType
2929
FB,
3030
FC,
3131
OB,
32+
UDT,
3233
}
3334

3435
public enum ProgrammingLanguage : int
@@ -312,7 +313,30 @@ public int GetBlockXml(uint relid, out string blockName, out ProgrammingLanguage
312313
Ids.DB_Class_Rid => BlockType.DB,
313314
Ids.FB_Class_Rid => BlockType.FB,
314315
Ids.FC_Class_Rid => BlockType.FC,
315-
Ids.OB_Class_Rid => BlockType.OB,
316+
Ids.UDT_Class_Rid => BlockType.UDT,
317+
Ids.OB_Class_Rid => BlockType.OB, // OB
318+
2637 => BlockType.OB, // ACCcommunicationOB
319+
2639 => BlockType.OB, // CPUredundancyErrorOB
320+
2640 => BlockType.OB, // CyclicOB
321+
2641 => BlockType.OB, // DiagnosticErrorOB
322+
2642 => BlockType.OB, // IOaccessErrorOB
323+
2643 => BlockType.OB, // IOredundancyErrorOB
324+
2644 => BlockType.OB, // PeripheralAccessErrorOB
325+
2645 => BlockType.OB, // ProcessEventOB
326+
2646 => BlockType.OB, // ProfileEventOB
327+
2647 => BlockType.OB, // ProgramCycleOB (OB1)
328+
2648 => BlockType.OB, // ProgrammingErrorOB
329+
2649 => BlockType.OB, // PullPlugEventOB
330+
2650 => BlockType.OB, // RackStationFailureOB
331+
2651 => BlockType.OB, // StartupOB
332+
2652 => BlockType.OB, // StatusEventOB
333+
2653 => BlockType.OB, // SynchronousCycleOB
334+
2654 => BlockType.OB, // TechnologyEventOB
335+
2655 => BlockType.OB, // TimeDelayOB
336+
2656 => BlockType.OB, // TimeErrorOB
337+
2657 => BlockType.OB, // TimeOfDayOB
338+
2658 => BlockType.OB, // UpdateEventOB
339+
8440 => BlockType.OB, // LookAheadOB
316340
};
317341

318342

0 commit comments

Comments
 (0)