PB_CNCT (FB)¶
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
REQBOOLStart Request
MASTERBYTEMaster ID
SEGMENTBYTEAlways set to 0.
STATIONBYTEStation address of the target
SLOTBYTESlot number of the target
Output
VALIDBOOLConnection is valid
ERRORBOOLError detected
BUSYBOOLFB is busy
STATUSDWORDLast detected status
IDDWORDCommFB.Constants.INVALID_ID
Identifier of a PB Slave. Use for RDREC or WRREC (Class 2)