Set up IO Link Port
There are several ways to configure an IO-Link port. The simplest way is to use the AUTOCOM mode. In this mode the Master accepts all devices and sets its internal parameters according to the device's requirements. Start up in AUTOCOM mode is done as follows:
@ IOL_eTargetMode_AUTOCOM
Device communicating in mode AUTOCOM without inspection (SCANMODE).
Definition IOL_Types.h:262
IOL_FUNC_DECL IOL_EErrorInfo IOLM_API_SM_eSetPortConfig(INT8U u8Port_p, IOLM_SPortConfig *psuPortConfig_p)
Port setup.
Definition IOLM_SM.c:424
This structure is used for the desired port mode.
Definition IOLM_Types.h:812
IOL_ETargetMode eTargetMode
This parameter indicates the requested operational mode of the port.
Definition IOLM_Types.h:823
Another way is to set up a specific device by Vendor ID and Device ID. During the startup procedure it is checked if the correct device is connected or if the device is compatible. If this check fails, it is indicated by the port mode IOL_ePortMode_COMP_FAULT
@ IOL_eTargetMode_CFGCOM
Device communicating in mode CFGCOM after successful inspection (FIXEDMODE).
Definition IOL_Types.h:260
@ IOL_eInspectionLevel_TYPE_COMP
Check Vendor ID and Device ID.
Definition IOLM_Types.h:558
INT8U au8ConfiguredDeviceID[3]
Configured Device ID.
Definition IOLM_Types.h:847
IOLM_EInspectionLevel eInspectionLevel
Device check during startup.
Definition IOLM_Types.h:839
INT8U au8ConfiguredVendorID[2]
Configured Vendor ID.
Definition IOLM_Types.h:843
The most complex way is to check if the Serial Number is also correct. This is also the safest way to check, whether the connected Device is the exact one which is expected on the specific port. If the check fails, it is indicated by the port mode IOL_ePortMode_SERNUM_FAULT
char au8Serial[] = "SER12345"
@ IOL_eInspectionLevel_IDENTICAL
Check Vendor ID, Device ID and Serial Number.
Definition IOLM_Types.h:560
INT8U au8ConfiguredSerialNumber[16]
Configured Serial Number.
Definition IOLM_Types.h:855
INT8U u8ConfiguredSerialNumberLen
Configured Serial Number length.
Definition IOLM_Types.h:859
Stop Communication / Disable Port
The communication can be stopped by setting the port to the inactive state:
@ IOL_eTargetMode_INACTIVE
Communication disabled, no DI, no DO.
Definition IOL_Types.h:254
Standard Input and Output (SIO) Mode
The Port is set to SIO mode by the following command:
uint8_t INT8U
8 bit unsigned integer
Definition IOL_Port_Types.h:68
@ IOL_eTargetMode_DI
Port in digital input mode (SIO).
Definition IOL_Types.h:256
Process Data
After each establishment of a communication relation, the Process Data is marked invalid. The application layer has to set the data valid again by IOLM_API_AL_eControlReq.
This can be done via the IOL_ePortMode_SM_OPERATE event in the function IOLM_Port_SM_vPortMode.