Advertisement
Guest User

InductoA

a guest
Jul 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.63 KB | None | 0 0
  1. Option Explicit
  2.  
  3. Public Type InductoATags
  4.  
  5. Q_inda_bil_SIZE As Tag
  6. Q_inda_EXRATE As Tag
  7. Q_inda_MINTEMP As Tag
  8. Q_inda_RATE As Tag
  9. Q_inda_RBARS As Tag
  10. Q_inda_SQBARS As Tag
  11. Q_inda_TEMP As Tag
  12. RcpGrade As Tag
  13. RcpID As Tag
  14. RI_DCH_RcpSET_1 As Tag
  15. RI_DCH_RcpSET_2 As Tag
  16. RI_DCH_RcpSET_3 As Tag
  17. RI_DCH_RcpSET_4 As Tag
  18. RI_DCH_RcpSET_5 As Tag
  19. RI_DCH_RcpSET_6 As Tag
  20. RI_DCH_RcpSET_7 As Tag
  21. RI_DCH_RcpSET_8 As Tag
  22. RI_DCH_RcpSET_9 As Tag
  23. RI_DCH_RcpSET_10 As Tag
  24. RI_DCH_RcpSET_11 As Tag
  25. RI_DCH_RcpSET_12 As Tag
  26. RI_DCH_RcpSET_13 As Tag
  27. RI_DCH_RcpSET_14 As Tag
  28. RI_DCH_RcpSET_15 As Tag
  29. RI_ECH_RcpSET_1 As Tag
  30. RI_ECH_RcpSET_2 As Tag
  31. RI_ECH_RcpSET_3 As Tag
  32. RI_ECH_RcpSET_4 As Tag
  33. RI_ECH_RcpSET_5 As Tag
  34. RI_ECH_RcpSET_6 As Tag
  35. RI_ECH_RcpSET_7 As Tag
  36. RI_ECH_RcpSET_8 As Tag
  37. RI_ECH_RcpSET_9 As Tag
  38. RI_ECH_RcpSET_10 As Tag
  39. RI_ECH_RcpSET_11 As Tag
  40. RI_ECH_RcpSET_12 As Tag
  41. RI_ECH_RcpSET_13 As Tag
  42. RI_ECH_RcpSET_14 As Tag
  43. RI_ECH_RcpSET_15 As Tag
  44.  
  45. End Type
  46.  
  47. Public Type InductoAGroup
  48.  
  49. DB As InductoATags
  50. PLC As InductoATags
  51. EDIT As InductoATags
  52.  
  53. End Type
  54.  
  55. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  56. ' * * * * * * * * * * * * * CREATING PATHS TO TAGS FOLDER * * * * * * * * * * * * * * *
  57. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  58. Public Function AddInductoAGroup()
  59. Dim strFolder As String
  60.  
  61. 'HMI Tags
  62. strFolder = "RCP\Inducto_A\"
  63. AddInductoATag (strFolder)
  64.  
  65. 'PLC Tags
  66. strFolder = "PLC\Inducto_A\"
  67. AddInductoATag (strFolder)
  68.  
  69. ' Edit Tags
  70. ' strFolder = " RCP\Inducto_A"
  71. ' AddInductoATag(strFolder)
  72.  
  73. End Function
  74.  
  75. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  76. ' * * * * * * * * * * * * ADDING HMI TAGS TO THE GROUP * * * * * * * * * * * * * * *
  77. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  78. Function AddInductoATag(strFolder As String)
  79.  
  80. With ThisDisplay.MyTagGroup
  81.  
  82. .Add ("{" & strFolder & "Q_inda_bil_SIZE}")
  83. .Add ("{" & strFolder & "Q_inda_EXRATE}")
  84. .Add ("{" & strFolder & "Q_inda_MINTEMP}")
  85. .Add ("{" & strFolder & "Q_inda_RATE}")
  86. .Add ("{" & strFolder & "Q_inda_RBARS}")
  87. .Add ("{" & strFolder & "Q_inda_SQBARS}")
  88. .Add ("{" & strFolder & "Q_inda_TEMP}")
  89. .Add ("{" & strFolder & "RcpGrade}")
  90. .Add ("{" & strFolder & "RcpID}")
  91. .Add ("{" & strFolder & "RI_DCH_RcpSET_1}")
  92. .Add ("{" & strFolder & "RI_DCH_RcpSET_2}")
  93. .Add ("{" & strFolder & "RI_DCH_RcpSET_3}")
  94. .Add ("{" & strFolder & "RI_DCH_RcpSET_4}")
  95. .Add ("{" & strFolder & "RI_DCH_RcpSET_5}")
  96. .Add ("{" & strFolder & "RI_DCH_RcpSET_6}")
  97. .Add ("{" & strFolder & "RI_DCH_RcpSET_7}")
  98. .Add ("{" & strFolder & "RI_DCH_RcpSET_8}")
  99. .Add ("{" & strFolder & "RI_DCH_RcpSET_9}")
  100. .Add ("{" & strFolder & "RI_DCH_RcpSET_10}")
  101. .Add ("{" & strFolder & "RI_DCH_RcpSET_11}")
  102. .Add ("{" & strFolder & "RI_DCH_RcpSET_12}")
  103. .Add ("{" & strFolder & "RI_DCH_RcpSET_13}")
  104. .Add ("{" & strFolder & "RI_DCH_RcpSET_14}")
  105. .Add ("{" & strFolder & "RI_DCH_RcpSET_15}")
  106. .Add ("{" & strFolder & "RI_ECH_RcpSET_1}")
  107. .Add ("{" & strFolder & "RI_ECH_RcpSET_2}")
  108. .Add ("{" & strFolder & "RI_ECH_RcpSET_3}")
  109. .Add ("{" & strFolder & "RI_ECH_RcpSET_4}")
  110. .Add ("{" & strFolder & "RI_ECH_RcpSET_5}")
  111. .Add ("{" & strFolder & "RI_ECH_RcpSET_6}")
  112. .Add ("{" & strFolder & "RI_ECH_RcpSET_7}")
  113. .Add ("{" & strFolder & "RI_DCH_RcpSET_8}")
  114. .Add ("{" & strFolder & "RI_ECH_RcpSET_9}")
  115. .Add ("{" & strFolder & "RI_ECH_RcpSET_10}")
  116. .Add ("{" & strFolder & "RI_ECH_RcpSET_11}")
  117. .Add ("{" & strFolder & "RI_ECH_RcpSET_12}")
  118. .Add ("{" & strFolder & "RI_ECH_RcpSET_13}")
  119. .Add ("{" & strFolder & "RI_ECH_RcpSET_14}")
  120. .Add ("{" & strFolder & "RI_ECH_RcpSET_15}")
  121.  
  122. End With
  123.  
  124. End Function
  125. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  126. ' * * * * * * * * * * * * * * COPYING DB/EDIT/PLC TAGS * * * * * * * * * * * *
  127. 'This function will copy the contents of any sourch tag (DB/EDIT/PLC) to the required
  128. ' * * * * * * * * * * * * * * * destination tag (DB/EDIT/PLC) * * * * * * * * * * * *
  129. ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  130. Function TransferInductoA(strTagDest As String, strTagSrc As String)
  131. Dim AllTags As InductoAGroup
  132. Dim TagSrc As InductoATags
  133. Dim TagDest As InductoATags
  134. AllTags = TGroup.LoadInductoAGroup
  135.  
  136.  
  137. ' Getting Source Tag
  138. Select Case strTagSrc
  139. Case Is = "Tag"
  140. TagSrc = AllTags.DB
  141. Case Is = "edit"
  142. TagSrc = AllTags.EDIT
  143. Case Is = "PLC"
  144. TagSrc = AllTags.PLC
  145. End Select
  146.  
  147.  
  148. ' Getting DestinationTag
  149. Select Case strTagDest
  150. Case Is = "Tag"
  151. TagDest = AllTags.DB
  152. Case Is = "edit"
  153. TagDest = AllTags.EDIT
  154. Case Is = "PLC"
  155. TagDest = AllTags.PLC
  156. End Select
  157.  
  158. TagDest.Q_inda_bil_SIZE.Value = TagSrc.Q_inda_bil_SIZE.Value
  159. TagDest.Q_inda_EXRATE.Value = TagSrc.Q_inda_EXRATE.Value
  160. TagDest.Q_inda_MINTEMP.Value = TagSrc.Q_inda_MINTEMP.Value
  161. TagDest.Q_inda_RATE.Value = TagSrc.Q_inda_RATE.Value
  162. TagDest.Q_inda_RBARS.Value = TagSrc.Q_inda_RBARS.Value
  163. TagDest.Q_inda_SQBARS.Value = TagSrc.Q_inda_SQBARS.Value
  164. TagDest.Q_inda_TEMP.Value = TagSrc.Q_inda_TEMP.Value
  165. TagDest.RcpGrade.Value = TagSrc.RcpGrade.Value
  166. TagDest.RcpID.Value = TagSrc.RcpID.Value
  167. TagDest.RI_DCH_RcpSET_1.Value = TagSrc.RI_DCH_RcpSET_1.Value
  168. TagDest.RI_DCH_RcpSET_2.Value = TagSrc.RI_DCH_RcpSET_2.Value
  169. TagDest.RI_DCH_RcpSET_3.Value = TagSrc.RI_DCH_RcpSET_3.Value
  170. TagDest.RI_DCH_RcpSET_4.Value = TagSrc.RI_DCH_RcpSET_4.Value
  171. TagDest.RI_DCH_RcpSET_5.Value = TagSrc.RI_DCH_RcpSET_5.Value
  172. TagDest.RI_DCH_RcpSET_6.Value = TagSrc.RI_DCH_RcpSET_6.Value
  173. TagDest.RI_DCH_RcpSET_7.Value = TagSrc.RI_DCH_RcpSET_7.Value
  174. TagDest.RI_DCH_RcpSET_8.Value = TagSrc.RI_DCH_RcpSET_8.Value
  175. TagDest.RI_DCH_RcpSET_9.Value = TagSrc.RI_DCH_RcpSET_9.Value
  176. TagDest.RI_DCH_RcpSET_10.Value = TagSrc.RI_DCH_RcpSET_10.Value
  177. TagDest.RI_DCH_RcpSET_11.Value = TagSrc.RI_DCH_RcpSET_11.Value
  178. TagDest.RI_DCH_RcpSET_12.Value = TagSrc.RI_DCH_RcpSET_12.Value
  179. TagDest.RI_DCH_RcpSET_13.Value = TagSrc.RI_DCH_RcpSET_13.Value
  180. TagDest.RI_DCH_RcpSET_14.Value = TagSrc.RI_DCH_RcpSET_14.Value
  181. TagDest.RI_DCH_RcpSET_15.Value = TagSrc.RI_DCH_RcpSET_15.Value
  182. TagDest.RI_ECH_RcpSET_1.Value = TagSrc.RI_ECH_RcpSET_1.Value
  183. TagDest.RI_ECH_RcpSET_2.Value = TagSrc.RI_ECH_RcpSET_2.Value
  184. TagDest.RI_ECH_RcpSET_3.Value = TagSrc.RI_ECH_RcpSET_3.Value
  185. TagDest.RI_ECH_RcpSET_4.Value = TagSrc.RI_ECH_RcpSET_4.Value
  186. TagDest.RI_ECH_RcpSET_5.Value = TagSrc.RI_ECH_RcpSET_5.Value
  187. TagDest.RI_ECH_RcpSET_6.Value = TagSrc.RI_ECH_RcpSET_6.Value
  188. TagDest.RI_ECH_RcpSET_7.Value = TagSrc.RI_ECH_RcpSET_7.Value
  189. TagDest.RI_ECH_RcpSET_8.Value = TagSrc.RI_ECH_RcpSET_8.Value
  190. TagDest.RI_ECH_RcpSET_9.Value = TagSrc.RI_ECH_RcpSET_9.Value
  191. TagDest.RI_ECH_RcpSET_10.Value = TagSrc.RI_ECH_RcpSET_10.Value
  192. TagDest.RI_ECH_RcpSET_11.Value = TagSrc.RI_ECH_RcpSET_11.Value
  193. TagDest.RI_ECH_RcpSET_12.Value = TagSrc.RI_ECH_RcpSET_12.Value
  194. TagDest.RI_ECH_RcpSET_13.Value = TagSrc.RI_ECH_RcpSET_13.Value
  195. TagDest.RI_ECH_RcpSET_14.Value = TagSrc.RI_ECH_RcpSET_14.Value
  196. TagDest.RI_ECH_RcpSET_15.Value = TagSrc.RI_ECH_RcpSET_15.Value
  197.  
  198. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement