IOL_IOLM_Info (FB) ¶ FUNCTION_BLOCK IOL_IOLM_Info This function block reads the IOLM Info Record of an IO-Link Master Submodule. InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Execute IOLM_ID DWORD IO-Link Master ID Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL Error occurred, function block aborts action STATUS DWORD Bus error code IOLM_Info IOL_IOLM_InfoRecord IOLM Info Record
IOL_IdentificationAndDiagnosis (FB) ¶ FUNCTION_BLOCK IOL_IdentificationAndDiagnosis The Function Block reads or writes identification or diagnosis data from the Device. For being able to use the full feature set, all Device parameters specified by CommonApplicationProfile Identification and Diagnosis (0x4000) (which supports the FunctionClasses DeviceIdentification (0x8000), Device Diagnosis (0x8003), and ExtendedIdentification (0x8100)) are required. Example PROGRAM GetIOLinkInfo VAR cnct : CommFB.CNCT ; iolInfo : ProfinetCommon.IOL_IdentificationAndDiagnosis ; END_VAR // here we first open a supervisor AR. // (Only necessary if PROFINET Device is not in data exchange with controller). cnct.D_ADDR.SYSTEM := CommFB.IO_SYSTEM_TYPE.PROFINET_IO ; cnct.D_ADDR.PN.MASTER := PN_Controller.MasterID ; // there could be more than one Controller in the project ! cnct.D_ADDR.PN.D.STATIONNAME := 'iolink-master' ; // stationname of the online device cnct.D_ADDR.PN.D.VENDOR := 16#0136 ; // usually you get get this data from GSDML or DCP_Identify / Scan (see ProfinetCommon.DCP_Identify FB) cnct.D_ADDR.PN.D.DEVICE := 16#AC6F ; cnct.D_ADDR.PN.D.INSTANCE := 1 ; // typically 0 or 1 cnct.D_ADDR.PN.API := 16#4E01 ; // IO-Link API cnct.D_ADDR.PN.SLOT := 1 ; cnct.D_ADDR.PN.SUBSLOT := 1 ; // IOLM is in subslot 1 cnct (); // start with cnct.REQ := TRUE IF ( cnct.VALID ) THEN iolInfo ( xExecute := TRUE , ID := cnct.ID , Port := 6 ); //start request for IO-Link device data END_IF iolInfo (); InOut: Scope Name Type Initial Comment Input xExecute BOOL A trigger causes the function selected with variable Function to be executed ID DWORD Addresses the IO-Link proxy Submodule i.e. IO-Link Master or IO-Link Device Port BYTE Port number Func IOL_IdentificationAndDiagnosis_Function IOL_IdentificationAndDiagnosis_Function.rd_all This variable selects the functionality to be triggered by a Request BackupEnable BOOL This variable configures the behavior of the FB in case of the requested function wr_ident. ApplicationSpecificTagIn STRING(32) serves as a free user specific tag LocationTagIn STRING(32) extended identification parameter which can be used for overall localisation and identification of any Device (requires FunctionClass ExtendedIdentification). FunctionTagIn STRING(32) extended identification parameter which can be used for overall localisation and identification of any Device (requires FunctionClass ExtendedIdentification). Output xDone BOOL The signal is set, if the FB has completed a requested operation. xBusy BOOL The signal is set, if the FB is executing a requested operation. xError BOOL The signal is set, if an error occurred during execution of a re-quested operation. STATUS UDINT The value represents the current status of the FB operation and ex-ecuted functions. The content is system specific and contains the status information ProfileIDList ARRAY [0..(IOL_Constants.MaxNumProfileID - 1)] OF IOL_ProfileIdentifier List of ProfileIDs supported by the Device FunctionClassIDList ARRAY [0..(IOL_Constants.MaxNumProfileID - 1)] OF IOL_ProfileIdentifier List of FunctionClassIDs supported by the Device IdentificationObjects IOL_IdentificationObjects Structured list of identification objects DeviceOK BOOL The signal is set when no further diagnosis info is available, it is false when further information is available at DeviceStatus and DetailedDeviceStatus DeviceStatus BYTE See Device parameter in clause B.2.18 in [1] DetailedDeviceStatus ARRAY [0..(IOL_Constants.MaxNumDetailedDeviceStatus - 1)] OF DWORD This parameter contains the type casted values from the Device parameter defined in clause B.2.19 in [1]
IOL_PortConfiguration (FB) ¶ FUNCTION_BLOCK IOL_PortConfiguration This function block reads or updates the IOL-Tool based Port configuration (IOL-PC) of a single Port (Profinet Data-Record 0xB1xx). InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Execute IOLM_ID DWORD IO-Link Master ID Port BYTE Port number RD_WR BOOL Indicates whether the Port-Config Data shall be read (RD = FALSE) or written (WR = TRUE) Inout PortConfig IOL_PortConfigurationRecord IOL-Tool based Port configuration (IOL-PC) Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL error occurred, function block aborts action STATUS DWORD Bus error code
IOL_PortStatus (FB) ¶ FUNCTION_BLOCK IOL_PortStatus This function block reads the PortStatus record of an IO-Link Port Submodule. InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Execute IOLM_ID DWORD IO-Link Master ID Port BYTE Port number Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL error occurred, function block aborts action STATUS DWORD Bus error code PortStatus IOL_PortStatusRecord Port-Status record
PN_PortConfiguration (FB) ¶ FUNCTION_BLOCK PN_PortConfiguration This function block reads or updates the PROFINET Port configuration (PN-PC) of a single Port (Profinet Data-Record 0xB900). InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Execute IOLD_ID DWORD IO-Link Device Submodule ID RD_WR BOOL Indicates whether the ProtConfig Data shall be read (RD = FALSE) or written (WR = TRUE) Inout PortConfig PN_PortConfigurationRecord PROFINET Port configuration (PN-PC) Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL error occurred, function block aborts action STATUS DWORD Bus error code
SmartSensorProfile ¶ DataTypes IOL_AdSS_Function (Enum) IOL_AdSS_Status (Enum) IOL_AdSS_TeachFunction (Enum) IOL_AdSS_TeachMode (Enum) IOL_AdjustableSwitchingSensor (FunctionBlock) IOL_MeasurementDataChannel (FunctionBlock)
DiagnosisSource (STRUCT) ¶ TYPE DiagnosisSource : STRUCT The diagnosis source is the information where the diagnosis is located on the device. The diagnosis source is defined by the tuple (API, Slot, Subslot, ChannelNumber, Direction, Accumulative). A diagnosis source holds one to many diagnosis information. InOut: Name Type Initial Comment API UDINT The application process identifier of the diagnosis source. Slot UINT The slot number of the diagnosis source. Subslot UINT The subslot number of the diagnosis source ChannelNumber UINT The channel number of the diagnosis source (0x8000 means the whole submodule) ChannelType ChannelProperties_Type ChannelProperties_Type.Unspecified size / datatype of a channel (so far a matchingtype exists). Accumulative BOOL TRUE : the source is a channel group. FALSE : the source is a specific channel or the whole submodule Direction DiagnosisDirection DiagnosisDirection.Undefined The direction of the affected IO-data
DiagnosisSpecifier (ENUM) ¶ TYPE DiagnosisSpecifier : In the context of a received diagnosis alarm, the specifier indicates whether a disgnosis entry appears of disappears. Attributes: qualified_only InOut: Name Initial Comment All_subsequent_disappears 0 The Diagnosis ASE contains no longer any entries (of any severity) for this channel Appears 1 An event appears and/or exists further Disappears 2 An event disappears and/or exists no longer Disappears_but_other_remain 3 The Diagnosis ASE contains no longer any entries of the same severity for this channel An event disappears The Diagnosis ASE still contains other entries of the same severity for this channel
UpdateDiagnosis_Status (ENUM) ¶ TYPE UpdateDiagnosis_Status : Attributes: qualified_only InOut: Name Comment OK Undefined ErrorResourceBusy ErrorUnknown Unexpected error ErrorInvalidDiagnosis Diagnosis data is not valid ErrorInvalidID the ID is not valid ErrorInvalidDeviceType the device is no profinet device ErrorDuplicateDiagnosis trying to add a diagnosis-entry that already exists for this diagnosis-source ErrorDiagnosisNotExists trying to remove a diagnosis entry that does not exist
DiagMessageFactory (FB) ¶ FUNCTION_BLOCK DiagMessageFactory A utility function block for resolving default error messages. (ChannelDiagnosisData.ChannelErrorType and ChannelDiagnosisData.ChannelErrorType.ExtChannelErrorType) The Profinet standard defines default messages for common error codes. This function block cannot resolve manufacturer specfic messages that are defined in the GSDML. Methods: TryGetDiagMessage Structure: TryGetDiagMessage (Method)