Fixed modbus interface
- Changed registerdefinition in modbus server because or single register reading
This commit is contained in:
@@ -103,29 +103,8 @@ STRUCT
|
||||
// Addr: 11.044
|
||||
lwErrorBitmap : LWORD;
|
||||
|
||||
// Addr: 11.048
|
||||
eInverter1RequestedState : E_KACO_PCU_REQUESTED_STATE;
|
||||
|
||||
// Addr: 11.049
|
||||
eInverter1CurrentState : E_KACO_CURRENT_STATE;
|
||||
|
||||
// Addr: 11.050
|
||||
eInverter1PCUState : E_KACO_PCU_STATE;
|
||||
|
||||
// Addr: 11.051
|
||||
eInverter1PCUError : E_KACO_PCU_ERROR;
|
||||
|
||||
// Addr: 11.052
|
||||
eInverter2RequestedState : E_KACO_PCU_REQUESTED_STATE;
|
||||
|
||||
// Addr: 11.053
|
||||
eInverter2CurrentState : E_KACO_CURRENT_STATE;
|
||||
|
||||
// Addr: 11.054
|
||||
eInverter2PCUState : E_KACO_PCU_STATE;
|
||||
|
||||
// Addr: 11.055
|
||||
eInverter2PCUError : E_KACO_PCU_ERROR;
|
||||
// Addr: 11.048 - 11.055
|
||||
stInverterData : ST_MODBUS_REG_11_INVERTER;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.12">
|
||||
<DUT Name="ST_MODBUS_REG_11_INVERTER" Id="{85be2771-b8b8-4deb-b2dd-65fd8611a26c}">
|
||||
<Declaration><![CDATA[TYPE ST_MODBUS_REG_11_INVERTER :
|
||||
STRUCT
|
||||
// Addr: 11.048
|
||||
eInverter1RequestedState : E_KACO_PCU_REQUESTED_STATE;
|
||||
|
||||
// Addr: 11.049
|
||||
eInverter1CurrentState : E_KACO_CURRENT_STATE;
|
||||
|
||||
// Addr: 11.050
|
||||
eInverter1PCUState : E_KACO_PCU_STATE;
|
||||
|
||||
// Addr: 11.051
|
||||
eInverter1PCUError : E_KACO_PCU_ERROR;
|
||||
|
||||
// Addr: 11.052
|
||||
eInverter2RequestedState : E_KACO_PCU_REQUESTED_STATE;
|
||||
|
||||
// Addr: 11.053
|
||||
eInverter2CurrentState : E_KACO_CURRENT_STATE;
|
||||
|
||||
// Addr: 11.054
|
||||
eInverter2PCUState : E_KACO_PCU_STATE;
|
||||
|
||||
// Addr: 11.055
|
||||
eInverter2PCUError : E_KACO_PCU_ERROR;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
@@ -101,6 +101,9 @@
|
||||
<Compile Include="DUTs\Modbus\HoldingRegisters\ST_MODBUS_REG_11.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DUTs\Modbus\HoldingRegisters\ST_MODBUS_REG_11_INVERTER.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DUTs\Modbus\HoldingRegisters\ST_MODBUS_REG_12.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
14
PLC/PLC.tmc
14
PLC/PLC.tmc
File diff suppressed because one or more lines are too long
@@ -263,7 +263,7 @@
|
||||
</System>
|
||||
<Plc>
|
||||
<Project GUID="{9AE64910-5EB2-4866-93FD-EFE059C38C36}" Name="PLC" PrjFilePath="PLC\PLC.plcproj" TmcFilePath="PLC\PLC.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{FB441FC2-DE5C-334D-4AB7-265DC5A927A4}" TmcPath="PLC\PLC.tmc">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{087455F9-A682-2114-D710-BB18BA25EAAC}" TmcPath="PLC\PLC.tmc">
|
||||
<Name>PLC Instance</Name>
|
||||
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
||||
<Vars VarGrpType="2" AreaNo="1">
|
||||
|
||||
@@ -15,15 +15,21 @@
|
||||
<MappingInfo>
|
||||
<AdsPort>851</AdsPort>
|
||||
<StartAddress>11000</StartAddress>
|
||||
<EndAddress>11047</EndAddress>
|
||||
<EndAddress>11055</EndAddress>
|
||||
<VarName>GVL_MODBUS.stModbusEMSComm.stModbusReg11</VarName>
|
||||
</MappingInfo>
|
||||
<MappingInfo>
|
||||
<AdsPort>851</AdsPort>
|
||||
<StartAddress>11048</StartAddress>
|
||||
<EndAddress>11055</EndAddress>
|
||||
<VarName>GVL_MODBUS.stModbusEMSComm.stModbusReg11.stInverterData</VarName>
|
||||
</MappingInfo>
|
||||
|
||||
<!-- 12.000 Registers -->
|
||||
<MappingInfo>
|
||||
<AdsPort>851</AdsPort>
|
||||
<StartAddress>12000</StartAddress>
|
||||
<EndAddress>12004</EndAddress>
|
||||
<EndAddress>12005</EndAddress>
|
||||
<VarName>GVL_MODBUS.stModbusEMSComm.stModbusReg12</VarName>
|
||||
</MappingInfo>
|
||||
|
||||
@@ -31,8 +37,8 @@
|
||||
<MappingInfo>
|
||||
<AdsPort>851</AdsPort>
|
||||
<StartAddress>13000</StartAddress>
|
||||
<EndAddress>13003</EndAddress>
|
||||
<VarName>GVL_MODBUS.stBMSErrorReg.wBMSWarningActive</VarName>
|
||||
<EndAddress>13005</EndAddress>
|
||||
<VarName>GVL_MODBUS.stBMSErrorReg</VarName>
|
||||
</MappingInfo>
|
||||
|
||||
|
||||
@@ -54,9 +60,9 @@
|
||||
|
||||
<MappingInfo>
|
||||
<AdsPort>851</AdsPort>
|
||||
<StartAddress>13004</StartAddress>
|
||||
<EndAddress>13004</EndAddress>
|
||||
<VarName>GVL_MODBUS.stBMSErrorReg.wConfirmAlarms</VarName>
|
||||
<StartAddress>13006</StartAddress>
|
||||
<EndAddress>13006</EndAddress>
|
||||
<VarName>GVL_MODBUS.wConfirmAlarms</VarName>
|
||||
</MappingInfo>
|
||||
</OutputRegisters>
|
||||
</Mapping>
|
||||
|
||||
Reference in New Issue
Block a user