Programming
BC5250
66
Version: 2.0.0
(https://infosys.beckhoff.com/content/1033/bc5250/Resources/lbx/4007139723.lbx)
• Example of BC5250
(https://infosys.beckhoff.com/content/1033/bc5250/Resources/prx/4007141899.prx)
• Example of BX5200
(https://infosys.beckhoff.com/content/1033/bc5250/Resources/prx/4007144075.prx)
BXBC52x0_Settings
Fig. 63: Function block BXBC52x0_Settings
Function block BXBC52x0_Settings
VAR_INPUT
bWriteSet :BOOL;
bReadSet :BOOL;
strDeviceNet_Set :DeviceNet_Set;
Key
bWriteSet: Rising edge starts the block and reads/writes the parameters if these have changed. The Bus
Coupler must then be restarted. The user is notified if/when the bReboot_Necessary flag is set.
bReadSet: Positive edge reads the set DeviceNet parameters.
strDeviceNet_Set: Data structure for the DeviceNet slave interface.
VAR_OUTPUT
bBusy :BOOL;
bError :BOOL;
iErrorId :WORD;
strDeviceNet :DeviceNet_Setting;
bReboot_Necessary :BOOL;
Key
bBusy: The block is active as long as it is TRUE.
bError: Error bit.
iErrorId: Error number.
strDeviceNet: The type, the firmware and the DeviceNet slave parameters are output here.
bReboot_Necessary: If this bit is TRUE after the bBusy is set to FALSE, then the BC/BX52x0 must be
restarted so that the DeviceNet settings are saved.
Data structure strBX5200_Set
The settings for the DeviceNet slave interfaces are transferred with the following data structure.
TYPE ST_COMConfig:
STRUCT
iInputData :INT; (*BX5200: 0..255/BC5250 0..127*) )1
iOutputData :INT; (*BX5200: 0..255/BC5250 0..127*) )1
E_Mode :ENUM;(*0-polling,1-bit-strobe, 2-change of state, 3-cycle*)