eipAdapter
Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. - Provides information about the current state of the Scanner connection.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
N/A |
N/A |
N/A |
N/A |
N/A |
This function block has no Inputs. It automatically refers to the adapter in the project. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Run |
BOOL |
|
|
TRUE, if the EIP stack is running. |
IOcnx |
BOOL |
|
|
TRUE, if an I/O connection is established with the Scanner. |
Remarks
- This function block is used in a program on the Adapter side.
- 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 you receive 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/IP adapter status
EIP_running := Inst_eipAdapter.Run; // is it running?
EIP_connected := Inst_eipAdapter.IOCnx; // and connected?
See Also