Browse Source

配置修改

样式分支
pry 2 years ago
parent
commit
bbc5b759bc
3 changed files with 34 additions and 18 deletions
  1. +2
    -2
      BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
  2. +3
    -2
      BPASmartClient/App.config
  3. +29
    -14
      BPASmartClient/DeviceInfo.xml

BPASmartClient.MORKSM.BK.PLC/MorksMachine.cs → BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs View File

@@ -9,7 +9,7 @@ using BPASmartClient.Model.PLC;

namespace BPASmartClient.PLC
{
public class MorksMachine : BasePeripheral
public class PLCMachine : BasePeripheral
{
ModbusTcp modbusTcp = new ModbusTcp();
public string IpAddress { get; set; }
@@ -46,7 +46,7 @@ namespace BPASmartClient.PLC
}
status[par.Address] = readData;
}
Thread.Sleep(500);
}
Thread.Sleep(1000);

+ 3
- 2
BPASmartClient/App.config View File

@@ -3,7 +3,7 @@
<appSettings>
<!--通用配置-->
<!--1:且时且多冰淇淋咖啡机,2:且时且多煮面机,3:海科煮面机测试店铺-->
<add key="ClientId" value="777"/>
<add key="ClientId" value="48"/>
<!--<add key="ApolloUri" value="http://10.2.1.21:28080"/>
<add key="OrderServiceUri" value="http://10.2.1.26:21527/order/"/>
<add key="StockServiceUri" value="http://10.2.1.26:21527/stock/"/>-->
@@ -36,7 +36,8 @@
<add key="AppId" value="dev1_common"/>
<add key ="Namespaces" value="DEV.test1.Config"/>-->

<!--正式环境--><!--
<!--正式环境-->
<!--
<add key="ApolloUri" value="http://47.108.65.220:28080"/>
<add key="OrderServiceUri" value="https://witt.black-pa.com/order/"/>
<add key="StockServiceUri" value="https://witt.black-pa.com/stock/"/>


+ 29
- 14
BPASmartClient/DeviceInfo.xml View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<BPADevices>
<!--<Device Name="MorkT" Module="BPASmartClient.MorkT.Device_MorkT" DeviceId="1">
<!--<Device Name="MorkT" Module="BPASmartClient.MorkT.Device_MorkT" DeviceId="1">
<Peripherals>
<Peripheral Module="BPASmartClient.Lebai.LebaiRobot">
<Parameters>
@@ -26,21 +26,36 @@
</Peripherals>
</Device>-->

<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2">
<Peripherals>
<Peripheral Module="BPASmartClient.PLC.MorksMachine">
<Parameters>
<IpAddress>192.168.6.1</IpAddress>
<Port>502</Port>
<PLCReadAddress>M,M0.1,1;M,M1.0,8;M,M2.0,9;M,M8.0,4;M,M13.5,1;M,M16.0,7;</PLCReadAddress>
</Parameters>
</Peripheral>
</Peripherals>
</Device>
<Device Name="MorkT" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="29">
<Peripherals>
<Peripheral Module="BPASmartClient.DRCoffee.CoffeeMachine">
<Parameters>
<PortName>COM5</PortName>
<BaudRate>9600</BaudRate>
<!--<IpAddress>192.168.6.1</IpAddress>
<Port>502</Port>
<PLCReadAddress>M,M0.1,1;M,M1.0,8;M,M2.0,9;M,M8.0,4;M,M13.5,1;M,M16.0,7;</PLCReadAddress>-->
</Parameters>
</Peripheral>
</Peripherals>
</Device>


<!--<Device Name="MorkF" Module="BPASmartClient.MorkF.Control_MorkF" DeviceId="2">
<Peripherals>
<Peripheral Module="BPASmartClient.PLC.PLCMachine">
<Parameters>
<IpAddress>192.168.6.1</IpAddress>
<Port>502</Port>
<PLCReadAddress>M,M0.1,1;M,M1.0,8;M,M2.0,9;M,M8.0,4;M,M13.5,1;M,M16.0,7;</PLCReadAddress>
</Parameters>
</Peripheral>
</Peripherals>
</Device>

<Device Name="Morks" Module="BPASmartClient.MorkS.Control_Morks" DeviceId="28">
<Peripherals>
<Peripheral Module="BPASmartClient.PLC.MorksMachine">
<Peripheral Module="BPASmartClient.PLC.PLCMachine">
<Parameters>
<IpAddress>192.168.1.11</IpAddress>
<Port>508</Port>
@@ -48,6 +63,6 @@
</Parameters>
</Peripheral>
</Peripherals>
</Device>
</Device>-->

</BPADevices>

Loading…
Cancel
Save