25111801 添加PLC屏蔽交互
This commit is contained in:
@@ -201,6 +201,7 @@ namespace SLC1_N
|
||||
bool[] coil1100 = new bool[14];
|
||||
bool[] coil1032 = new bool[8];
|
||||
public bool[] coilSaoma = new bool[4];
|
||||
public bool[] coilBlock = new bool[5];
|
||||
|
||||
// PLC警报
|
||||
void PLC_Alarm()
|
||||
@@ -430,7 +431,7 @@ namespace SLC1_N
|
||||
}
|
||||
else
|
||||
{
|
||||
HCPLC_client.ReadHoldingRegisters(1, 1); // 如果失败,会抛异常
|
||||
coilBlock = HCPLC_client.ReadCoils(1040, 5); // 如果失败,会抛异常
|
||||
Thread.Sleep(100);
|
||||
Signal_PLCStatus?.Invoke(0, true); // 更新PLC连接状态UI
|
||||
|
||||
|
||||
Reference in New Issue
Block a user