customer.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?xml version="1.0"?>
  2. <!--this XML is created from a node of Simumerik OPC UA server-->
  3. <!-- <_condition1 Key="DBX35.2" Address="/plc/DB21.DBX35.2" Title="机床停止" TargetValue="0" nodeClass="Variable" />
  4. <_condition4 Key="DB21.DBB4" Address="/Plc/DB21.DBB4" Title="进给倍率" TargetValue="1" nodeClass="Variable" />
  5. <_condition4 Key="progStatus" Address="/Channel/State/progStatus" Title="AUTO自动模式" TargetValue="2" nodeClass="Variable" />
  6. -->
  7. <!--By dg-->
  8. <!-->
  9. if (readType.Equals("5")) //string
  10. {
  11. resultt = SiemensS7Net.Write(ob.ToString(), ob1.ToString());
  12. }
  13. else if (readType.Equals("3")) //int
  14. {
  15. resultt = SiemensS7Net.Write(ob.ToString(), (int)ob1);
  16. }
  17. else if (readType.Equals("6")) //byte
  18. {
  19. resultt = SiemensS7Net.Write(ob.ToString(), (byte)ob1);
  20. }
  21. else if (readType.Equals("1")) //short
  22. {
  23. if (short.TryParse(ob1.ToString(), out short value))
  24. {
  25. resultt = SiemensS7Net.Write(ob.ToString(), (short)value);
  26. }
  27. }
  28. else if (readType.Equals("2")) //bool
  29. {
  30. resultt = SiemensS7Net.Write(ob.ToString(), (bool)ob1);
  31. }
  32. <!-->
  33. <Sinumerik>
  34. <机床1 Title="机床1" Key="192.168.170.206:4840" Address="192.168.170.206:4840" Value="machine1" nodeClass="Object">
  35. <读组 Title="读组" Key="read" Address="read" Value="read" nodeClass="Object">
  36. <progStatus Key="CncState" Address="/Channel/State/progStatus" Title="cnc状态" nodeClass="Variable" />
  37. <opMode Key="CncWorkModel" Address="/Bag/State/opMode" Title="CNC工作模式" nodeClass="Variable" />
  38. <selectedWorkPProg Key="MainProgNo" Address="/Channel/ProgramInfo/selectedWorkPProg" Title="主程序号" nodeClass="Variable" />
  39. <setupTime Key="CncSumBootTime" Address="/Nck/ChannelDiagnose/setupTime" Title="系统累计开机时间" nodeClass="Variable" />
  40. <feedRateOvr Key="CutRate" Address="/Channel/GeometricAxis/feedRateOvr" Title="切削倍率" nodeClass="Variable" />
  41. <speedOvr Key="SpRate" Address="/Channel/Spindle/speedOvr" Title="主轴倍率" nodeClass="Variable" />
  42. <actSpeed Key="SpActSpeed" Address="/Channel/Spindle/actSpeed" Title="主轴实际速度" nodeClass="Variable" />
  43. <actSpeed Key="ProRunState" Address="/Plc/DB21.DBB35" Title="程序运行状态" IsBinary="true" StartPos ="0" EndPos ="4" nodeClass="Variable" />
  44. <actSpeed Key="AllowFetchMaterial" Address="/Plc/M1500.2" Title="机床允许取料" nodeClass="Variable" />
  45. <actSpeed Key="AllowPutMaterial" Address="/Plc/M1500.3" Title="机床允许放料" nodeClass="Variable" />
  46. <actSpeed Key="MachineAlarm" Address="/Plc/M1500.1" Title="机床允许放料" nodeClass="Variable" />
  47. </读组>
  48. <_程序执行 Title="程序执行" Key="execProgram" Address="/Plc/I2.1" CheckAddress="/Plc/M1500.4" Value="True" ReadType="2" TargetValue="True" nodeClass="Object">
  49. </_程序执行>
  50. <_上传程序 Title="上传程序" Key="uploadProgram" Address="/Plc/M1500.0" CheckAddress="/Plc/M1500.4" Value="True" ReadType="2" TargetValue="True" nodeClass="Object">
  51. </_上传程序>
  52. </机床1>
  53. <机床2 Title="机床2" Key="192.168.170.205:4840" Address="192.168.170.205:4840" Value="machine1" nodeClass="Object">
  54. <读组 Title="读组" Key="read" Address="read" Value="read" nodeClass="Object">
  55. <progStatus Key="CncState" Address="/Channel/State/progStatus" Title="cnc状态" nodeClass="Variable" />
  56. <opMode Key="CncWorkModel" Address="/Bag/State/opMode" Title="CNC工作模式" nodeClass="Variable" />
  57. <selectedWorkPProg Key="MainProgNo" Address="/Channel/ProgramInfo/selectedWorkPProg" Title="主程序号" nodeClass="Variable" />
  58. <setupTime Key="CncSumBootTime" Address="/Nck/ChannelDiagnose/setupTime" Title="系统累计开机时间" nodeClass="Variable" />
  59. <feedRateOvr Key="CutRate" Address="/Channel/GeometricAxis/feedRateOvr" Title="切削倍率" nodeClass="Variable" />
  60. <speedOvr Key="SpRate" Address="/Channel/Spindle/speedOvr" Title="主轴倍率" nodeClass="Variable" />
  61. <actSpeed Key="SpActSpeed" Address="/Channel/Spindle/actSpeed" Title="主轴实际速度" nodeClass="Variable" />
  62. <actSpeed Key="ProRunState" Address="/Plc/DB21.DBB35" Title="程序运行状态" IsBinary="true" StartPos ="0" EndPos ="4" nodeClass="Variable" />
  63. <actSpeed Key="AllowFetchMaterial" Address="/Plc/M1500.2" Title="机床允许取料" nodeClass="Variable" />
  64. <actSpeed Key="AllowPutMaterial" Address="/Plc/M1500.3" Title="机床允许放料" nodeClass="Variable" />
  65. <actSpeed Key="MachineAlarm" Address="/Plc/M1500.1" Title="机床是否异常" nodeClass="Variable" />
  66. </读组>
  67. <_程序执行 Title="程序执行" Key="execProgram" Address="/Plc/I2.1" CheckAddress="/Plc/M1999.1" Value="True" ReadType="2" TargetValue="True" nodeClass="Object">
  68. </_程序执行>
  69. <_上传程序 Title="上传程序" Key="uploadProgram" Address="/Plc/M1500.0" CheckAddress="/Plc/M1500.0" Value="True" ReadType="2" TargetValue="True" nodeClass="Object">
  70. </_上传程序>
  71. </机床2>
  72. <智能单元PLC1 Title="智能单元PLC1" Key="192.168.170.81:120" Address="192.168.170.81:120" Value="智能单元PLC" nodeClass="Object">
  73. <读组 Title="读组" Key="read" Address="read" Value="read" nodeClass="Object">
  74. <_progStatus Key="RunState" Address="DB3.10" Title="执行状态" ReadType="1" nodeClass="Variable" />
  75. <_progStatus Key="AllowFetchMaterial" Address="DB2.2.1" Title="机床允许取料" ReadType="2" nodeClass="Variable" />
  76. <_progStatus Key="AllowPutMaterial" Address="DB2.2" Title="机床允许放料" ReadType="2" nodeClass="Variable" />
  77. <_progStatus Key="AGVState" Address="DB2.4.7" Title="机床允许放料" ReadType="2" nodeClass="Variable" />
  78. <_progStatus Key="MachineAlarm" Address="DB2.3.1" Title="PLC是否正常" ReadType="2" nodeClass="Variable" />
  79. </读组>
  80. <取物料 Title="智能单元取物料" Key="fetchMaterial" Address="DB3.10" CheckAddress="DB3.10" Value="1" ReadType="1" TargetValue="2" nodeClass="Object">
  81. <condition1 Key="DB2.2.4" Address="DB2.2.4" Title="机器人报警" TargetValue="-9" ReadType="2" nodeClass="Variable" />
  82. </取物料>
  83. <放物料 Title="智能单元放物料" Key="putMaterial" Address="DB3.10" CheckAddress="DB3.10" Value="3" ReadType="1" TargetValue="4" nodeClass="Object">
  84. <condition1 Key="DB2.2.4" Address="DB2.2.4" Title="机器人报警" TargetValue="-9" ReadType="2" nodeClass="Variable" />
  85. </放物料>
  86. </智能单元PLC1>
  87. <柔性线PLC Title="柔性线PLC" Key="192.168.170.71:120" Address="192.168.170.71:120" Value="柔性线PLC" nodeClass="Object">
  88. <读组 Title="读组" Key="read" Address="read" Value="read" nodeClass="Object">
  89. <_progStatus Key="RunState" Address="DB200.50" Title="执行状态" ReadType="1" nodeClass="Variable" />
  90. <_progStatus Key="MachineAlarm" Address="DB200.10" Title="PLC是否正常" ReadType="1" nodeClass="Variable" />
  91. <_progStatus Key="CleanAlarm" Address="DB300.0.2" Title="清洗机故障" ReadType="1" nodeClass="Variable" />
  92. <_progStatus Key="PrintComplete" Address="DB200.24" Title="打标机打标完成" ReadType="1" nodeClass="Variable" />
  93. <_progStatus Key="AllowPrint" Address="DB200.26" Title="打标条件满足,mes可以启动打标" ReadType="1" nodeClass="Variable" />
  94. <_progStatus Key="RobotState" Address="DB200.50" Title="机器人状态" ReadType="1" nodeClass="Variable" />
  95. <_progStatus Key="AGVState" Address="DB200.42" Title="AGV有料,111为都有料,100为都没料,101为其中一个有料" ReadType="1" nodeClass="Variable" />
  96. </读组>
  97. <清洗机清洗 Title="清洗机清洗" Key="clean" Address="DB300.0.4" CheckAddress="DB300.0.4" Value="1" ReadType="2" TargetValue="True" nodeClass="Object">
  98. </清洗机清洗>
  99. <打标机打标 Title="打标机打标" Key="print" Address="DB200.28" CheckAddress="DB200.24" Value="1" ReadType="1" TargetValue="1" nodeClass="Object">
  100. <condition1 Key="print" Address="DB200.26" Title="打标条件满足,mes可以启动打标" TargetValue="1" ReadType="1" nodeClass="Variable" />
  101. </打标机打标>
  102. <取物料 Title="柔性线" Key="fetchMaterial" Address="DB200.50" CheckAddress="DB200.50" Value="1" ReadType="1" TargetValue="3" nodeClass="Object">
  103. <condition1 Key="robootAlarm" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  104. </取物料>
  105. <放物料 Title="柔性线" Key="putMaterial" Address="DB200.50" CheckAddress="DB200.50" Value="4" ReadType="1" TargetValue="6" nodeClass="Object">
  106. <condition1 Key="robootAlarm" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  107. </放物料>
  108. <移动 Title="柔性线" Key="MoveMaterial" Address="DB200.50" CheckAddress="DB200.50" Value="7" ReadType="1" TargetValue="8" nodeClass="Object">
  109. <condition1 Key="moveMaterial" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  110. </移动>
  111. </柔性线PLC>
  112. <质量中心PLC Title="质量中心PLC" Key="192.168.170.61:120" Address="192.168.170.61:120" Value="质量中心PLC" nodeClass="Object">
  113. <读组 Title="读组" Key="read" Address="read" Value="read" nodeClass="Object">
  114. <_progStatus Key="RunState" Address="DB200.50" Title="执行状态" ReadType="1" nodeClass="Variable" />
  115. <_progStatus Key="ExplorerState" Address="DB200.36" Title="三坐标状态" ReadType="2" nodeClass="Variable" />
  116. <_progStatus Key="AGVState" Address="DB200.22" Title="AGV有料,111为都有料,100为都没料,101为其中一个有料" ReadType="1" nodeClass="Variable" />
  117. <_progStatus Key="MachineAlarm" Address="DB200.36" Title="PLC是否正常" ReadType="1" nodeClass="Variable" />
  118. </读组>
  119. <三坐标 Title="质量中心" Key="testWork" Address="DB200.34" CheckAddress="DB200.38" Value="1" ReadType="1" TargetValue="-0" nodeClass="Object">
  120. <condition1 Key="robootAlarm" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  121. <condition1 Key="robootAlarm" Address="DB200.32" Title="三坐标就绪" TargetValue="1" ReadType="1" nodeClass="Variable" />
  122. </三坐标>
  123. <取物料 Title="质量中心" Key="fetchMaterial" Address="DB200.50" CheckAddress="DB200.50" Value="1" ReadType="1" TargetValue="3" nodeClass="Object">
  124. <condition1 Key="robootAlarm" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  125. </取物料>
  126. <放物料 Title="质量中心" Key="putMaterial" Address="DB200.50" CheckAddress="DB200.50" Value="4" ReadType="1" TargetValue="6" nodeClass="Object">
  127. <condition1 Key="robootAlarm" Address="DB200.50" Title="机器人报警" TargetValue="-9" ReadType="1" nodeClass="Variable" />
  128. </放物料>
  129. </质量中心PLC>
  130. </Sinumerik>