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

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.

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.