# CfgSetBroadcastAddr() was working in AS4.12 but not in AS6

**URL:** <https://community.br-automation.com/t/cfgsetbroadcastaddr-was-working-in-as4-12-but-not-in-as6/11849>\
**Category:** Programming\
**Tags:** automation-studio-6\
**Created:** [July 7, 2026, 4:53am UTC](https://community.br-automation.com/t/cfgsetbroadcastaddr-was-working-in-as4-12-but-not-in-as6/11849 "2026-07-07T04:53:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vimal\_Raj](https://avatars.discourse-cdn.com/v4/letter/v/FF8800/32.png) [@Vimal\_Raj](https://community.br-automation.com/u/Vimal_Raj)\
**Post date:** [July 7, 2026, 4:53am UTC](https://community.br-automation.com/t/cfgsetbroadcastaddr-was-working-in-as4-12-but-not-in-as6/11849/1 "2026-07-07T04:53:52Z")

</div>

Hi All,

I am currently working on an AS6 migration project. The application was originally developed in AS4.10, and I successfully upgraded it to AS4.12 without any issues.

While performing the migration to AS6, I noticed that the function block `CfgSetBroadcastAddr()` is documented as being supported only for AR versions earlier than 4.00. However, the AS4.12 project is using AR D4.91, which seems contradictory.

Could someone please help clarify what this means? During the AS6 migration, I am encountering errors related to this function block and would like to understand how these can be resolved.

Is there a replacement or recommended alternative for `CfgSetBroadcastAddr()` in AS6?

Any guidance would be greatly appreciated.

Thanks in advance.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/33de87db5aa0ade094acb7051f874864fd9aae00.png)

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/4/4030edb29c4c81020d912bc6a5dbed88915e3712.png)

---

<div class="post-metadata">

**Author:** ![unterbergerc](https://avatars.discourse-cdn.com/v4/letter/u/FF8800/32.png) [@unterbergerc](https://community.br-automation.com/u/unterbergerc)\
**Post date:** [July 7, 2026, 5:43am UTC](https://community.br-automation.com/t/cfgsetbroadcastaddr-was-working-in-as4-12-but-not-in-as6/11849/2 "2026-07-07T05:43:46Z")

</div>

There is no need to call CfgSetBroadcastAddr() at all since the broadcast address is calculated based on the IP and subnet mask.  
The help states this.

_This function block is not working in AR Version 4.0 or higher. Instead, the broadcast address is calculated from the IP address and the subnet mask. When the function block is called with a broadcast address identical with the calculated broadcast address, the status is set to ERR\_OK. Otherwise the status is set to cfgERR\_SET\_NOT\_POSSIBLE._

You can remove all instances of this FUB and remove all call sites from your code.
