FB_MBUS_ChangeAdr
This block can be used to change the primary address.
The block can only be executed together with the block FB_MBUSKL6781().
VAR_INPUT
usiAdrOld : USINT;
usiAdrNew : USINT;
eBaudrate : E_MBUS_Baudrate := eMBUS_Baud2400;
bStart : BOOL;
bDisabled : BOOL:=FALSE;
usiAdrOld: Old primary address.
usiAdrNew: New primary address.
eBaudrate: 300, 600, 1200, 2400, 4800, 9600 baud (see E_MBUS_Baudrate).
bStart: A positive edge at this input triggers a change of the primary address of the counter.
bDisabled: TRUE = deselection of the block.
VAR_OUTPUT
bBusy : BOOL;
bReady : BOOL;
bError : BOOL;
eError : E_MBUS_ERROR;
bBusy: The bBusy output is TRUE while the meter is being read.
bReady: The bReady output is TRUE for one cycle, once meter reading is completed.
bError: this output goes TRUE as soon as an error occurs. This error is described via the variable eError.
eError: In the event of an error the output issues an error code (see E_MBUS_ERROR). bError goes TRUE at the same time.
VAR_IN_OUT
stCom : ST_MBUS_Communication;
stCom: This structure is used to link the block FB_MBUSKL6781() with the meter blocks (see ST_MBUS_Communication).
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_MBus from 3.3.4.0 |