eipAdapter
This function block provides information about the current state of the Scanner connection. This function block is used in a program on the Adapter side.
Inputs
Parameter | Type | Description |
---|---|---|
N/A | N/A | The function block has no Inputs. It automatically refers to the adapter in the project. |
Outputs
Parameter | Type | Description |
---|---|---|
Run | BOOL | TRUE, if the EIP stack is running. |
IOcnx | BOOL | TRUE, if an I/O connection is established with the Scanner. |
Remarks
The servers (adapters) accessed by this block must be configured in the "Ethernet/IP Scanner" fieldbus configuration.
Only one explicit message (read or write) can be sent at one time to the same server. If another message is pending then you will get the error report 3 (busy) after calling the block to start a new exchange.
Consider SerializeIn and SerializeOut functions for extracting data from the read buffer.
Example
Inst_eipAdapter(); // read the Ethernet Ethernet is a large, diverse family of frame-based computer networking technologies that operate at many speeds for local area networks (LANs)/IP adapter status
EIP_running := Inst_eipAdapter.Run; // is it running?
EIP_connected := Inst_eipAdapter.IOCnx; // and connected?