Document metadata

Application name

CSK_Module_MultiIOLinkSMI

Version

3.1.0

Date

2025-04-10

Author

SICK AG

Crowns

CSK_Module_MultiIOLinkSMI

Short description

This is an automatically generated CROWN (description not necessary).

Overview

CSK_MultiIOLinkSMI

Short description

This CSK module provides an easy access to IO-Link functionality of AppSpace controller.
It is highly recommended to use this module along with the following CSK modules:
- CSK_1stModule_Logger - for logging data processing issues
- CSK_Module_IODDInterpreter - for easy combining of read/write messages to be received/sent from/to IO-Link device
- CSK_Module_PersistentData - to save configured read/write messages as well as process data structure if it is variable
- CSK_Module_PowerManager - to power the necessary IO-Link ports

The main externally useful features are following:

1. Generic CSK functionality:
Each instance is handled in a separate thread. Useful Instance functions:
- "addInstance" - to create a new instance
- "setSelectedInstance" - to select instance you are working on

2. Port handling
- "setPort" - to set port used by the instance
- "activateInstance" - to start/stop IO-Link functionality for the selected port
- The event "OnNewPortEvent" notifies new IO-Link port event

3. Connected IO-Link device identification handling
If the device’s process data structure is variable, the module makes sure that the saved structure option is applied at the device after reboot/reconnection.
- "getDeviceIdentification" - to get identification table of connected device
- "applyNewDeviceIdentification" - to start using a newly connected device instead of saved one
- The event "OnNewDeviceIdentificationApplied" can be used to notify external apps that new identification is applied

4. Read and write messages handling
Messages to be read or written from/to device are sets of data combined based on selection in respective dynamic tables in UI.
Each message has its own IODD instance at the background.
After message configuration, the JSON template is available in UI for the reference.
The structure of the write message must comply with the generated JSON template.

Each read message has its own event to register to exteranlly.
The event name is "CSK_MultiIOLinkSMI.OnNewReadMessage" .. _instance .. _port .. _readMessageName
and "CSK_MultiIOLinkSMI.OnNewRawReadMessage" .. _instance .. _port .. _readMessageName

Each write message has its own function to be called externally.
The function name is "CSK_MultiIOLinkSMI.writeMessage" .. port .. writeMessageName

Use following functions to handle messages:
- "setIODDReadMessageName" and "setIODDWriteMessageName" - to set the name of the message
- "setReadMessageMode" to set type of readMessage (IODD or NO_IODD)
- "createIODDReadMessage" and "createIODDWriteMessage" - to create the message
- "setSelectedIODDReadMessage" and "setSelectedIODDWriteMessage" - to select the current message
- "deleteIODDReadMessage" and "deleteIODDWriteMessage" - to delete message
- "getIODDReadMessageJSONTemplate" and "getIODDWriteMessageJSONTemplate" - to get JSON structure (template) of the message to be received or sent

5. Direct data reading/writing
The following functions can be used for reading or writing data by selected instance directly:
- "readProcessData" and "writeProcessData" - to read/write process data using IODD interpretation at the background
- "readParameter" and "writeParameter" - to read/write parameters using IODD interpretation at the background
- "readProcessDataByteArray" and "writeProcessDataByteArray" - to read/write row byte arrays of process data (no IODD needed)
- "readParameterByteArray" and "writeParameterByteArray" - to read/write row byte arrays of parameter (no IODD needed)
- "readIODDMessage" and "writeIODDMessage" - to read/write preconfigured messages

Overview

Functions

CSK_MultiIOLinkSMI.activateInstance()
Short description

Activate or deactivate the instance.

Parameters
Name Type Multiplicity Description

status

BOOL

1

True = active

Sample (auto-generated)
CSK_MultiIOLinkSMI.activateInstance(status)
CSK_MultiIOLinkSMI.addInstance()
Short description

Function to add an additional instance.

Sample (auto-generated)
CSK_MultiIOLinkSMI.addInstance()
CSK_MultiIOLinkSMI.applyNewDeviceIdentification()
Short description

Set device identification of a new device.

Parameters
Name Type Multiplicity Description

instance

INT

1

Instance to select.

jsonNewDeviceIdentification

STRING

?

Json table containing the device identification.

Sample (auto-generated)
CSK_MultiIOLinkSMI.applyNewDeviceIdentification(instance, jsonNewDeviceIdentification)
CSK_MultiIOLinkSMI.applyNewDeviceIdentificationUI()
Short description

Delete settings for previous device and continue with new discovered device. Triggered by UI button.

Sample (auto-generated)
CSK_MultiIOLinkSMI.applyNewDeviceIdentificationUI()
CSK_MultiIOLinkSMI.clearFlowConfigRelevantConfiguration()
Short description

Function to clear FlowConfig relevant configurations.

Sample (auto-generated)
CSK_MultiIOLinkSMI.clearFlowConfigRelevantConfiguration()
CSK_MultiIOLinkSMI.copyReadDataMessage()
Short description

Function to copy the selected read data message. It can be pasted in another instance (IOLink device) if the device is same. Pasting is done via pasteReadDataMessage.

Sample (auto-generated)
CSK_MultiIOLinkSMI.copyReadDataMessage()
CSK_MultiIOLinkSMI.copyWriteDataMessage()
Short description

Function to copy the selected write data message. It can be pasted in another instance (IOLink device) if the device is same. Pasting is done via pasteWriteDataMessage.

Sample (auto-generated)
CSK_MultiIOLinkSMI.copyWriteDataMessage()
CSK_MultiIOLinkSMI.createIODDReadMessage()
Short description

Create a new data set to read from device with the help of IODD interpreter.

Sample (auto-generated)
CSK_MultiIOLinkSMI.createIODDReadMessage()
CSK_MultiIOLinkSMI.createIODDWriteMessage()
Short description

Create a new data set to write to device with the help of IODD interpreter.

Sample (auto-generated)
CSK_MultiIOLinkSMI.createIODDWriteMessage()
CSK_MultiIOLinkSMI.deleteAllReadMessages()
Short description

Function to delete all readMessages of currently selected instance.

Sample (auto-generated)
CSK_MultiIOLinkSMI.deleteAllReadMessages()
CSK_MultiIOLinkSMI.deleteIODDReadMessage()
Short description

Delete created data set.

Sample (auto-generated)
CSK_MultiIOLinkSMI.deleteIODDReadMessage()
CSK_MultiIOLinkSMI.deleteIODDWriteMessage()
Short description

Delete created data set.

Sample (auto-generated)
CSK_MultiIOLinkSMI.deleteIODDWriteMessage()
CSK_MultiIOLinkSMI.getDeviceConfig()
Short description

Function to get the device configuration that can be use to copy it and apply for another device if DeviceId and VendorId are matched.

Return values
Name Type Multiplicity Description

jsonCopiedDeviceConfig

STRING

1

JSON object with device configuration

Sample (auto-generated)
jsonCopiedDeviceConfig = CSK_MultiIOLinkSMI.getDeviceConfig()
CSK_MultiIOLinkSMI.getDeviceIdentification()
Short description

Get identification of a device connected to a specified port. The identification contains the following parameters:
*statusInfo - status of the IO-Link port
*deviceId
*vendorId
*vendorText
*productName
*productText
*serialNumber
*hardwareVersion
*firmwareVersion

Parameters
Name Type Multiplicity Description

port

STRING

1

IO-Link port with connected device.

Return values
Name Type Multiplicity Description

jsonDeviceIdentification

STRING

1

JSON object with device identification.

Sample (auto-generated)
jsonDeviceIdentification = CSK_MultiIOLinkSMI.getDeviceIdentification(port)
CSK_MultiIOLinkSMI.getInstanceParameters()
Short description

Get all parameters of the instance

Parameters
Name Type Multiplicity Description

instanceNo

INT

1

Number ID of instance

Return values
Name Type Multiplicity Description

jsonParameters

AUTO

1

Parameters in JSON format

Sample (auto-generated)
jsonParameters = CSK_MultiIOLinkSMI.getInstanceParameters(instanceNo)
CSK_MultiIOLinkSMI.getInstancePortMap()
Short description

Function to get a map of what ports are controlled by instances.

Return values
Name Type Multiplicity Description

jsonInstancePortMap

STRING

1

JSON object with the map of active ports.

portList

STRING

*

List of ports related to instance.

Sample (auto-generated)
jsonInstancePortMap, portList = CSK_MultiIOLinkSMI.getInstancePortMap()
CSK_MultiIOLinkSMI.getInstancesAmount()
Short description

Get the amount of created instances of this module.

Return values
Name Type Multiplicity Description

amount

INT

1

Amount of created instances.

Sample (auto-generated)
amount = CSK_MultiIOLinkSMI.getInstancesAmount()
CSK_MultiIOLinkSMI.getIODDReadMessageJSONTemplate()
Short description

Function to get the JSON template of the message that will be read from IO-Link device.

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message.

Return values
Name Type Multiplicity Description

jsonTemplate

STRING

?

Template in JSON format.

Sample (auto-generated)
jsonTemplate = CSK_MultiIOLinkSMI.getIODDReadMessageJSONTemplate(messageName)
CSK_MultiIOLinkSMI.getIODDWriteMessageJSONTemplate()
Short description

Function to get the JSON template of the message that is expected to be written to IO-Link device.

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message.

Return values
Name Type Multiplicity Description

jsonTemplate

STRING

?

Template in JSON format.

Sample (auto-generated)
jsonTemplate = CSK_MultiIOLinkSMI.getIODDWriteMessageJSONTemplate(messageName)
CSK_MultiIOLinkSMI.getParameters()
Short description

Function to get all parameters of the client in JSON format.

Parameters
Name Type Multiplicity Description

instanceNo

INT

1

Number of instance to get parameters from.

Return values
Name Type Multiplicity Description

jsonParameters

STRING

1

JSON string with all parameters.

Sample (auto-generated)
jsonParameters = CSK_MultiIOLinkSMI.getParameters(instanceNo)
CSK_MultiIOLinkSMI.getPort()
Short description

Function to get port of currently selected instance.

Return values
Name Type Multiplicity Description

port

STRING

?

Port

Sample (auto-generated)
port = CSK_MultiIOLinkSMI.getPort()
CSK_MultiIOLinkSMI.getReadDataResultNUM()
Short description

Get the latest result of readinig message.
NUM will be replaced by the number of instance (e.g. "getReadDataResult1").

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message to get the latest data about.

Return values
Name Type Multiplicity Description

latestSuccess

BOOL

?

Latest success of reading.

jsonMessageContent

STRING

?

Latest JSON table with received message content.

Sample (auto-generated)
latestSuccess, jsonMessageContent = CSK_MultiIOLinkSMI.getReadDataResultNUM(messageName)
CSK_MultiIOLinkSMI.getStatusModuleActive()
Short description

Function to get status if module is active.

Return values
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
status = CSK_MultiIOLinkSMI.getStatusModuleActive()
CSK_MultiIOLinkSMI.getWriteDataResultNUM()
Short description

Get the latest result of writng message.
NUM will be replaced by the number of instance (e.g. "getWriteDataResult1").

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message to get the latest data about.

Return values
Name Type Multiplicity Description

success

BOOL

1

Latest success of writing.

jsonMessageContent

STRING

?

JSON table with latest sent message content.

Sample (auto-generated)
success, jsonMessageContent = CSK_MultiIOLinkSMI.getWriteDataResultNUM(messageName)
CSK_MultiIOLinkSMI.handleOnNewPortEvent()
Short description

Internally used function triggered when the new event occurs in IO-Link port.

Parameters
Name Type Multiplicity Description

port

ENUM
IOLinkMasterPorts

1

Port where the event occured.

eventType

ENUM
null

1

Type of the event.

eventCode

INT

1

Event code as described within IO-Link Interface specification annex C.

Sample (auto-generated)
CSK_MultiIOLinkSMI.handleOnNewPortEvent(port, eventType, eventCode)
CSK_MultiIOLinkSMI.handleOnNewPortEventWithEventQualifier()
Short description

Internally used function triggered when the new event occurs in IO-Link port (supports extended IO-Link SMI).

Parameters
Name Type Multiplicity Description

port

ENUM
IOLinkMasterPorts

1

Port where the event occured.

qualifier

CONST_OBJECT
IOLink.SMI.EventQualifier

1

Qualifier of the IO-Link event

eventCode

INT

1

Event code as described within IO-Link Interface specification annex C.

Sample (auto-generated)
CSK_MultiIOLinkSMI.handleOnNewPortEventWithEventQualifier(port, qualifier, eventCode)
CSK_MultiIOLinkSMI.loadParameters()
Short description

Load parameters for this module from the CSK_PersistentData module if possible and use them.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success to load parameters.

Sample (auto-generated)
success = CSK_MultiIOLinkSMI.loadParameters()
CSK_MultiIOLinkSMI.makeDefaultInstance()
Short description

Set all instance parameters to default values.

Sample (auto-generated)
CSK_MultiIOLinkSMI.makeDefaultInstance()
CSK_MultiIOLinkSMI.pageCalled()
Short description

Function to register "OnResume" of the module UI (only as helper function).

Return values
Name Type Multiplicity Description

empty

STRING

1

Empty string (only needed to simplify binding).

Sample (auto-generated)
empty = CSK_MultiIOLinkSMI.pageCalled()
CSK_MultiIOLinkSMI.pasteReadDataMessage()
Short description

Function to paste the copied read data message configuration. See copyReadDataMessage

Return values
Name Type Multiplicity Description

processDataTableContent

STRING

?

JSON object with selected process data information.

parameterTableContent

STRING

?

JSON object with selected parameters information.

jsonTemplate

STRING

?

New JSON template of the read message.

Sample (auto-generated)
processDataTableContent, parameterTableContent, jsonTemplate = CSK_MultiIOLinkSMI.pasteReadDataMessage()
CSK_MultiIOLinkSMI.pasteWriteDataMessage()
Short description

Function to paste the copied write data message configuration. See copyWriteDataMessage

Return values
Name Type Multiplicity Description

processDataTableContent

STRING

?

JSON object with selected process data information.

parameterTableContent

STRING

?

JSON object with selected parameters information.

jsonTemplate

STRING

?

New JSON template of the write message.

Sample (auto-generated)
processDataTableContent, parameterTableContent, jsonTemplate = CSK_MultiIOLinkSMI.pasteWriteDataMessage()
CSK_MultiIOLinkSMI.pauseReadMessageTimer()
Short description

Function to pause timers for all read messages,

Sample (auto-generated)
CSK_MultiIOLinkSMI.pauseReadMessageTimer()
CSK_MultiIOLinkSMI.processDataInRowSelectedCSKIODDInterpreter()
Short description

Function to call CSK_IODDInterpreter.processDataInRowSelected function when row in process data in of read message table is selected.

Parameters
Name Type Multiplicity Description

rowData

STRING

1

Row data in JSON format.

Sample (auto-generated)
CSK_MultiIOLinkSMI.processDataInRowSelectedCSKIODDInterpreter(rowData)
CSK_MultiIOLinkSMI.processDataOutRowSelectedCSKIODDInterpreter()
Short description

Function to call CSK_IODDInterpreter.processDataOutRowSelected function when row in process data out of write message table is selected.

Parameters
Name Type Multiplicity Description

rowData

STRING

1

Row data in JSON format.

Sample (auto-generated)
CSK_MultiIOLinkSMI.processDataOutRowSelectedCSKIODDInterpreter(rowData)
CSK_MultiIOLinkSMI.readIODDMessage()
Short description

Read configured message from IO-Link sensor.

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the configured message.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of reading the message.

jsonReceivedData

STRING

?

Received message in JSON format.

Sample (auto-generated)
success, jsonReceivedData = CSK_MultiIOLinkSMI.readIODDMessage(messageName)
CSK_MultiIOLinkSMI.readIODDMessageNUM()
Short description

Read preconfigured message.
NUM will be replaced by the number of instance (e.g. "readIODDMessage1").

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message to read.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of reading.

jsonMessageContent

STRING

?

JSON table with received message content.

Sample (auto-generated)
success, jsonMessageContent = CSK_MultiIOLinkSMI.readIODDMessageNUM(messageName)
CSK_MultiIOLinkSMI.readIODDMessageUI()
Short description

Read configured message from IO-Link sensor from UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.readIODDMessageUI()
CSK_MultiIOLinkSMI.readParameter()
Short description

Read parameter of IO-Link sensor in case the IODD description of the parameter is available.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

subindex

INT

1

Subindex of the parameter.

Return values
Name Type Multiplicity Description

readSuccess

BOOL

1

Success of reading.

readResult

STRING

?

Received data converted using IODD interpretation.

Sample (auto-generated)
readSuccess, readResult = CSK_MultiIOLinkSMI.readParameter(index, subindex)
CSK_MultiIOLinkSMI.readParameterByteArray()
Short description

Read parameter of IO-Link sensor as a raw byte array. Might be useful for testing. If reading failed, returns nil.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

subindex

INT

1

Subindex of the parameter.

Return values
Name Type Multiplicity Description

resultByteArray

INT

*

Received byte array in dec format.

Sample (auto-generated)
resultByteArray = CSK_MultiIOLinkSMI.readParameterByteArray(index, subindex)
CSK_MultiIOLinkSMI.readParameterByteArray_NUM()
Short description

Read paramerter and return it as byte array in IO-Link JSON standard, for example:
{
"value":[232,12,1]
}
NUM will be replaced by the number of instance (e.g. "readParameterByteArray_1").

Parameters
Name Type Multiplicity Description

index

AUTO

1

Index of the parameter.

subindex

AUTO

1

Subindex of the parameter.

Return values
Name Type Multiplicity Description

byteArrayData

STRING

?

JSON array with decimal values.

Sample (auto-generated)
byteArrayData = CSK_MultiIOLinkSMI.readParameterByteArray_NUM(index, subindex)
CSK_MultiIOLinkSMI.readParameterByteArrayUI()
Short description

Read parameter of IO-Link sensor as a raw byte array to show it in UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.readParameterByteArrayUI()
CSK_MultiIOLinkSMI.readParameterIODD_NUM()
Short description

Read parameter with provided info from IODD interpreter (as JSON table) and convert it to a meaningful JSON table.
NUM will be replaced by the number of instance (e.g. "readParameterIODD_1").

Parameters
Name Type Multiplicity Description

index

AUTO

1

Index of the parameter.

subindex

AUTO

1

Subindex of the parameter.

jsonDataPointInfo

STRING

1

JSON table containing parameter info from IODD file.

Return values
Name Type Multiplicity Description

jsonData

STRING

?

JSON table with interpted parameter value.

Sample (auto-generated)
jsonData = CSK_MultiIOLinkSMI.readParameterIODD_NUM(index, subindex, jsonDataPointInfo)
CSK_MultiIOLinkSMI.readParameterRowSelectedCSKIODDInterpreter()
Short description

Function to call CSK_IODDInterpreter.readParameterRowSelected function when row in read parameters table of read message is selected.

Parameters
Name Type Multiplicity Description

rowData

STRING

1

Row data in JSON format.

Sample (auto-generated)
CSK_MultiIOLinkSMI.readParameterRowSelectedCSKIODDInterpreter(rowData)
CSK_MultiIOLinkSMI.readProcessData()
Short description

Read parameter of IO-Link sensor in case the IODD description of the parameter is available.

Return values
Name Type Multiplicity Description

readSuccess

BOOL

1

Success of reading.

readResult

STRING

?

JSON object with received data if reading is successful.

Sample (auto-generated)
readSuccess, readResult = CSK_MultiIOLinkSMI.readProcessData()
CSK_MultiIOLinkSMI.readProcessDataBinary_NUM()
Short description

Read process data as binary.
NUM will be replaced by the number of instance (e.g. "readProcessDataBinary_1").

Return values
Name Type Multiplicity Description

binaryData

BINARY

?

Binary read data.

Sample (auto-generated)
binaryData = CSK_MultiIOLinkSMI.readProcessDataBinary_NUM()
CSK_MultiIOLinkSMI.readProcessDataByteArray()
Short description

Read process data of IO-Link sensor as a raw byte array. Might be useful for testing. If reading failed, returns nil.

Return values
Name Type Multiplicity Description

resultByteArray

INT

*

Received byte array in dec format.

Sample (auto-generated)
resultByteArray = CSK_MultiIOLinkSMI.readProcessDataByteArray()
CSK_MultiIOLinkSMI.readProcessDataByteArray_NUM()
Short description

Read process data and return it as byte array in IO-Link JSON standard, for example:
{
"value":[232,12,1]
}
NUM will be replaced by the number of instance (e.g. "readProcessDataByteArray_1").

Return values
Name Type Multiplicity Description

byteArrayData

STRING

?

JSON array with decimal values

Sample (auto-generated)
byteArrayData = CSK_MultiIOLinkSMI.readProcessDataByteArray_NUM()
CSK_MultiIOLinkSMI.readProcessDataByteArrayUI()
Short description

Read process data of IO-Link sensor as a raw byte array to show it in UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.readProcessDataByteArrayUI()
CSK_MultiIOLinkSMI.readProcessDataIODD_NUM()
Short description

Read process data with provided info from IODD interpreter (as JSON table) and convert it to a meaningful JSON table.
NUM will be replaced by the number of instance (e.g. "readProcessDataIODD_1").

Parameters
Name Type Multiplicity Description

jsonDataPointInfo

STRING

1

JSON table containing process data info from IODD file

Return values
Name Type Multiplicity Description

convertedResult

STRING

?

JSON table with interpted read data

Sample (auto-generated)
convertedResult = CSK_MultiIOLinkSMI.readProcessDataIODD_NUM(jsonDataPointInfo)
CSK_MultiIOLinkSMI.refreshReadDataResult()
Short description

Function to show the latest read result of the selected message in UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.refreshReadDataResult()
CSK_MultiIOLinkSMI.refreshWriteDataResult()
Short description

Function to show the latest write result of the selected message in UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.refreshWriteDataResult()
CSK_MultiIOLinkSMI.resetInstances()
Short description

Function to reset instances to one single instance.
IMPORTANT: As instances start their own threads, the module needs to be restarted if new instances are needed…​ (see AppEngine docu for "Script.startScript").

Sample (auto-generated)
CSK_MultiIOLinkSMI.resetInstances()
CSK_MultiIOLinkSMI.resetModule()
Short description

Function to reset main configuration of module.

Sample (auto-generated)
CSK_MultiIOLinkSMI.resetModule()
CSK_MultiIOLinkSMI.sendParameters()
Short description

Send parameters to CSK_PersistentData module if possible to save them.

Parameters
Name Type Multiplicity Description

noDataSave

BOOL

?

[Optional] Set to TRUE if the data should NOT be saved immediately after sending.

Sample (auto-generated)
CSK_MultiIOLinkSMI.sendParameters(noDataSave)
CSK_MultiIOLinkSMI.setAutoStartReadMessageTimer()
Short description

Function to set status if ALL readMessage timers should be started automatically by loading parameters.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
CSK_MultiIOLinkSMI.setAutoStartReadMessageTimer(status)
CSK_MultiIOLinkSMI.setFlowConfigPriority()
Short description

Function to configure if FlowConfig should have priority for FlowConfig relevant configuration.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
CSK_MultiIOLinkSMI.setFlowConfigPriority(status)
CSK_MultiIOLinkSMI.setIODDReadMessageName()
Short description

Set title of the message to read from IO-Link device.

Parameters
Name Type Multiplicity Description

newName

STRING

1

New name.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setIODDReadMessageName(newName)
CSK_MultiIOLinkSMI.setIODDWriteMessageEventName()
Short description

Set event name to register to and write the parameter of the event as data to IOLink sensor.

Parameters
Name Type Multiplicity Description

newWriteMessageEventName

STRING

1

Event name.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setIODDWriteMessageEventName(newWriteMessageEventName)
CSK_MultiIOLinkSMI.setIODDWriteMessageName()
Short description

Set title of the message to write to IO-Link device.

Parameters
Name Type Multiplicity Description

newName

STRING

1

New name.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setIODDWriteMessageName(newName)
CSK_MultiIOLinkSMI.setLoadOnReboot()
Short description

Configure if this module should load its saved parameters at app/ device boot up.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Set status

Sample (auto-generated)
CSK_MultiIOLinkSMI.setLoadOnReboot(status)
CSK_MultiIOLinkSMI.setParameterByteArrayToWrite()
Short description

Set byte array to write to the parameter of the device for testing purposes in UI.

Parameters
Name Type Multiplicity Description

byteArrayToWrite

STRING

1

Byte array in dec format where bytes are separated by comma. E.g. 1,12,123

Sample (auto-generated)
CSK_MultiIOLinkSMI.setParameterByteArrayToWrite(byteArrayToWrite)
CSK_MultiIOLinkSMI.setParameterName()
Short description

Function to set the name of the parameters if saved/loaded via the CSK_PersistentData module.

Parameters
Name Type Multiplicity Description

name

STRING

1

Name of the parameter

Sample (auto-generated)
CSK_MultiIOLinkSMI.setParameterName(name)
CSK_MultiIOLinkSMI.setPort()
Short description

Set an IO-Link port for selected instance.

Parameters
Name Type Multiplicity Description

port

STRING

1

IO-Link sensor port.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setPort(port)
CSK_MultiIOLinkSMI.setProcessDataByteArrayToWrite()
Short description

Set byte array to write to the process data of the device for testing purposes in UI.

Parameters
Name Type Multiplicity Description

processDataByteArray

STRING

1

Byte array in dec format where bytes are separated by comma. E.g. 1,12,123

Sample (auto-generated)
CSK_MultiIOLinkSMI.setProcessDataByteArrayToWrite(processDataByteArray)
CSK_MultiIOLinkSMI.setProcessDataCondition()
Short description

Set process data structure varient if the structure is variable. The respective value will be sent to the parameter responsible for the structure.

Parameters
Name Type Multiplicity Description

newCondition

STRING

1

New condition string parced based on IODD file content.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setProcessDataCondition(newCondition)
CSK_MultiIOLinkSMI.setReadMessageMode()
Short description

Function to set if readMessage to create should use IODD info or not.

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_MultiIOLinkSMI.MessageMode

1

Mode ('IODD' or 'NO_IODD')

Sample (auto-generated)
CSK_MultiIOLinkSMI.setReadMessageMode(mode)
CSK_MultiIOLinkSMI.setReadMessageProcessDataEndByte()
Short description

Function to set endByte to read processData of currently selected readMessage.

Parameters
Name Type Multiplicity Description

pos

INT

1

Byte position.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setReadMessageProcessDataEndByte(pos)
CSK_MultiIOLinkSMI.setReadMessageProcessDataStartByte()
Short description

Function to set startByte to read processData of currently selected readMessage.

Parameters
Name Type Multiplicity Description

pos

INT

1

Start byte position.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setReadMessageProcessDataStartByte(pos)
CSK_MultiIOLinkSMI.setReadMessageProcessDataUnpackFormat()
Short description

Function to set unpack format to read processData of currently selected readMessage.

Parameters
Name Type Multiplicity Description

format

STRING

1

Format (used for string.unpack LUA function)

Sample (auto-generated)
CSK_MultiIOLinkSMI.setReadMessageProcessDataUnpackFormat(format)
CSK_MultiIOLinkSMI.setReadMessageTimerActive()
Short description

Function to set if all read message timers should be active.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
CSK_MultiIOLinkSMI.setReadMessageTimerActive(status)
CSK_MultiIOLinkSMI.setSearchBegin()
Short description

Function to set pattern to search for to cut specific part of JSON content.

Parameters
Name Type Multiplicity Description

pattern

STRING

1

Pattern

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSearchBegin(pattern)
CSK_MultiIOLinkSMI.setSearchEnd()
Short description

Function to set pattern to search for the end to cut specific part of JSON content.

Parameters
Name Type Multiplicity Description

pattern

STRING

1

Pattern

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSearchEnd(pattern)
CSK_MultiIOLinkSMI.setSelectedInstance()
Short description

Select one of the multiple instances.

Parameters
Name Type Multiplicity Description

instance

INT

1

Instance to select.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSelectedInstance(instance)
CSK_MultiIOLinkSMI.setSelectedIODDReadMessage()
Short description

Select a read message to edit.

Parameters
Name Type Multiplicity Description

newSelectedMessage

STRING

1

Name of the message.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSelectedIODDReadMessage(newSelectedMessage)
CSK_MultiIOLinkSMI.setSelectedIODDWriteMessage()
Short description

Select a write message to edit.

Parameters
Name Type Multiplicity Description

newSelectedMessage

STRING

1

Name of the message.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSelectedIODDWriteMessage(newSelectedMessage)
CSK_MultiIOLinkSMI.setSelectedTab()
Short description

Select tab in UI.

Parameters
Name Type Multiplicity Description

tabNumber

INT

1

ID of the tab.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setSelectedTab(tabNumber)
CSK_MultiIOLinkSMI.setTestReadParameterIndex()
Short description

Set index of the parameter to read as byte array in UI.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTestReadParameterIndex(index)
CSK_MultiIOLinkSMI.setTestReadParameterSubindex()
Short description

Set subindex of the parameter to read as byte array in UI.

Parameters
Name Type Multiplicity Description

subindex

INT

1

Subindex of the parameter.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTestReadParameterSubindex(subindex)
CSK_MultiIOLinkSMI.setTestWriteIODDMessage()
Short description

Set JSON content of message to write to device. The content must have the same format as JSON template of the selected message (template is generated based on selected paramters/process data).

Parameters
Name Type Multiplicity Description

newTestWriteIODDMessage

STRING

1

JSON data to write to the device.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTestWriteIODDMessage(newTestWriteIODDMessage)
CSK_MultiIOLinkSMI.setTestWriteParameterIndex()
Short description

Set index of the parameter to write as byte array in UI.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTestWriteParameterIndex(index)
CSK_MultiIOLinkSMI.setTestWriteParameterSubindex()
Short description

Set subindex of the parameter to write as byte array in UI.

Parameters
Name Type Multiplicity Description

subindex

INT

1

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTestWriteParameterSubindex(subindex)
CSK_MultiIOLinkSMI.setTriggerType()
Short description

Set condition of when to read the selected read message. Possible options:
*Periodic - the message is periodically requested from the IO-Link device. The period can be set by setTriggerValue function.
*On event- the message is requested from the IO-Link device when some event is notified. The event can be set by setTriggerValue function.

Parameters
Name Type Multiplicity Description

newTriggerType

STRING

1

'Periodic' or 'On event'

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTriggerType(newTriggerType)
CSK_MultiIOLinkSMI.setTriggerValue()
Short description

Set value depending on the selected trigger type of the selected read message.
*if type is 'Periodic' - period in [ms].
*if type is 'On event' - name of served CROWN event.

Parameters
Name Type Multiplicity Description

newTriggerValue

STRING

1

Period in [ms] or name of served CROWN event.

Sample (auto-generated)
CSK_MultiIOLinkSMI.setTriggerValue(newTriggerValue)
CSK_MultiIOLinkSMI.startReadMessageTimer()
Short description

Function to start timers for all read messages,

Sample (auto-generated)
CSK_MultiIOLinkSMI.startReadMessageTimer()
CSK_MultiIOLinkSMI.stopFlowConfigRelevantProvider()
Short description

Function to stop FlowConfig relevant providers.

Sample (auto-generated)
CSK_MultiIOLinkSMI.stopFlowConfigRelevantProvider()
CSK_MultiIOLinkSMI.triggerProcessDataTestViaUI()
Short description

Function to trigger readMessage of currently selected readMessage.

Sample (auto-generated)
CSK_MultiIOLinkSMI.triggerProcessDataTestViaUI()
CSK_MultiIOLinkSMI.triggerUnpackDataTestViaUI()
Short description

Function to trigger readMessage incl. unpacking data of currently selected readMessage.

Sample (auto-generated)
CSK_MultiIOLinkSMI.triggerUnpackDataTestViaUI()
CSK_MultiIOLinkSMI.updateInstanceParameters()
Short description

Update all parameters of specified instance. Following is sample structure of JSON table with parameters:

{
"active":false,
"periodDuration":1000,
"port":"S1",
"ReadPD":
[
{
"DataInfo":"DT50_distance",
"DataType":"UINT",
"StartBit":0,
"BitLength":16,
"Period":1,
},
],
"WritePD":[],
"ReadSD":
[
{
"DataInfo":"DT50_process_data_structure",
"DataType":"UINT",
"Index":120
"Subindex":0,
"Period":3,
},
{
"DataInfo":"DT50_sensor_temperature",
"DataType":"INT",
"Index":153
"Subindex":0,
"Period":3,
}
],
"WriteSD":
[
{
"DataInfo":"DT50_process_data_structure"
"DataType":"UINT",
"DataLength":1,
"Index":120,
"Subindex":0,
"Period":0,
}
]
}
Parameters
Name Type Multiplicity Description

jsonNewParameters

AUTO

1

Parameters in JSON format

Sample (auto-generated)
CSK_MultiIOLinkSMI.updateInstanceParameters(jsonNewParameters)
CSK_MultiIOLinkSMI.uploadFinishedCSKIODDInterpreter()
Short description

Function to call CSK_IODDInterpreter.uploadFinished function when IODD file upload is finished.

Parameters
Name Type Multiplicity Description

uploadSuccess

BOOL

1

Succcess of uploading.

Sample (auto-generated)
CSK_MultiIOLinkSMI.uploadFinishedCSKIODDInterpreter(uploadSuccess)
CSK_MultiIOLinkSMI.writeIODDMessage()
Short description

Write configured message to IO-Link sensor.

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the configured message.

jsonDataToWrite

STRING

1

Data to write to the IO-Link device in JSON format.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing the message.

Sample (auto-generated)
success = CSK_MultiIOLinkSMI.writeIODDMessage(messageName, jsonDataToWrite)
CSK_MultiIOLinkSMI.writeIODDMessageFromUI()
Short description

Write configured message to IO-Link sensor from UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.writeIODDMessageFromUI()
CSK_MultiIOLinkSMI.writeIODDMessageNUM()
Short description

Write preconfigured message.
NUM will be replaced by the number of instance (e.g. "writeIODDMessage1").

Parameters
Name Type Multiplicity Description

messageName

STRING

1

Name of the message to read.

jsonDataToWrite

STRING

1

JSON table with message to be written.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

details

STRING

?

Detailed error if writing is not successful.

Sample (auto-generated)
success, details = CSK_MultiIOLinkSMI.writeIODDMessageNUM(messageName, jsonDataToWrite)
CSK_MultiIOLinkSMI.writeMessagePortMessageName()
Short description

Function to write the message with to IOLink device. The data must a JSON object that has the same structure as the configured message. Port - sensor port the device is connected to (S1,S2 …​). MessageName - the configured name of the message.

Parameters
Name Type Multiplicity Description

data

STRING

1

JSON object that has the same structure as the configured message.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing data.

queueSize

INT

1

Size of the queue calls in the thread responsible for communication with this IOLink device. If the queue builds up, this can lead to memory overflow. That’s why the queue is recet to 0 in case there are more than 10 calls.

time

INT

1

Time in milliseconds spent for getting and parsing the data.

errorMessage

STRING

1

Error message, if any.

Sample (auto-generated)
success, queueSize, time, errorMessage = CSK_MultiIOLinkSMI.writeMessagePortMessageName(data)
CSK_MultiIOLinkSMI.writeParameter()
Short description

Write parameter to IO-Link sensor in case the IODD description of the parameter is available.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

subindex

INT

1

Subindex of the parameter.

jsonDataToWrite

STRING

1

JSON object with data to write to the IO-Link device.

Return values
Name Type Multiplicity Description

writeSuccess

BOOL

1

Success of writing.

Sample (auto-generated)
writeSuccess = CSK_MultiIOLinkSMI.writeParameter(index, subindex, jsonDataToWrite)
CSK_MultiIOLinkSMI.writeParameterByteArray()
Short description

Write parameter to IO-Link sensor as a raw byte array. Might be useful for testing.

Parameters
Name Type Multiplicity Description

index

INT

1

Index of the parameter.

subindex

INT

1

Subndex of the parameter.

byteArrayToWrite

INT

*

Byte array in dec format.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

errorDescription

STRING

?

Optional error description if writing failed.

Sample (auto-generated)
success, errorDescription = CSK_MultiIOLinkSMI.writeParameterByteArray(index, subindex, byteArrayToWrite)
CSK_MultiIOLinkSMI.writeParameterByteArray_NUM()
Short description

Write parameter as byte array in IO-Link JSON standard, for example:
{
"value":[232,12,1]
}
NUM will be replaced by the number of instance (e.g. "writeParameterByteArray_1").

Parameters
Name Type Multiplicity Description

index

AUTO

1

Index of the parameter.

subindex

AUTO

1

Subindex of the parameter.

jsonDataToWrite

STRING

1

JSON byte array with parameter value to be written.

Return values
Name Type Multiplicity Description

success

INT

1

Success of writing.

details

STRING

?

Detailed error if writing is not successful.

Sample (auto-generated)
success, details = CSK_MultiIOLinkSMI.writeParameterByteArray_NUM(index, subindex, jsonDataToWrite)
CSK_MultiIOLinkSMI.writeParameterByteArrayUI()
Short description

Write parameter to IO-Link device as a raw byte array triggered by button in UI.

Sample (auto-generated)
CSK_MultiIOLinkSMI.writeParameterByteArrayUI()
CSK_MultiIOLinkSMI.writeParameterIODD_NUM()
Short description

Write parameter with provided info from IODD interpreter and data to write (as JSON tables).
NUM will be replaced by the number of instance (e.g. "writeParameterIODD_1").

Parameters
Name Type Multiplicity Description

index

AUTO

1

Index of the parameter.

subindex

AUTO

1

Subindex of the parameter.

jsonDataPointInfo

STRING

1

JSON table containing parameter info from IODD file.

jsonDataToWrite

STRING

1

JSON table with parameter value to be written.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

details

STRING

?

Detailed error if writing is not successful

Sample (auto-generated)
success, details = CSK_MultiIOLinkSMI.writeParameterIODD_NUM(index, subindex, jsonDataPointInfo, jsonDataToWrite)
CSK_MultiIOLinkSMI.writeParameterRowSelectedCSKIODDInterpreter()
Short description

Function to call CSK_IODDInterpreter.writeParameterRowSelected function when row in write parameters table of write message is selected.

Parameters
Name Type Multiplicity Description

rowData

STRING

1

Row data in JSON format.

Sample (auto-generated)
CSK_MultiIOLinkSMI.writeParameterRowSelectedCSKIODDInterpreter(rowData)
CSK_MultiIOLinkSMI.writeProcessData()
Short description

Write process data to IO-Link sensor in case the IODD description of the parameter is available.

Parameters
Name Type Multiplicity Description

jsonDataToWrite

STRING

1

JSON object with data to write to the IO-Link device.

Return values
Name Type Multiplicity Description

writeSuccess

BOOL

1

Success of writing.

Sample (auto-generated)
writeSuccess = CSK_MultiIOLinkSMI.writeProcessData(jsonDataToWrite)
CSK_MultiIOLinkSMI.writeProcessDataByteArray()
Short description

Write process data to IO-Link sensor as a raw byte array. Might be useful for testing.

Parameters
Name Type Multiplicity Description

byteArrayToWrite

INT

*

Byte array in dec format.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

errorDescription

STRING

?

Optional error description if writing failed.

Sample (auto-generated)
success, errorDescription = CSK_MultiIOLinkSMI.writeProcessDataByteArray(byteArrayToWrite)
CSK_MultiIOLinkSMI.writeProcessDataByteArray_NUM()
Short description

Write process data as byte array in IO-Link JSON standard, for example:
{
"value":[232,12,1]
}
NUM will be replaced by the number of instance (e.g. "writeProcessDataByteArray_1").

Parameters
Name Type Multiplicity Description

jsonData

STRING

1

JSON byte array with process data to be written.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

details

STRING

?

Detailed error if writing is not successful.

Sample (auto-generated)
success, details = CSK_MultiIOLinkSMI.writeProcessDataByteArray_NUM(jsonData)
CSK_MultiIOLinkSMI.writeProcessDataByteArrayUI()
Sample (auto-generated)
CSK_MultiIOLinkSMI.writeProcessDataByteArrayUI()
CSK_MultiIOLinkSMI.writeProcessDataIODD_NUM()
Short description

Write process data with provided info from IODD interpreter and data to write (as JSON tables).
NUM will be replaced by the number of instance (e.g. "writeProcessDataIODD_1").

Parameters
Name Type Multiplicity Description

jsonDataPointInfo

STRING

1

JSON table containing process data info from IODD file.

jsonData

STRING

1

JSON table with process data to be written.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of writing.

details

STRING

?

Detailed error if writing is not successful.

Sample (auto-generated)
success, details = CSK_MultiIOLinkSMI.writeProcessDataIODD_NUM(jsonDataPointInfo, jsonData)

Events

CSK_MultiIOLinkSMI.OnDataLoadedOnReboot
Short description

Event to call if module tried to load parameters and should be ready.

Sample (auto-generated)
function handleOnDataLoadedOnReboot()
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
CSK_MultiIOLinkSMI.OnNewDeviceId
Short description

Event to show the device ID of the device.

Callback arguments
Name Type Multiplicity Description

deviceId

STRING

1

Device ID.

Sample (auto-generated)
function handleOnNewDeviceId(deviceId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewDeviceId", "handleOnNewDeviceId")
CSK_MultiIOLinkSMI.OnNewDeviceIdentificationApplied
Short description

Notify if device identification of new discovered device is applied instead of the old one.

Callback arguments
Name Type Multiplicity Description

instance

INT

1

Instance ID.

jsonInstanceParameters

STRING

1

JSON object containing all parameters of the instance.

Sample (auto-generated)
function handleOnNewDeviceIdentificationApplied(instance, jsonInstanceParameters)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewDeviceIdentificationApplied", "handleOnNewDeviceIdentificationApplied")
CSK_MultiIOLinkSMI.OnNewFirmwareVersion
Short description

Event to show the firmware version of the device.

Callback arguments
Name Type Multiplicity Description

firmwareVersion

STRING

1

Firmware version.

Sample (auto-generated)
function handleOnNewFirmwareVersion(firmwareVersion)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewFirmwareVersion", "handleOnNewFirmwareVersion")
CSK_MultiIOLinkSMI.OnNewHardwareVersion
Short description

Event to show the hardware version of the device.

Callback arguments
Name Type Multiplicity Description

hardwareVersion

STRING

1

Hardware version.

Sample (auto-generated)
function handleOnNewHardwareVersion(hardwareVersion)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewHardwareVersion", "handleOnNewHardwareVersion")
CSK_MultiIOLinkSMI.OnNewInstanceList
Short description

Event to provide list of created instances

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List of created instances

Sample (auto-generated)
function handleOnNewInstanceList(list)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewInstanceList", "handleOnNewInstanceList")
CSK_MultiIOLinkSMI.OnNewIOLinkPortStatus
Short description

Notify new status of the IO-Link port.

Callback arguments
Name Type Multiplicity Description

instance

INT

1

Instance ID.

status

STRING

1

Port status.

port

STRING

1

Port

Sample (auto-generated)
function handleOnNewIOLinkPortStatus(instance, status, port)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewIOLinkPortStatus", "handleOnNewIOLinkPortStatus")
CSK_MultiIOLinkSMI.OnNewListIODDReadMessages
Short description

Event to provide list of created read messages.

Callback arguments
Name Type Multiplicity Description

jsonList

STRING

1

List of created read messages.

Sample (auto-generated)
function handleOnNewListIODDReadMessages(jsonList)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewListIODDReadMessages", "handleOnNewListIODDReadMessages")
CSK_MultiIOLinkSMI.OnNewListIODDWriteMessages
Short description

Event to provide list of created write messages.

Callback arguments
Name Type Multiplicity Description

jsonList

STRING

1

List of created write messages.

Sample (auto-generated)
function handleOnNewListIODDWriteMessages(jsonList)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewListIODDWriteMessages", "handleOnNewListIODDWriteMessages")
CSK_MultiIOLinkSMI.OnNewListProcessDataCondition
Short description

Event to provide list of process data structure options.

Callback arguments
Name Type Multiplicity Description

jsonListProcessDataCondition

STRING

1

List of process data structure options.

Sample (auto-generated)
function handleOnNewListProcessDataCondition(jsonListProcessDataCondition)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewListProcessDataCondition", "handleOnNewListProcessDataCondition")
CSK_MultiIOLinkSMI.OnNewNewDeviceDeviceId
Short description

Event to show the device ID of new discovered device.

Callback arguments
Name Type Multiplicity Description

deviceId

STRING

1

Device ID.

Sample (auto-generated)
function handleOnNewNewDeviceDeviceId(deviceId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceDeviceId", "handleOnNewNewDeviceDeviceId")
CSK_MultiIOLinkSMI.OnNewNewDeviceFirmwareVersion
Short description

Event to show the firmware version of new discovered device.

Callback arguments
Name Type Multiplicity Description

firmwareVersion

STRING

1

Firmware version.

Sample (auto-generated)
function handleOnNewNewDeviceFirmwareVersion(firmwareVersion)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceFirmwareVersion", "handleOnNewNewDeviceFirmwareVersion")
CSK_MultiIOLinkSMI.OnNewNewDeviceHardwareVersion
Short description

Event to show the hardware version of new discovered device.

Callback arguments
Name Type Multiplicity Description

hardwareVersion

STRING

1

Hardware version.

Sample (auto-generated)
function handleOnNewNewDeviceHardwareVersion(hardwareVersion)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceHardwareVersion", "handleOnNewNewDeviceHardwareVersion")
CSK_MultiIOLinkSMI.OnNewNewDeviceProductId
Short description

Event to show the product id of new discovered device.

Callback arguments
Name Type Multiplicity Description

productId

STRING

1

Product ID.

Sample (auto-generated)
function handleOnNewNewDeviceProductId(productId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceProductId", "handleOnNewNewDeviceProductId")
CSK_MultiIOLinkSMI.OnNewNewDeviceProductName
Short description

Event to show the product name of new discovered device.

Callback arguments
Name Type Multiplicity Description

productName

STRING

1

Product name.

Sample (auto-generated)
function handleOnNewNewDeviceProductName(productName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceProductName", "handleOnNewNewDeviceProductName")
CSK_MultiIOLinkSMI.OnNewNewDeviceProductText
Short description

Event to show the product text of new discovered device.

Callback arguments
Name Type Multiplicity Description

productText

STRING

1

Product text.

Sample (auto-generated)
function handleOnNewNewDeviceProductText(productText)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceProductText", "handleOnNewNewDeviceProductText")
CSK_MultiIOLinkSMI.OnNewNewDeviceSerialNumber
Short description

Event to show the serial number of new discovered device.

Callback arguments
Name Type Multiplicity Description

serialNumber

STRING

1

Serial number.

Sample (auto-generated)
function handleOnNewNewDeviceSerialNumber(serialNumber)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceSerialNumber", "handleOnNewNewDeviceSerialNumber")
CSK_MultiIOLinkSMI.OnNewNewDeviceVendorId
Short description

Event to show the vendor ID of new discovered device.

Callback arguments
Name Type Multiplicity Description

vendorId

STRING

1

Vendor ID.

Sample (auto-generated)
function handleOnNewNewDeviceVendorId(vendorId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceVendorId", "handleOnNewNewDeviceVendorId")
CSK_MultiIOLinkSMI.OnNewNewDeviceVendorName
Short description

Event to show the vendor name of new discovered device.

Callback arguments
Name Type Multiplicity Description

vendorName

STRING

1

Vendor name.

Sample (auto-generated)
function handleOnNewNewDeviceVendorName(vendorName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceVendorName", "handleOnNewNewDeviceVendorName")
CSK_MultiIOLinkSMI.OnNewNewDeviceVendorText
Short description

Event to show the vendor text of new discovered device.

Callback arguments
Name Type Multiplicity Description

vendorText

STRING

1

Vendor text.

Sample (auto-generated)
function handleOnNewNewDeviceVendorText(vendorText)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewNewDeviceVendorText", "handleOnNewNewDeviceVendorText")
CSK_MultiIOLinkSMI.OnNewParameterName
Short description

Notify name of persistent data parameter.

Callback arguments
Name Type Multiplicity Description

name

STRING

1

Parameter name

Sample (auto-generated)
function handleOnNewParameterName(name)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewParameterName", "handleOnNewParameterName")
CSK_MultiIOLinkSMI.OnNewPort
Short description

Event to show selected IO-Link port in UI.

Callback arguments
Name Type Multiplicity Description

Port

STRING

1

Port.

Sample (auto-generated)
function handleOnNewPort(Port)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewPort", "handleOnNewPort")
CSK_MultiIOLinkSMI.OnNewPortDropdown
Short description

Event to show list of ports in UI.

Callback arguments
Name Type Multiplicity Description

PortDropdown

STRING

1

Verialized list of ports.

Sample (auto-generated)
function handleOnNewPortDropdown(PortDropdown)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewPortDropdown", "handleOnNewPortDropdown")
CSK_MultiIOLinkSMI.OnNewPortEvent
Short description

Event to show the new status of active IO-Link port. Can be used externally.

Callback arguments
Name Type Multiplicity Description

port

ENUM
IOLinkMasterPorts

1

Port ID.

eventType

ENUM
IOLink.SMI.EventTypes

1

IO-Link event type.

eventDescription

STRING

1

Description of IO-Link event.

Sample (auto-generated)
function handleOnNewPortEvent(port, eventType, eventDescription)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewPortEvent", "handleOnNewPortEvent")
CSK_MultiIOLinkSMI.OnNewPortInformation
Short description

Event triggerd when port status has changed which might mean that the IOLink device was connected/disconnected or another devices was connected.

Callback arguments
Name Type Multiplicity Description

instanceId

INT

1

Instance ID.

portNumber

STRING

1

Port name like S1, S2 …​

portStatus

STRING

1

New port status.

jsonDeviceIdentification

STRING

?

JSON object containing the saved device identification for this port.

ioddName

STRING

?

IODD name of an IODD object used in CSK_Module_IODDInterpreter for this instance.

jsonNewDeviceIdentification

STRING

?

Optional JSON object with the device identification of the connected device if its ID does not match the saved one for this instance.

Sample (auto-generated)
function handleOnNewPortInformation(instanceId, portNumber, portStatus, jsonDeviceIdentification, ioddName, jsonNewDeviceIdentification)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewPortInformation", "handleOnNewPortInformation")
CSK_MultiIOLinkSMI.OnNewPortStatus
Short description

Event to show current port status of selected IO-Link port in UI.

Callback arguments
Name Type Multiplicity Description

postStatus

STRING

1

Status of the port.

Sample (auto-generated)
function handleOnNewPortStatus(postStatus)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewPortStatus", "handleOnNewPortStatus")
CSK_MultiIOLinkSMI.OnNewProcessDataCondition
Short description

Event to show selected IO-Link procecss data option of connected device in UI.

Callback arguments
Name Type Multiplicity Description

condition

STRING

1

Selected variant of process data structure.

Sample (auto-generated)
function handleOnNewProcessDataCondition(condition)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProcessDataCondition", "handleOnNewProcessDataCondition")
CSK_MultiIOLinkSMI.OnNewProcessDataInTableContentCSKIODDInterpreter
Short description

Event to forward data from CSK_IODDInterpreter.OnNewProcessDataInTableContent event to fill the process data in table of the read message.

Callback arguments
Name Type Multiplicity Description

tableContent

STRING

1

Table content in JSON format.

Sample (auto-generated)
function handleOnNewProcessDataInTableContentCSKIODDInterpreter(tableContent)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProcessDataInTableContentCSKIODDInterpreter", "handleOnNewProcessDataInTableContentCSKIODDInterpreter")
CSK_MultiIOLinkSMI.OnNewProcessDataOutTableContentCSKIODDInterpreter
Short description

Event to forward data from CSK_IODDInterpreter.OnNewProcessDataOutTableContent event to fill the process data out table of the write message.

Callback arguments
Name Type Multiplicity Description

tableContent

STRING

1

Table content in JSON format.

Sample (auto-generated)
function handleOnNewProcessDataOutTableContentCSKIODDInterpreter(tableContent)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProcessDataOutTableContentCSKIODDInterpreter", "handleOnNewProcessDataOutTableContentCSKIODDInterpreter")
CSK_MultiIOLinkSMI.OnNewProcessingParameter
Short description

Event to share processing parameters to the instances.

Callback arguments
Name Type Multiplicity Description

objectNo

INT

1

Number of the instance to receive the parameter.

parameter

STRING

1

Name of the parameter.

value

AUTO

1

Value of the parameter.

internalObjectNo

INT

?

If parameter is for specifici internal used object, its number.

Sample (auto-generated)
function handleOnNewProcessingParameter(objectNo, parameter, value, internalObjectNo)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProcessingParameter", "handleOnNewProcessingParameter")
CSK_MultiIOLinkSMI.OnNewProductId
Short description

Event to show the product id of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

productId

STRING

1

Product ID.

Sample (auto-generated)
function handleOnNewProductId(productId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProductId", "handleOnNewProductId")
CSK_MultiIOLinkSMI.OnNewProductName
Short description

Event to show the product name of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

productName

STRING

1

Product name.

Sample (auto-generated)
function handleOnNewProductName(productName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProductName", "handleOnNewProductName")
CSK_MultiIOLinkSMI.OnNewProductText
Short description

Event to show the product text of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

productText

STRING

1

Product text.

Sample (auto-generated)
function handleOnNewProductText(productText)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewProductText", "handleOnNewProductText")
CSK_MultiIOLinkSMI.OnNewRawReadMessage_INSTANCE_PORT_MESSAGENAME
Short description

Example of dynamically created event to notify data received from IO-Link device.
INSTANCE and PORT will be replaced by the instanceIdentifier and sensor port the device is connected to (S1,S2 …​) and MESSAGENAME by the configured name of the message (e.g. "OnNewRawReadMessage_1_S1_MyMessage").
INFO: Other modules can check via "Script.isServedAsEvent" if event exists.

Callback arguments
Name Type Multiplicity Description

data

AUTO

?

Manually unpacked part of process data (no IODD Interpreter used).

timestamp

INT

1

Timestamp

Sample (auto-generated)
function handleOnNewRawReadMessage_INSTANCE_PORT_MESSAGENAME(data, timestamp)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewRawReadMessage_INSTANCE_PORT_MESSAGENAME", "handleOnNewRawReadMessage_INSTANCE_PORT_MESSAGENAME")
CSK_MultiIOLinkSMI.OnNewReadDataMessage
Short description

Event to show the received message after the refresh button has been pressed in UI.

Callback arguments
Name Type Multiplicity Description

message

STRING

1

Received message.

Sample (auto-generated)
function handleOnNewReadDataMessage(message)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadDataMessage", "handleOnNewReadDataMessage")
CSK_MultiIOLinkSMI.OnNewReadDataSuccess
Short description

Event to show the success of reading message after the refresh button has been pressed in UI.

Callback arguments
Name Type Multiplicity Description

success

BOOL

1

True if successful.

Sample (auto-generated)
function handleOnNewReadDataSuccess(success)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadDataSuccess", "handleOnNewReadDataSuccess")
CSK_MultiIOLinkSMI.OnNewReadJSONTemplate
Short description

Event to show JSON template of configured reading message.

Callback arguments
Name Type Multiplicity Description

readJSONTemplate

STRING

?

JSON template.

Sample (auto-generated)
function handleOnNewReadJSONTemplate(readJSONTemplate)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadJSONTemplate", "handleOnNewReadJSONTemplate")
CSK_MultiIOLinkSMI.OnNewReadMessage_INSTANCE_PORT_MESSAGENAME
Short description

Example of dynamically created event to notify data received from IOLink device.
INSTANCE and PORT will be replaced by the instance identifier and sensor port the device is connected to (S1,S2 …​) and MESSAGENAME by the configured name of the message (e.g. "OnNewReadMessage_1_S1_MyMessage").
INFO: Other modules can check via "Script.isServedAsEvent" if event exists.

Callback arguments
Name Type Multiplicity Description

success

BOOL

1

Success of reading data.

queueSize

INT

1

Size of the queue calls in the thread responsible for communication with this IOLink device. If the queue builds up, this can lead to memory overflow. That’s why the queue is recet to 0 in case there are more than 10 calls.

time

INT

1

Time in milliseconds spent for getting and parsing the data.

data

STRING

?

JSON object containing the interpreted data.

detailedErrorMessage

STRING

?

Error message, if any.

Sample (auto-generated)
function handleOnNewReadMessage_INSTANCE_PORT_MESSAGENAME(success, queueSize, time, data, detailedErrorMessage)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadMessage_INSTANCE_PORT_MESSAGENAME", "handleOnNewReadMessage_INSTANCE_PORT_MESSAGENAME")
CSK_MultiIOLinkSMI.OnNewReadMessageEventName
Short description

Event to show the event name that can be used externally.

Callback arguments
Name Type Multiplicity Description

eventName

STRING

1

Name of the event.

Sample (auto-generated)
function handleOnNewReadMessageEventName(eventName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadMessageEventName", "handleOnNewReadMessageEventName")
CSK_MultiIOLinkSMI.OnNewReadParameterByteArray
Short description

Event to show the received byte array after reading the configured parameter from IO-Link device for testing purposes.

Callback arguments
Name Type Multiplicity Description

receivedByteArray

STRING

1

Byte array in dec format.

Sample (auto-generated)
function handleOnNewReadParameterByteArray(receivedByteArray)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadParameterByteArray", "handleOnNewReadParameterByteArray")
CSK_MultiIOLinkSMI.OnNewReadParametersTableContentCSKIODDInterpreter
Short description

Event to forward data from CSK_IODDInterpreter.OnNewReadParametersTableContent event to fill the paramters table of the read message.

Callback arguments
Name Type Multiplicity Description

tableContent

STRING

1

Table content in JSON format.

Sample (auto-generated)
function handleOnNewReadParametersTableContentCSKIODDInterpreter(tableContent)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadParametersTableContentCSKIODDInterpreter", "handleOnNewReadParametersTableContentCSKIODDInterpreter")
CSK_MultiIOLinkSMI.OnNewReadProcessDataByteArray
Short description

Event to show the received byte array after reading the process data from IO-Link device for testing purposes.

Callback arguments
Name Type Multiplicity Description

processDataByteArray

STRING

1

Byte array in dec format.

Sample (auto-generated)
function handleOnNewReadProcessDataByteArray(processDataByteArray)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewReadProcessDataByteArray", "handleOnNewReadProcessDataByteArray")
CSK_MultiIOLinkSMI.OnNewSearchBegin
Short description

Notify pattern to search for as starting position to cut JSON data.

Callback arguments
Name Type Multiplicity Description

pattern

STRING

1

Pattern

Sample (auto-generated)
function handleOnNewSearchBegin(pattern)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSearchBegin", "handleOnNewSearchBegin")
CSK_MultiIOLinkSMI.OnNewSearchEnd
Short description

Notify pattern to search for as end position to cut JSON data.

Callback arguments
Name Type Multiplicity Description

pattern

STRING

1

Pattern

Sample (auto-generated)
function handleOnNewSearchEnd(pattern)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSearchEnd", "handleOnNewSearchEnd")
CSK_MultiIOLinkSMI.OnNewSelectedInstance
Short description

Notify if new instance is selected.

Callback arguments
Name Type Multiplicity Description

selectedObject

INT

1

Selected instance.

Sample (auto-generated)
function handleOnNewSelectedInstance(selectedObject)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSelectedInstance", "handleOnNewSelectedInstance")
CSK_MultiIOLinkSMI.OnNewSelectedIODDReadMessage
Short description

Event to show selected read message.

Callback arguments
Name Type Multiplicity Description

messageName

STRING

1

Name of the read message.

Sample (auto-generated)
function handleOnNewSelectedIODDReadMessage(messageName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSelectedIODDReadMessage", "handleOnNewSelectedIODDReadMessage")
CSK_MultiIOLinkSMI.OnNewSelectedIODDWriteMessage
Short description

Event to show selected write message.

Callback arguments
Name Type Multiplicity Description

messageName

STRING

1

Name of the write message.

Sample (auto-generated)
function handleOnNewSelectedIODDWriteMessage(messageName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSelectedIODDWriteMessage", "handleOnNewSelectedIODDWriteMessage")
CSK_MultiIOLinkSMI.OnNewSelectedTab
Short description

Notify to show selected tab.

Callback arguments
Name Type Multiplicity Description

tabNumber

INT

1

Tab ID.

Sample (auto-generated)
function handleOnNewSelectedTab(tabNumber)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSelectedTab", "handleOnNewSelectedTab")
CSK_MultiIOLinkSMI.OnNewSerialNumber
Short description

Event to show the serial number of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

serialNumber

STRING

1

Serial number.

Sample (auto-generated)
function handleOnNewSerialNumber(serialNumber)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewSerialNumber", "handleOnNewSerialNumber")
CSK_MultiIOLinkSMI.OnNewStatusAutoStartReadMessageTimer
Short description

Notify status if ALL readMessage timers should start automatically after parameters were loaded.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewStatusAutoStartReadMessageTimer(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusAutoStartReadMessageTimer", "handleOnNewStatusAutoStartReadMessageTimer")
CSK_MultiIOLinkSMI.OnNewStatusCSKIODDInterpreterAvailable
Short description

Event to show if there is available CSK IODD interpreter in the project.

Callback arguments
Name Type Multiplicity Description

isAvailable

BOOL

1

True if available.

Sample (auto-generated)
function handleOnNewStatusCSKIODDInterpreterAvailable(isAvailable)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusCSKIODDInterpreterAvailable", "handleOnNewStatusCSKIODDInterpreterAvailable")
CSK_MultiIOLinkSMI.OnNewStatusCSKStyle
Short description

Notify UI style to use for CSK modules.

Callback arguments
Name Type Multiplicity Description

theme

STRING

1

UI style

Sample (auto-generated)
function handleOnNewStatusCSKStyle(theme)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
CSK_MultiIOLinkSMI.OnNewStatusFlowConfigPriority
Short description

Notify if FlowConfig should have priority for FlowConfig relevant configurations.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewStatusFlowConfigPriority(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
CSK_MultiIOLinkSMI.OnNewStatusInstanceActive
Short description

Notify if instance is activated.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

State of instance.

Sample (auto-generated)
function handleOnNewStatusInstanceActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusInstanceActive", "handleOnNewStatusInstanceActive")
CSK_MultiIOLinkSMI.OnNewStatusIODDMatchFound
Short description

Event to notify if there is a matching IODD file found by IODD interpreter module.

Callback arguments
Name Type Multiplicity Description

isFound

BOOL

1

True if the match is found.

Sample (auto-generated)
function handleOnNewStatusIODDMatchFound(isFound)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusIODDMatchFound", "handleOnNewStatusIODDMatchFound")
CSK_MultiIOLinkSMI.OnNewStatusIODDReadMessageSelected
Short description

Event to inform if the read message is selected in UI. Used to show settings in UI.

Callback arguments
Name Type Multiplicity Description

isSelected

BOOL

1

True if selected.

Sample (auto-generated)
function handleOnNewStatusIODDReadMessageSelected(isSelected)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusIODDReadMessageSelected", "handleOnNewStatusIODDReadMessageSelected")
CSK_MultiIOLinkSMI.OnNewStatusIODDWriteMessageSelected
Short description

Event to inform if the write message is selected in UI. Used to show settings in UI.

Callback arguments
Name Type Multiplicity Description

isSelected

BOOL

1

True if selected.

Sample (auto-generated)
function handleOnNewStatusIODDWriteMessageSelected(isSelected)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusIODDWriteMessageSelected", "handleOnNewStatusIODDWriteMessageSelected")
CSK_MultiIOLinkSMI.OnNewStatusLoadParameterOnReboot
Short description

Notify status if parameters should be loaded on app-/device- boot up.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status.

Sample (auto-generated)
function handleOnNewStatusLoadParameterOnReboot(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
CSK_MultiIOLinkSMI.OnNewStatusModuleIsActive
Short description

Notify if module can be used on device.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status.

Sample (auto-generated)
function handleOnNewStatusModuleIsActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
CSK_MultiIOLinkSMI.OnNewStatusModuleVersion
Short description

Notify version of module.

Callback arguments
Name Type Multiplicity Description

version

STRING

1

Version

Sample (auto-generated)
function handleOnNewStatusModuleVersion(version)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
CSK_MultiIOLinkSMI.OnNewStatusNewDeviceFound
Short description

Event to notify if there is a new device discovered on selected port. Used to show settings in UI.

Callback arguments
Name Type Multiplicity Description

state

BOOL

1

State

Sample (auto-generated)
function handleOnNewStatusNewDeviceFound(state)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusNewDeviceFound", "handleOnNewStatusNewDeviceFound")
CSK_MultiIOLinkSMI.OnNewStatusProcessDataTestResult
Short description

Notify result of test trigger of processData.

Callback arguments
Name Type Multiplicity Description

result

STRING

1

Result

Sample (auto-generated)
function handleOnNewStatusProcessDataTestResult(result)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusProcessDataTestResult", "handleOnNewStatusProcessDataTestResult")
CSK_MultiIOLinkSMI.OnNewStatusProcessDataVariable
Short description

Event to show additional settings if process data of the IO-Link device has a variable structure.

Callback arguments
Name Type Multiplicity Description

state

BOOL

1

State

Sample (auto-generated)
function handleOnNewStatusProcessDataVariable(state)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusProcessDataVariable", "handleOnNewStatusProcessDataVariable")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageIODDActive
Short description

Notify if IODD mode for currently selected readMessage is active.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewStatusReadMessageIODDActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageIODDActive", "handleOnNewStatusReadMessageIODDActive")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageMode
Short description

Notify mode if new readMessage to create should use IODD info or not.

Callback arguments
Name Type Multiplicity Description

mode

STRING

1

Mode ('IODD' or 'NO_IODD')

Sample (auto-generated)
function handleOnNewStatusReadMessageMode(mode)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageMode", "handleOnNewStatusReadMessageMode")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataEndByte
Short description

Notify endByte of data within the process data of currently selected readMessage.

Callback arguments
Name Type Multiplicity Description

position

INT

1

Position

Sample (auto-generated)
function handleOnNewStatusReadMessageProcessDataEndByte(position)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataEndByte", "handleOnNewStatusReadMessageProcessDataEndByte")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataStartByte
Short description

Notify startByte of data within the process data of currently selected readMessage.

Callback arguments
Name Type Multiplicity Description

position

INT

1

Position

Sample (auto-generated)
function handleOnNewStatusReadMessageProcessDataStartByte(position)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataStartByte", "handleOnNewStatusReadMessageProcessDataStartByte")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataUnpackFormat
Short description

Notify unpack format for processData of currently selected readMessage.

Callback arguments
Name Type Multiplicity Description

format

STRING

1

Format (for LUA string.unpack function).

Sample (auto-generated)
function handleOnNewStatusReadMessageProcessDataUnpackFormat(format)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageProcessDataUnpackFormat", "handleOnNewStatusReadMessageProcessDataUnpackFormat")
CSK_MultiIOLinkSMI.OnNewStatusReadMessageTimerActive
Short description

Notify status if timer for readMessages are active.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewStatusReadMessageTimerActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusReadMessageTimerActive", "handleOnNewStatusReadMessageTimerActive")
CSK_MultiIOLinkSMI.OnNewStatusUnpackDataTestResult
Short description

Notify result of test trigger to unpack processData.

Callback arguments
Name Type Multiplicity Description

result

STRING

1

Result

Sample (auto-generated)
function handleOnNewStatusUnpackDataTestResult(result)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewStatusUnpackDataTestResult", "handleOnNewStatusUnpackDataTestResult")
CSK_MultiIOLinkSMI.OnNewTestCommandState
Short description

Event to show latest status of reading or writing raw byte arrays from/to IO-Link device for testing purpuses.

Callback arguments
Name Type Multiplicity Description

state

STRING

1

Latest status.

Sample (auto-generated)
function handleOnNewTestCommandState(state)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewTestCommandState", "handleOnNewTestCommandState")
CSK_MultiIOLinkSMI.OnNewTestWriteIODDMessage
Short description

Event to show the edited JSON payload of write message be sent to IO-Link device for testing purposes.

Callback arguments
Name Type Multiplicity Description

testWriteIODDMessage

STRING

1

JSON payload which must have the same structure as JSON template of configured write message.

Sample (auto-generated)
function handleOnNewTestWriteIODDMessage(testWriteIODDMessage)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewTestWriteIODDMessage", "handleOnNewTestWriteIODDMessage")
CSK_MultiIOLinkSMI.OnNewTriggerType
Short description

Event to show the selected trigger type of selected read message.

Callback arguments
Name Type Multiplicity Description

triggerType

STRING

1

'Periodic' or 'On event'

Sample (auto-generated)
function handleOnNewTriggerType(triggerType)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewTriggerType", "handleOnNewTriggerType")
CSK_MultiIOLinkSMI.OnNewTriggerValue
Short description

Event to show the selected trigger value of selected read message.

Callback arguments
Name Type Multiplicity Description

triggerValue

STRING

1

Period in [ms] or name of CROWN event.

Sample (auto-generated)
function handleOnNewTriggerValue(triggerValue)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewTriggerValue", "handleOnNewTriggerValue")
CSK_MultiIOLinkSMI.OnNewValueToForwardNUM
Short description

Example of dynamically created event to forward data from instance thread to Controller part of module, e.g. to forward values to UI.
NUM will be replaced by the number of instance (e.g. "OnNewValueToForward1").

Callback arguments
Name Type Multiplicity Description

eventname

STRING

1

Eventname to use to forward value.

value

AUTO

1

Value to forward.

Sample (auto-generated)
function handleOnNewValueToForwardNUM(eventname, value)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewValueToForwardNUM", "handleOnNewValueToForwardNUM")
CSK_MultiIOLinkSMI.OnNewValueUpdateNUM
Short description

Example of dynamically created event to sync paramters between instance threads and Controller part of module.
NUM will be replaced by the number of instance (e.g. "OnNewResult1").

Callback arguments
Name Type Multiplicity Description

instance

INT

1

Instance new value is coming from.

parameter

STRING

1

Name of the paramter to update/sync.

value

AUTO

1

Value to update.

selectedObject

INT

?

Optionally if internal parameter should be used for internal objects.

Sample (auto-generated)
function handleOnNewValueUpdateNUM(instance, parameter, value, selectedObject)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewValueUpdateNUM", "handleOnNewValueUpdateNUM")
CSK_MultiIOLinkSMI.OnNewVendorId
Short description

Event to show the vendor ID of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

vendorId

STRING

1

Vendor ID.

Sample (auto-generated)
function handleOnNewVendorId(vendorId)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewVendorId", "handleOnNewVendorId")
CSK_MultiIOLinkSMI.OnNewVendorName
Short description

Event to show the vendor name of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

vendorName

STRING

1

Vendor name.

Sample (auto-generated)
function handleOnNewVendorName(vendorName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewVendorName", "handleOnNewVendorName")
CSK_MultiIOLinkSMI.OnNewVendorText
Short description

Event to show the vendor text of connected IO-Link device.

Callback arguments
Name Type Multiplicity Description

vendorText

STRING

1

Vendor text.

Sample (auto-generated)
function handleOnNewVendorText(vendorText)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewVendorText", "handleOnNewVendorText")
CSK_MultiIOLinkSMI.OnNewWriteDataMessage
Short description

Event to show the latest payload of write message sent to IO-Link device after refresh button has been pressed.

Callback arguments
Name Type Multiplicity Description

message

STRING

1

JSON message payload.

Sample (auto-generated)
function handleOnNewWriteDataMessage(message)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteDataMessage", "handleOnNewWriteDataMessage")
CSK_MultiIOLinkSMI.OnNewWriteDataSuccess
Short description

Event to show the latest success of writing message to IO-Link device after refresh button has been pressed.

Callback arguments
Name Type Multiplicity Description

success

BOOL

1

True if successful.

Sample (auto-generated)
function handleOnNewWriteDataSuccess(success)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteDataSuccess", "handleOnNewWriteDataSuccess")
CSK_MultiIOLinkSMI.OnNewWriteJSONTemplate
Short description

Event to show JSON template of configured write message.

Callback arguments
Name Type Multiplicity Description

writeJSONTemplate

STRING

?

JSON template.

Sample (auto-generated)
function handleOnNewWriteJSONTemplate(writeJSONTemplate)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteJSONTemplate", "handleOnNewWriteJSONTemplate")
CSK_MultiIOLinkSMI.OnNewWriteMessageEventName
Short description

Event to notify the name of the write data event that was preconfigured and is registered to.

Callback arguments
Name Type Multiplicity Description

eventName

STRING

1

Sample (auto-generated)
function handleOnNewWriteMessageEventName(eventName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteMessageEventName", "handleOnNewWriteMessageEventName")
CSK_MultiIOLinkSMI.OnNewWriteMessageFunctionName
Short description

Event to notify the name of the write data function that can be used externally.

Callback arguments
Name Type Multiplicity Description

functionName

STRING

1

Name of the function.

Sample (auto-generated)
function handleOnNewWriteMessageFunctionName(functionName)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteMessageFunctionName", "handleOnNewWriteMessageFunctionName")
CSK_MultiIOLinkSMI.OnNewWriteParametersTableContentCSKIODDInterpreter
Short description

Event to forward data from CSK_IODDInterpreter.OnNewWriteParametersTableContent event to fill the parameter table of the write message.

Callback arguments
Name Type Multiplicity Description

tableContent

STRING

1

Table content in JSON format.

Sample (auto-generated)
function handleOnNewWriteParametersTableContentCSKIODDInterpreter(tableContent)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnNewWriteParametersTableContentCSKIODDInterpreter", "handleOnNewWriteParametersTableContentCSKIODDInterpreter")
CSK_MultiIOLinkSMI.OnPersistentDataModuleAvailable
Short description

Notify status if features of CSK_PersistentData module are available.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnPersistentDataModuleAvailable(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
CSK_MultiIOLinkSMI.OnUserLevelAdminActive
Short description

Status of Admin userlevel. Used internally in combination with the CSK_UserManagement module if available.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnUserLevelAdminActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
CSK_MultiIOLinkSMI.OnUserLevelMaintenanceActive
Short description

Status of Maintenance userlevel. Used internally in combination with the CSK_UserManagement module if available.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnUserLevelMaintenanceActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
CSK_MultiIOLinkSMI.OnUserLevelOperatorActive
Short description

Status of Operator userlevel. Used internally in combination with the CSK_UserManagement module if available.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnUserLevelOperatorActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
CSK_MultiIOLinkSMI.OnUserLevelServiceActive
Short description

Status of Service userlevel. Used internally in combination with the CSK_UserManagement module if available.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnUserLevelServiceActive(status)
  -- Do something
end

Script.register("CSK_MultiIOLinkSMI.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")

MultiIOLinkSMI_FC

Short description

Crown to provide CSK_FlowConfig relevant features.

Overview

MultiIOLinkSMI_FC.OnNewData

Short description

First activate ports in IOLinkSMI module and create readMessage! Do not use together with "OnNewDataAuto" blocks! Provide IO-Link data of created readMessages.

Functions

MultiIOLinkSMI_FC.OnNewData.create()
Short description

Internally used CSK_FlowConfig create function.

Parameters
Name Type Multiplicity Description

Port

ENUM
MultiIOLinkSMI_FC.IOLinkMasterPorts

1

IO-Link port.

ReadMessageName

STRING

1

Name of read message (e.g. 'Distance') to receive data. IMPORTANT: Please make sure that related readMessage already exists.

Return values
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

Sample (auto-generated)
handle = MultiIOLinkSMI_FC.OnNewData.create(Port, ReadMessageName)
MultiIOLinkSMI_FC.OnNewData.register()
Short description

Internally used CSK_FlowConfig register function.

Parameters
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

eventname

STRING

1

Internal parameter (not used).

callback

STRING

1

Internally used callback function.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of register process.

Sample (auto-generated)
success = MultiIOLinkSMI_FC.OnNewData.register(handle, eventname, callback)

Events

MultiIOLinkSMI_FC.OnNewData.OnNewData
Short description
First activate ports in IOLinkSMI module and create readMessage! Do not use together with "OnNewDataAuto" blocks! Provide IO-Link data of created readMessages.
Callback arguments
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

OnNewData

STRING

1

'CSK_MultiIOLinkSMI.OnNewRawReadMessage_[INSTANCE][PORT][READMESSAGENAME]' Parameter: 1: Data (auto) 2: Timestamp (INT)

Sample (auto-generated)
function handleOnNewData(handle, OnNewData)
  -- Do something
end

Script.register("MultiIOLinkSMI_FC.OnNewData.OnNewData", "handleOnNewData")

MultiIOLinkSMI_FC.OnNewDataAuto

Short description

Do not use together with "OnNewData" or "WriteProcessData" blocks! Will automatically setup the CSK_MultiIOLinkSMI and CSK_PowerManager (if it exists) configuration. Might get in conflict with parallel done configurations! Provide IO-Link data.

Functions

MultiIOLinkSMI_FC.OnNewDataAuto.create()
Short description

Internally used CSK_FlowConfig create function.

Parameters
Name Type Multiplicity Description

Port

ENUM
MultiIOLinkSMI_FC.IOLinkMasterPorts

1

IO-Link port.

CycleTime

INT

1

Cycle time to read process data.

StartByte

INT

1

Start byte of relevant process data to crop (starts at 0)

EndByteOrBitPosition

INT

1

End byte of relevant process data to crop or position of bit to read if unpack format is 'bit'.

UnpackFormat

STRING

1

Format to interpret raw data. E.g. ">I4" to unpack 4 Bytes unsigned INT, big endian byte order < = little endian > = big endian I[n] = unsigned INT of n Bytes i[n] = signed INT of n Bytes bit = read single bit within selected startByte (custom format) …​ Check further formats within the documentation of the string.unpack LUA function.

Return values
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

Sample (auto-generated)
handle = MultiIOLinkSMI_FC.OnNewDataAuto.create(Port, CycleTime, StartByte, EndByteOrBitPosition, UnpackFormat)
MultiIOLinkSMI_FC.OnNewDataAuto.register()
Short description

Internally used CSK_FlowConfig register function.

Parameters
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

eventname

STRING

1

Internal parameter (not used).

callback

STRING

1

Internally used callback function.

Return values
Name Type Multiplicity Description

success

BOOL

1

Success of register process.

Sample (auto-generated)
success = MultiIOLinkSMI_FC.OnNewDataAuto.register(handle, eventname, callback)

Events

MultiIOLinkSMI_FC.OnNewDataAuto.OnNewDataAuto
Short description
Do not use together with "OnNewData" or "WriteProcessData" blocks! Will automatically setup the CSK_MultiIOLinkSMI and CSK_PowerManager (if it exists) configuration. Might get in conflict with parallel done configurations! Provide IO-Link data.
Callback arguments
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

OnNewData

STRING

1

'CSK_MultiIOLinkSMI.OnNewRawReadMessage_[INSTANCE][PORT][READMESSAGENAME]' Parameter: 1: Data (AUTO) 2: Timestamp (INT)

Sample (auto-generated)
function handleOnNewDataAuto(handle, OnNewData)
  -- Do something
end

Script.register("MultiIOLinkSMI_FC.OnNewDataAuto.OnNewDataAuto", "handleOnNewDataAuto")

MultiIOLinkSMI_FC.WriteProcessData

Short description

First activate ports in IOLinkSMI module and create writeMessage! Set source event of incoming data to use for writeMessage.

Functions

MultiIOLinkSMI_FC.WriteProcessData.create()
Short description

Internally used CSK_FlowConfig create function.

Parameters
Name Type Multiplicity Description

Port

ENUM
MultiIOLinkSMI_FC.IOLinkMasterPorts

1

IO-Link port.

WriteMessageName

STRING

1

Name of writeMessage to write data. IMPORTANT: Please make sure that related writeMessage already exists.

Return values
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

Sample (auto-generated)
handle = MultiIOLinkSMI_FC.WriteProcessData.create(Port, WriteMessageName)
MultiIOLinkSMI_FC.WriteProcessData.writeProcessData()
Short description
First activate ports in IOLinkSMI module and create writeMessage! Set source event of incoming data to use for writeMessage.
Parameters
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

source

STRING

1

Event to get data to use for writeMessage. Parameter: 1: data (STRING)

Sample (auto-generated)
MultiIOLinkSMI_FC.WriteProcessData.writeProcessData(handle, source)

Enumerations

CSK_MultiIOLinkSMI.MessageMode

Mode to create read/writeMessages.

Items
Value Name Description
IODD

IODD

Use IODD data.

NO_IODD

NO_IODD

No IODD usage.