CI504PnioComSend (FB)
FUNCTION_BLOCK CI504PnioComSend EXTENDS AbbLCon3
implements sending data via serial interface of a CI504
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts a single operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation, if BUSY=TRUE (Note: During Aborting the Busy is still TRUE). Afterwards all outputs will be reset. For executing another operation the Enable input needs to be retriggered by another rising edge!
AbbLCon3
Output
DoneBOOLFALSE
Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE.
AbbLCon3
BusyBOOLFALSE
Operation is running (while outputs Done and Error are FALSE)
AbbLCon3
ErrorBOOLFALSE
Operation is stopped with error (while outputs Busy and Done are 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.
AbbLCon3
Input
DeviceAC500_IoDrvCM579Profinet.IDeviceCM579Profinetinstance of CM579-PNIO device
DevNameAC500_CM579Profinet.CM579PnioDevNamename of device to which the data object is to be sent (e.g. ‘ci504-pn-01’ )
ComUSINTserial interface number (COM 1, COM 2, COM 3)
Msgmessage to send
InFlagsWORDinput flags of the device in IO image
Output
ErrorIDID of execution error
StatusCodeUDINTPROFINET status code of write service according to PROFINET specification
AddVal1UINTadditional value 1 returned from PROFINET IO Device
AddVal2UINTadditional value 2 returned from PROFINET IO Device
OutFlagsWORDoutput flags of the device in IO image
OutDataLenUINTlength of data to send in IO image of the device