ZengTao
2025-06-05 21a76af55c4da5f1999e9dd24690b2449a7a18a7
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/config/S7Config.java
@@ -13,9 +13,22 @@
 */
@Configuration
public class S7Config {
    @Bean
    public S7Serializer s7Serializer() {
    @Bean(name = "s7SerializerCC")
    public S7Serializer s7SerializerCC() {
        S7PLC s7PLC = new S7PLC(EPlcType.S1200, "192.168.10.80");
        return S7Serializer.newInstance(s7PLC);
    }
    @Bean(name = "s7SerializerSPOne")
    public S7Serializer s7SerializerSPOne() {
        S7PLC s7PLC = new S7PLC(EPlcType.S1200, "192.168.10.15");
        return S7Serializer.newInstance(s7PLC);
    }
    @Bean(name = "s7SerializerSPTwo")
    public S7Serializer s7SerializerSPTwo() {
        S7PLC s7PLC = new S7PLC(EPlcType.S1200, "192.168.10.21");
        return S7Serializer.newInstance(s7PLC);
    }
}