@@ -21,9 +21,12 @@ public class Step7ProjectV5 : Project, IDisposable
2121 const int objectType_Simatic300 = 1314969 ;
2222 const int objectType_Simatic400 = 1314970 ;
2323 const int objectType_Simatic400H = 1315650 ;
24+ const int objectType_SimaticRTX = 1315651 ;
2425 const int objectType_EternetInCPU3xx = 2364796 ;
26+ const int objectType_EternetInCPU3xx_2 = 2364572 ; //Alternative type e.g. 6ES7 318-3EL00-0AB0 (Only one port).
2527 const int objectType_EternetInCPU3xxF = 2364818 ;
2628 const int objectType_EternetInCPU4xx = 2364763 ;
29+ const int objectType_EternetInCPURTX = 2364315 ; // E.g. 6ES7 611-4SB00-0YB7
2730 const int objectType_MpiDPinCPU = 1314972 ;
2831 const int objectType_MpiDP400 = 1315038 ;
2932 const int objectType_MpiDP300 = 1315016 ;
@@ -238,7 +241,10 @@ override protected void LoadProject()
238241 {
239242 if ( ! ( bool ) row [ "DELETED_FLAG" ] || _showDeleted )
240243 {
241- if ( ( int ) row [ "OBJTYP" ] == objectType_Simatic300 || ( int ) row [ "OBJTYP" ] == objectType_Simatic400 || ( int ) row [ "OBJTYP" ] == objectType_Simatic400H )
244+ if ( ( int ) row [ "OBJTYP" ] == objectType_Simatic300 ||
245+ ( int ) row [ "OBJTYP" ] == objectType_Simatic400 ||
246+ ( int ) row [ "OBJTYP" ] == objectType_Simatic400H ||
247+ ( int ) row [ "OBJTYP" ] == objectType_SimaticRTX )
242248 {
243249 var x = new StationConfigurationFolder ( ) { Project = this , Parent = ProjectStructure } ;
244250 x . Name = ( ( string ) row [ "Name" ] ) . Replace ( "\0 " , "" ) ;
@@ -257,6 +263,9 @@ override protected void LoadProject()
257263 case objectType_Simatic400H :
258264 x . StationType = PLCType . Simatic400H ;
259265 break ;
266+ case objectType_SimaticRTX :
267+ x . StationType = PLCType . SimaticRTX ;
268+ break ;
260269 }
261270 x . Parent = ProjectStructure ;
262271 ProjectStructure . SubItems . Add ( x ) ;
@@ -534,7 +543,9 @@ override protected void LoadProject()
534543 {
535544 if ( ! ( bool ) row [ "DELETED_FLAG" ] || _showDeleted )
536545 {
537- if ( ( int ) row [ "ID" ] == y . ID && y . CpuType == PLCType . Simatic300 )
546+ if ( ( int ) row [ "ID" ] == y . ID &&
547+ ( y . CpuType == PLCType . Simatic300 ||
548+ y . CpuType == PLCType . SimaticRTX ) )
538549 //if ((int)row["UNITID"] == y.UnitID && y.CpuType == PLCType.Simatic300)
539550 {
540551 y . Name = ( ( string ) row [ "Name" ] ) . Replace ( "\0 " , "" ) ;
@@ -689,7 +700,9 @@ override protected void LoadProject()
689700 int fldid = ( int ) row [ "TOBJID" ] ;
690701 foreach ( var y in CPUFolders )
691702 {
692- if ( y . ID == cpuid && y . CpuType == PLCType . Simatic300 )
703+ if ( y . ID == cpuid &&
704+ ( y . CpuType == PLCType . Simatic300 ||
705+ y . CpuType == PLCType . SimaticRTX ) )
693706 {
694707 foreach ( var z in S7ProgrammFolders )
695708 {
@@ -931,7 +944,11 @@ override protected void LoadProject()
931944 pnMasterSystems . Add ( x ) ;
932945 _allFolders . Add ( x ) ;
933946 }
934- else if ( objType == objectType_EternetInCPU3xxF || objType == objectType_EternetInCPU3xx || objType == objectType_EternetInCPU4xx )
947+ else if ( objType == objectType_EternetInCPU3xxF ||
948+ objType == objectType_EternetInCPU3xx ||
949+ objType == objectType_EternetInCPU4xx ||
950+ objType == objectType_EternetInCPU3xx_2 ||
951+ objType == objectType_EternetInCPURTX )
935952 {
936953 var cpu = CPUFolders . FirstOrDefault ( x => x . ID == Convert . ToInt32 ( row [ "UNITID" ] ) ) ;
937954 if ( cpu != null ) cpu . IdTobjId = Convert . ToInt32 ( row [ "ID" ] ) ;
0 commit comments