The function block provides Interface parameter like the IP Address settings, MAC Address and the PN Name.
LGF_ReadPnInterfaceParameter (FB) | ||||||||
---|---|---|---|---|---|---|---|---|
Bool | execute | done | Bool | |||||
HW_ANY | hardwareId | busy | Bool | |||||
error | Bool | |||||||
status | DWord | |||||||
address | IP_V4 | |||||||
subnetMask | IP_V4 | |||||||
standardGateway | IP_V4 | |||||||
macAddress | Array[0..5] of Byte | |||||||
pnName | String | |||||||
Identifier | Data type | Default value | Description |
---|---|---|---|
execute | Bool | FALSE | Rising edge starts action once |
hardwareId | HW_ANY | --- | Hardware ID of the Interface where the parameter should be read |
Identifier | Data type | Description |
---|---|---|
done | Bool | TRUE: Commanded functionality has been completed successfully |
busy | Bool | TRUE: FB is not finished, new output values can be expected |
error | Bool | TRUE: An error occurred during the execution of the FB |
status | DWord | 16#0000 - 16#7FFF: Status of the FB, 16#8000 - 16#FFFF: Error identification |
address | IP_V4 | IP Address from interface |
subnetMask | IP_V4 | Subnet mask from interface |
standardGateway | IP_V4 | Standard gateway address from interface |
macAddress | Array[0..5] of Byte | MAC Address from interface |
pnName | String | Profinet name from interface |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_EXECUTION_FINISHED Execution finished without errors |
16#7000 | STATUS_NO_CALL No job being currently processed |
16#7001 | STATUS_FIRST_CALL First call after incoming new job (rising edge 'execute') |
16#7002 | STATUS_SUBSEQUENT_CALL Subsequent call during active processing without further details |
16#9000 | ERR_UNDEFINED_STATE Error: due to an undefined state in state machine |
The function reads the Interface settings / parameters using the system function RDREC
(Read data record).
To read the MAC and IP address of the interface provided via it's hardware ID,
it is mandatory to read the PD_INTERFACE_DATA_REAL
data record of any PROFINET compliant interface.
CommConfig
, which is in the Instructions / Communication / Open user communication (Version >= V8.1)
located.Version & Date | Change description | |
---|---|---|
01.00.00 | Siemens Online Support | |
2022-12-16 | First released version |