| | |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | |
| | | if (null == staProtocol) { |
| | | return; |
| | | } |
| | | News.error("RGV写入命令"+JSON.toJSONString(staProtocol)); |
| | | |
| | | boolean rgv6 = staProtocol.isRGV6(); |
| | | OperateResult result1 = null; |
| | | OperateResult result2 = null; |
| | | String resultV1 = ""; |
| | | String resultV2 = ""; |
| | | String resultV3 = ""; |
| | | short resultS1 = 1; |
| | | short resultS2 = 2; |
| | | switch (staProtocol.getSiteId()){ |
| | | case 623: |
| | | resultV1 = "DB100.1830"; |
| | | resultV2 = "DB100.1826"; |
| | | resultV3 = "DB100.1828"; |
| | | break; |
| | | case 624: |
| | | resultV1 = "DB100.1840"; |
| | | resultV2 = "DB100.1826"; |
| | | resultV3 = "DB100.1828"; |
| | | break; |
| | | case 625: |
| | | resultV1 = "DB100.1850"; |
| | | resultV2 = "DB100.1826"; |
| | | resultV3 = "DB100.1828"; |
| | | break; |
| | | case 626: |
| | | resultV1 = "DB100.1860"; |
| | | resultV2 = "DB100.1826"; |
| | | resultV3 = "DB100.1828"; |
| | | break; |
| | | default: |
| | | return; |
| | | } |
| | | siemensS7Net.Write(resultV2, (short) 0); |
| | | siemensS7Net.Write(resultV3, (short) 0); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | |
| | | //硫化罐任务写入后,回读一次,看是否成功 |
| | |
| | | if (null == staProtocol) { |
| | | return; |
| | | } |
| | | News.error("RGV写入命令"+JSON.toJSONString(staProtocol)); |
| | | |
| | | boolean rgv4 = staProtocol.isRGV4(); |
| | | boolean rgv5 = staProtocol.isRGV5(); |
| | | OperateResult result1 = null; |
| | | OperateResult result2 = null; |
| | | String resultV1 = ""; |
| | | String resultV2 = ""; |
| | | short resultS1 = 1; |
| | | short resultS2 = 2; |
| | | if (rgv4){ |
| | | switch (staProtocol.getSiteId()){ |
| | | case 623: |
| | | resultV1 = "DB100.1826"; |
| | | resultV2 = "DB100.1830"; |
| | | break; |
| | | case 624: |
| | | resultV1 = "DB100.1836"; |
| | | resultV2 = "DB100.1840"; |
| | | break; |
| | | case 625: |
| | | resultV1 = "DB100.1846"; |
| | | resultV2 = "DB100.1850"; |
| | | break; |
| | | case 626: |
| | | resultV1 = "DB100.1856"; |
| | | resultV2 = "DB100.1860"; |
| | | break; |
| | | default: |
| | | return; |
| | |
| | | switch (staProtocol.getSiteId()){ |
| | | case 623: |
| | | resultV1 = "DB100.1828"; |
| | | resultV2 = "DB100.1830"; |
| | | break; |
| | | case 624: |
| | | resultV1 = "DB100.1838"; |
| | | resultV2 = "DB100.1840"; |
| | | break; |
| | | case 625: |
| | | resultV1 = "DB100.1848"; |
| | | resultV2 = "DB100.1850"; |
| | | break; |
| | | case 626: |
| | | resultV1 = "DB100.1858"; |
| | | resultV2 = "DB100.1860"; |
| | | break; |
| | | default: |
| | | return; |
| | | } |
| | | } |
| | | siemensS7Net.Write(resultV2, (short) 0); |
| | | result1 = siemensS7Net.Write(resultV1, resultS1); |
| | | //硫化罐任务写入后,回读一次,看是否成功 |
| | | try { |
| | |
| | | OperateResult result2 = null; |
| | | String resultV1 = ""; |
| | | String resultV2 = ""; |
| | | News.error("RGV写入命令"+JSON.toJSONString(staProtocol)); |
| | | |
| | | switch (staProtocol.getSiteId()){ |
| | | case 623: |
| | | resultV1 = "DB100.1824"; |
| | | resultV2 = "DB100.1828"; |
| | | resultV2 = "DB100.1834"; |
| | | break; |
| | | case 624: |
| | | resultV1 = "DB100.1828"; |
| | | resultV1 = "DB100.1834"; |
| | | resultV2 = "DB100.1824"; |
| | | break; |
| | | case 625: |
| | | resultV1 = "DB100.1832"; |
| | | resultV2 = "DB100.1836"; |
| | | resultV1 = "DB100.1844"; |
| | | resultV2 = "DB100.1854"; |
| | | break; |
| | | case 626: |
| | | resultV1 = "DB100.1836"; |
| | | resultV2 = "DB100.1832"; |
| | | resultV1 = "DB100.1854"; |
| | | resultV2 = "DB100.1844"; |
| | | break; |
| | | default: |
| | | return; |