FUNCTION_BLOCK PB_CNCT
This function block can be used for establishing a DPV1 Class 2 connection to a PROFIBUS Slave. The connection is established and kept open if input REQ = TRUE, it's closed when REQ = FALSE. While the connection is in state open, the ID output has a value that can be used as ID input of RDREC or WRREC.
InOut:
|
Scope
|
Name
|
Type
|
Initial
|
Comment
|
Input
|
REQ
|
BOOL
|
|
Start Request
|
MASTER
|
BYTE
|
|
Master ID
|
SEGMENT
|
BYTE
|
|
Always set to 0.
|
STATION
|
BYTE
|
|
Station address of the target
|
SLOT
|
BYTE
|
|
Slot number of the target
|
Output
|
VALID
|
BOOL
|
|
Connection is valid
|
ERROR
|
BOOL
|
|
Error detected
|
BUSY
|
BOOL
|
|
FB is busy
|
STATUS
|
DWORD
|
|
Last detected status
|
ID
|
DWORD
|
CommFB.Constants.INVALID_ID
|
Identifier of a PB Slave. Use for RDREC or WRREC (Class 2)
|
|