Small changes after FAT and EMS Test

- Changed Modbus server config for EMS connectivity
- Changed some default EWL Limits
This commit is contained in:
Matthias Heisig
2025-06-13 16:37:14 +02:00
parent 6fe10cc58c
commit b6791f7951
8 changed files with 308 additions and 230 deletions

View File

@@ -156,6 +156,8 @@ VAR
_rMinCurrentInverterDCVoltage : REAL;
_fbModbusRead : FB_MBReadRegs;
// _fbModbusWrite : FB_MBWriteSingleReg;
// _fbModbusWriteMult : FB_MBWriteRegs;
//_wLength : WORD := 49;
xDebugTest : BOOL;
_wDebug1 : WORD;
@@ -172,12 +174,58 @@ VAR
_rPowerDH : REAL;
_fbTONDHCycleTime : TON := (PT := T#15M);
//_uiTest : UINT := 1;
//_diTest : DINT := 123;
//_fbKaco : FB_PowerSupplyKaco('Kaco');
//_xEnableKaco : BOOL;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[IF _xFirstCycle THEN
<ST><![CDATA[(*
IF xDebugTest THEN
(*
_fbModbusWrite(
sIPAddr:= '127.0.0.1',
nTCPPort:= 502,
nUnitID:= 16#FF,
nMBAddr:= 13004,
nValue:= 1,
bExecute:= TRUE,
tTimeout:= T#10S,
bBusy=> ,
bError=> ,
nErrId=> );
IF (NOT _fbModbusWrite.bBusy) THEN
xDebugTest := FALSE;
_fbModbusWrite(bExecute := FALSE);
END_IF
*)
_fbModbusWriteMult(
sIPAddr:= '127.0.0.1',
nTCPPort:= 502,
nUnitID:= 16#FF,
nQuantity:= 2,
nMBAddr:= 12000,
cbLength:= SIZEOF(_diTest),
pSrcAddr:= ADR(_diTest),
bExecute:= TRUE,
tTimeout:= T#10S,
bBusy=> ,
bError=> ,
nErrId=> );
IF (NOT _fbModbusWriteMult.bBusy) THEN
xDebugTest := FALSE;
_fbModbusWriteMult(bExecute := FALSE);
END_IF
END_IF
*)
IF _xFirstCycle THEN
_xFirstCycle := FALSE;
_xGetPowerMeterData := TRUE;
@@ -217,6 +265,7 @@ IF GVL_MODBUS.stBMSErrorReg.wConfirmAlarms > 0 THEN
_xConfirmAlarms := TRUE;
END_IF
// Ack alarms from hardware button
_fbRTrigHardwareAck(CLK := _xHarwareResetButton);
IF _fbRTrigHardwareAck.Q THEN