Retrieve DeviceName aka PLC address at runtime?

Is it possible to determine the DeviceName aka PLC address parameter for the AsIOWrite / …Read FBs at runtime? The address is made up of the interface and bus position (e.g. ‘IF6:ST12’). Is there a FB to get this information via the module name?

Hello Ludger Breil welcome to B&R community,

I’m not sure what do you mean, but I think the Library you are looking for is ASIoDiag , more specially the DiagGetStringInfo()

one of the possible information is the information of the path

Hello Wenbo Ruan,

first of all, thank you for your comment and hint. I have tested it and indeed you get the DeviceName aka PLC address for the ASIOWrite/Read FB via the module name. The corresponding value for infoCode is asdiagPATH.

with regards