iParServer (FB)

FUNCTION_BLOCK iParServer EXTENDS AC500_StateMachine.AbbLConC3

Handles iPar-request for a single subslot of a Field Device having iParameters (iPar-Client)

Note

Instance to be executed cyclically in a not time critical task since it performs storing data in file system and therefore might need some time. Therefore do not set the watchdog of the task this instance is called in too short.

Instance to be executed cyclically in a not time critical task since it performs storing data in file system and therefore might need some time.
Registers sub slot of an iPar-Client specified by Device, DevName, DevSlot and DevSubSlot at very first call with input Enable = TRUE at the iPar-Server.
As long as input ‘Enable’ stays TRUE all subsequent calls automatically process any iPar request by the devices sub slot.
A typical way to make an iPar-Client store its iParameters in the PLC is described below.
-Load configuration data / set of parameters into iPar-Client using manufacturer specific tool
-Remember the value of the F-iPar_CRC displayed by the tool
-Create IEC project containing correct configuration data, but set F-iPar_CRC of corresponding iPar-Client = 0
-Load and run IEC project (ensure that fieldbus runs)
-Logout from PLC
-Edit IEC project and replace F-iPar_CRC value 0 of corresponding iPar-Client by the value displayed by the manufacturer specific configuration tool
-Load and run IEC project (ensure that fieldbus runs)
-While the request of the iPar-Client to store iParameters in the PLC is processed, output Saving is set TRUE.
-After a while there will be a PLC Log entry like Ipar/<coupler slot>_<Profinet device name>_<module number>_<submodule number>:Uploaded iPar-Data telling that iPar-Client has stored its parameters in the PLC.
To make an iPar-Client read its iParameters from the PLC there is nothing to be done.
-Just replace the current (defective) module by a new one.
-As long as the new module is not yet configured by the manufacturer specific tool at all or at least configured differently than the old one it will automatically ask the PLC to restore its parameters.
-While the request of the iPar-Client to restore iParameters in the Device is processed, output Restoring is set TRUE.
-After the communication to the device has been established again and the parameters have been restored, a corresponding PLC Log entry like Ipar/<coupler slot>_<Profinet device name>_<module number>_<submodule number>: restored iPar-Data will be generated.
In case an error occurs the type of error is signaled at output ErrorID.
Attributes:
qualified_only
InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConC3

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConC3

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLConC3

Input

Device

AC500_IoDrvCM579Profinet.IDeviceCM579Profinet

Instance of CM579-PNIO device

DevName

AC500_CM579Profinet.CM579PnioDevName

Profinet name of remote device

DevSlot

UINT

Slot within device having iPar parameters

DevSubSlot

UINT

Subslot within slot having iPar parameters

Output

Saving

BOOL

Received iPar Save-Notification, Upload of data in progress

Restoring

BOOL

Received iPar Restore-Notification, Download of data in progress

ErrorID

ERROR_ID

See enum ERROR_ID