1234567891011121314151617181920212223242526272829303132 |
- using S7.Net;
- namespace IMCS.CCS.DeviceProtocol
- {
- public class DevicePlcS7
- {
-
- public static Plc S7(string ip,string type)
- {
- Plc s7Plc = new Plc(CpuType.S71500, ip, 0, 1);
- if (type == "S7_1200")
- {
- s7Plc = new Plc(CpuType.S71200, ip, 0, 1);
- }
- else if (type == "S7_400")
- {
- s7Plc = new Plc(CpuType.S7400, ip, 0, 1);
- }
- else if (type == "S7_300")
- {
- s7Plc = new Plc(CpuType.S7300, ip, 0, 1);
- }
-
- return s7Plc;
- }
-
- }
- }
|