コード例 #1
0
ファイル: SimenseMachine.cs プロジェクト: sndp60/Modbus.Net
 public SimenseMachine(SimenseType connectionType, string connectionString, SimenseMachineModel model,
     IEnumerable<AddressUnit> getAddresses, bool keepConnect) : base(getAddresses, keepConnect)
 {
     BaseUtility = new SimenseUtility(connectionType, connectionString, model);
     AddressFormater = new AddressFormaterSimense();
     AddressCombiner = new AddressCombinerContinus();
 }
コード例 #2
0
ファイル: SimenseUtility.cs プロジェクト: sndp60/Modbus.Net
 public SimenseUtility(SimenseType connectionType, string connectionString, SimenseMachineModel model)
 {
     ConnectionString = connectionString;
     switch (model)
     {
         case SimenseMachineModel.S7_200:
             {
                 _tdpuSize = 0x09;
                 _taspSrc = 0x1001;
                 _tsapDst = 0x1000;
                 _maxCalling = 0x0001;
                 _maxCalled = 0x0001;
                 _maxPdu = 0x03c0;
                 break;
             }
         case SimenseMachineModel.S7_300:
         case SimenseMachineModel.S7_400:
             {
                 _tdpuSize = 0x1a;
                 _taspSrc = 0x4b54;
                 _tsapDst = 0x0302;
                 _maxCalling = 0x0001;
                 _maxCalled = 0x0001;
                 _maxPdu = 0x00f0;
                 break;
             }
         case SimenseMachineModel.S7_1200:
         case SimenseMachineModel.S7_1500:
         {
             _tdpuSize = 0x09;
             _taspSrc = 0x4b54;
             _tsapDst = 0x0300;
             _maxCalling = 0x0001;
             _maxCalled = 0x0001;
             _maxPdu = 0x00f0;
             break;
         }
     }
     ConnectionType = connectionType;
     AddressTranslator = new AddressTranslatorSimense();            
 }
コード例 #3
0
ファイル: SimenseMachine.cs プロジェクト: sndp60/Modbus.Net
 public SimenseMachine(SimenseType connectionType, string connectionString, SimenseMachineModel model,
     IEnumerable<AddressUnit> getAddresses)
     : this(connectionType, connectionString, model, getAddresses, false)
 {
 }