Document metadata

Application name

CSK_Module_Fieldbus

Version

1.0.0

Date

2024-11-12

Author

SICK AG

Crowns

CSK_Fieldbus

Short description

Module to provide fieldbus (Profinet / EtherNet/IP) functionality.
This module is helpful to forward data to/from other modules to communicate to a connected PLC.

Typically the features of this module are used like this (check also main script of this module):

1) Selecte protocol
Select a fieldbus protocol to use via 'setProtocol' and trigger a device reboot to activate the protocol via 'submitProtocol'.
After the reboot open the connection via 'openCommunication'.

2) ControlBits
To read the currently active ControlBits use 'refreshControlBits' and the events 'OnNewStatusControlBitsIn', 'OnNewStatusControlBitsInTable', 'OnNewStatusControlBitsOut', 'OnNewStatusControlBitsOut'.
It is possible to set the ControlBitsIn by presetting them via 'setControlBitsIn'/'setSpecificControlBit' and to send them via 'writeControlBitsInViaUI'.
To set a bitmask for the ControlBitsIn make use of 'setBitMask' or 'setSpecificBitMaskBit'.

3) Data to transmit
It is possible to define the data structure and source of the transmitted data.
To do this preconfigure the data entry via 'setDataNameTransmit', 'setRegisteredEventTransmit', 'setConvertDataTransmit', 'setBigEndianTransmit', 'setDataTypeTransmit' and after that add this data via 'addDataToTransmitViaUI'.
Based on the data received by the configured event (see 'setRegisteredEventTransmit') it will forward this data via fieldbus communication.

4) Data to receive
It is possible to define the data structure of the data to receive from the PLC.
To do this preconfigure the data entry via 'setDataNameReceive', 'setConvertDataReceive', 'setBigEndianReceive', 'setDataTypeReceive' and after that add this data via 'addDataToReceiveViaUI'.
The received data values will be provided via dynamically created events (see 'CSK_Fieldbus.OnNewData_DATANAME') and the full data via event 'CSK_Fieldbus.OnNewStatusReceivedData'.

Overview

Functions

CSK_Fieldbus.addDataToReceiveViaUI()
Short description

Function to add preconfigured data to receive.

Sample (auto-generated)
CSK_Fieldbus.addDataToReceiveViaUI()
CSK_Fieldbus.addDataToTransmitViaUI()
Short description

Function to add preconfigured data to transmit.

Sample (auto-generated)
CSK_Fieldbus.addDataToTransmitViaUI()
CSK_Fieldbus.applyProfinetIOConfig()
Short description

Function apply ProfinetIO configuration.

Sample (auto-generated)
CSK_Fieldbus.applyProfinetIOConfig()
CSK_Fieldbus.closeCommunication()
Short description

Function to close fieldbus communication.

Sample (auto-generated)
CSK_Fieldbus.closeCommunication()
CSK_Fieldbus.dataReceivePositionDown()
Short description

Function to move the position of the selected data to receive about one position lower.

Sample (auto-generated)
CSK_Fieldbus.dataReceivePositionDown()
CSK_Fieldbus.dataReceivePositionUp()
Short description

Function to move the position of the data to receive about one position higher.

Sample (auto-generated)
CSK_Fieldbus.dataReceivePositionUp()
CSK_Fieldbus.dataTransmitPositionDown()
Short description

Function to move the position of the selected transmit data about one position lower.

Sample (auto-generated)
CSK_Fieldbus.dataTransmitPositionDown()
CSK_Fieldbus.dataTransmitPositionUp()
Short description

Function to move the position of the transmit data about one position higher.

Sample (auto-generated)
CSK_Fieldbus.dataTransmitPositionUp()
CSK_Fieldbus.deleteDataToReceiveViaUI()
Short description

Function to delete preselected data entry.

Sample (auto-generated)
CSK_Fieldbus.deleteDataToReceiveViaUI()
CSK_Fieldbus.deleteDataToTransmitViaUI()
Short description

Function to delete preselected data entry.

Sample (auto-generated)
CSK_Fieldbus.deleteDataToTransmitViaUI()
CSK_Fieldbus.getDAPIMConfig()
Short description

Function to get ProfinetIO DAP IM data.

Sample (auto-generated)
CSK_Fieldbus.getDAPIMConfig()
CSK_Fieldbus.getEtherNetIPConfig()
Short description

Function to get EtherNetIP configuration.

Sample (auto-generated)
CSK_Fieldbus.getEtherNetIPConfig()
CSK_Fieldbus.getProfinetIOConfig()
Short description

Function to get ProfinetIO configuration.

Sample (auto-generated)
CSK_Fieldbus.getProfinetIOConfig()
CSK_Fieldbus.loadParameters()
Short description

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

Parameters
Name Type Multiplicity Description

wait

BOOL

?

Set to TRUE if module should wait 1 second before trying to register to events.
Should be used e.g. if other modules first need to provide dynamically created events which are used.

Sample (auto-generated)
CSK_Fieldbus.loadParameters(wait)
CSK_Fieldbus.openCommunication()
Short description

Function to open fieldbus communication.

Return values
Name Type Multiplicity Description

success

BOOL

1

TRUE if communication is opened successfully otherwise FALSE

Sample (auto-generated)
success = CSK_Fieldbus.openCommunication()
CSK_Fieldbus.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_Fieldbus.pageCalled()
CSK_Fieldbus.refreshControlBits()
Short description

Function to refresh data of ControlBitsIn/Out

Sample (auto-generated)
CSK_Fieldbus.refreshControlBits()
CSK_Fieldbus.resetTransmitData()
Short description

Function to reset all data to transmit.

Sample (auto-generated)
CSK_Fieldbus.resetTransmitData()
CSK_Fieldbus.selectDataReceiveViaUI()
Short description

Function to select data entry in UI.

Parameters
Name Type Multiplicity Description

selection

STRING

1

Selection

Sample (auto-generated)
CSK_Fieldbus.selectDataReceiveViaUI(selection)
CSK_Fieldbus.selectDataTransmitViaUI()
Short description

Function to select transmit data entry in UI.

Parameters
Name Type Multiplicity Description

selection

STRING

1

Selection

Sample (auto-generated)
CSK_Fieldbus.selectDataTransmitViaUI(selection)
CSK_Fieldbus.sendParameters()
Short description

Send parameters to CSK_PersistentData module if possible to save them.

Sample (auto-generated)
CSK_Fieldbus.sendParameters()
CSK_Fieldbus.setAddressingMode()
Short description

Function to set addressing mode of EtherNetIP communication.

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_Fieldbus.AddressingMode

1

Mode

Sample (auto-generated)
CSK_Fieldbus.setAddressingMode(mode)
CSK_Fieldbus.setBigEndianReceive()
Short description

Function to preconfigure if received data uses big endianness. Will use little endian per default.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE to use big endianness / FALSE to use litte endianness for data conversion).

Sample (auto-generated)
CSK_Fieldbus.setBigEndianReceive(status)
CSK_Fieldbus.setBigEndianTransmit()
Short description

Function to preconfigure if data to transmit uses big endianness. Will use little endian per default.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE to use big endianness / FALSE to use litte endianness for data conversion).

Sample (auto-generated)
CSK_Fieldbus.setBigEndianTransmit(status)
CSK_Fieldbus.setBitMask()
Short description

Function to preset bitmask to use for preset ControlBitsIn to write.

Parameters
Name Type Multiplicity Description

bitMask

INT

1

Bitmask to use for ControlBitsIn.

Sample (auto-generated)
CSK_Fieldbus.setBitMask(bitMask)
CSK_Fieldbus.setControlBitsIn()
Short description

Function to preset controlBitsIn to write/transmit to PLC.

Parameters
Name Type Multiplicity Description

controlBits

INT

1

Control bits to write.

Sample (auto-generated)
CSK_Fieldbus.setControlBitsIn(controlBits)
CSK_Fieldbus.setConvertDataReceive()
Short description

Function to preconfigure if received data form PLC needs to be converted before transmission.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE if data needs to be converted).

Sample (auto-generated)
CSK_Fieldbus.setConvertDataReceive(status)
CSK_Fieldbus.setConvertDataTransmit()
Short description

Function to preconfigure if internally received data (via event) needs to be converted before transmission.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE if data needs to be converted).

Sample (auto-generated)
CSK_Fieldbus.setConvertDataTransmit(status)
CSK_Fieldbus.setCreateMode()
Short description

Function to set create mode of fieldbus communication.

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_Fieldbus.CreateMode

1

Create mode.

Sample (auto-generated)
CSK_Fieldbus.setCreateMode(mode)
CSK_Fieldbus.setDAPIMConfig()
Short description

Function to set ProfinetIO DAP IM configuration.

Sample (auto-generated)
CSK_Fieldbus.setDAPIMConfig()
CSK_Fieldbus.setDAPIMDescriptor()
Short description

Function to set descriptor for the DAPs I&M3 data.

Parameters
Name Type Multiplicity Description

descriptor

STRING

1

Descriptor to use for this I&M3 data.

Sample (auto-generated)
CSK_Fieldbus.setDAPIMDescriptor(descriptor)
CSK_Fieldbus.setDAPIMInstallationDate()
Short description

Function to set the installation date for the DAPs I&M2 data.

Parameters
Name Type Multiplicity Description

date

STRING

1

String encoding the date and time (optional) in accordance with ISO 8601

Sample (auto-generated)
CSK_Fieldbus.setDAPIMInstallationDate(date)
CSK_Fieldbus.setDAPIMTagFunction()
Short description

Function to set the function tag for the DAPs I&M1 data.

Parameters
Name Type Multiplicity Description

tag

STRING

1

String with 32 visible characters. Will be filled with blanks automatically if shorter.

Sample (auto-generated)
CSK_Fieldbus.setDAPIMTagFunction(tag)
CSK_Fieldbus.setDAPIMTagLocation()
Short description

Function to set location tag for the DAPs I&M1 data.

Parameters
Name Type Multiplicity Description

location

STRING

1

Location tag (check device API reference).

Sample (auto-generated)
CSK_Fieldbus.setDAPIMTagLocation(location)
CSK_Fieldbus.setDataNameReceive()
Short description

Function to preconfigure name of data entry to receive.

Parameters
Name Type Multiplicity Description

name

STRING

1

Name of data as identifier.

Sample (auto-generated)
CSK_Fieldbus.setDataNameReceive(name)
CSK_Fieldbus.setDataNameTransmit()
Short description

Function to preconfigure name of data entry to transmit.

Parameters
Name Type Multiplicity Description

name

STRING

1

Name of data as identifier.

Sample (auto-generated)
CSK_Fieldbus.setDataNameTransmit(name)
CSK_Fieldbus.setDataToTransmit()
Short description

Function to preset data to transmit.

Parameters
Name Type Multiplicity Description

data

BINARY

1

Binary data string.

Sample (auto-generated)
CSK_Fieldbus.setDataToTransmit(data)
CSK_Fieldbus.setDataTypeReceive()
Short description

Function to preconfigure type of data to convert received data.

Parameters
Name Type Multiplicity Description

dataType

ENUM
CSK_Fieldbus.DataTypes

1

Type of data.

Sample (auto-generated)
CSK_Fieldbus.setDataTypeReceive(dataType)
CSK_Fieldbus.setDataTypeTransmit()
Short description

Function to preconfigure type of data to convert data before transmission.

Parameters
Name Type Multiplicity Description

dataType

ENUM
CSK_Fieldbus.DataTypes

1

Type of data.

Sample (auto-generated)
CSK_Fieldbus.setDataTypeTransmit(dataType)
CSK_Fieldbus.setEtherNetIPConfig()
Short description

Function to setup preconfigured EtherNet/IP config.

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPConfig()
CSK_Fieldbus.setEtherNetIPDomainName()
Short description

Function to preset domain name for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

domainName

STRING

1

Domain name.

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPDomainName(domainName)
CSK_Fieldbus.setEtherNetIPGateway()
Short description

Function to preset gateway for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

gateway

STRING

1

Gateway

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPGateway(gateway)
CSK_Fieldbus.setEtherNetIPIP()
Short description

Function to preset IP for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

ip

STRING

1

IP

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPIP(ip)
CSK_Fieldbus.setEtherNetIPNameServer()
Short description

Function to preset primary name server for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

nameServer

STRING

1

Primary name server.

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPNameServer(nameServer)
CSK_Fieldbus.setEtherNetIPNameServer2()
Short description

Function to preset secondary name server for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

nameServer

STRING

1

Secondary name server.

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPNameServer2(nameServer)
CSK_Fieldbus.setEtherNetIPSubnetMask()
Short description

Function to preset subnet mask for EtherNet/IP communication.

Parameters
Name Type Multiplicity Description

netmask

STRING

1

Subnet mask.

Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPSubnetMask(netmask)
CSK_Fieldbus.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

Status

Sample (auto-generated)
CSK_Fieldbus.setLoadOnReboot(status)
CSK_Fieldbus.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_Fieldbus.setParameterName(name)
CSK_Fieldbus.setProfinetIODeviceName()
Short description

Function to preset ProfinetIO device name.

Parameters
Name Type Multiplicity Description

name

STRING

1

Device name.

Sample (auto-generated)
CSK_Fieldbus.setProfinetIODeviceName(name)
CSK_Fieldbus.setProfinetIOGateway()
Short description

Function to preset gateway for ProfinetIO communication.

Parameters
Name Type Multiplicity Description

gateway

STRING

1

Gateway

Sample (auto-generated)
CSK_Fieldbus.setProfinetIOGateway(gateway)
CSK_Fieldbus.setProfinetIOIP()
Short description

Function to preset IP for ProfinetIO communication.

Parameters
Name Type Multiplicity Description

ip

STRING

1

IP

Sample (auto-generated)
CSK_Fieldbus.setProfinetIOIP(ip)
CSK_Fieldbus.setProfinetIOSubnetMask()
Short description

Function to preset subnet mask for ProfinetIO communication.

Parameters
Name Type Multiplicity Description

netmask

STRING

1

Subnet mask.

Sample (auto-generated)
CSK_Fieldbus.setProfinetIOSubnetMask(netmask)
CSK_Fieldbus.setProtocol()
Short description

Function to set fiedlbus protocol to use.

Parameters
Name Type Multiplicity Description

protocol

ENUM
CSK_Fieldbus.Protocol

1

Fieldbus protocol.

Sample (auto-generated)
CSK_Fieldbus.setProtocol(protocol)
CSK_Fieldbus.setRegisteredEventTransmit()
Short description

Function to set event to receive data to transmit via fieldbus for new/selected data entry.

Parameters
Name Type Multiplicity Description

eventName

STRING

1

Name of event providing data.

Sample (auto-generated)
CSK_Fieldbus.setRegisteredEventTransmit(eventName)
CSK_Fieldbus.setSpecificBitMaskBit()
Short description

Function to set specific bit of bitmask (bit range from 0-15).

Parameters
Name Type Multiplicity Description

values

STRING

+

Status + position (e.g. {'true', '15'}).

Sample (auto-generated)
CSK_Fieldbus.setSpecificBitMaskBit(values)
CSK_Fieldbus.setSpecificControlBitIn()
Short description

Function to set specific ControlBitIn (bit range from 0-15).

Parameters
Name Type Multiplicity Description

values

STRING

+

Status+position (e.g. {'true', '15'}).

Sample (auto-generated)
CSK_Fieldbus.setSpecificControlBitIn(values)
CSK_Fieldbus.setTempTransmitData()
Short description

Function to set temporarily data of in UI selected data postion to transmit.

Parameters
Name Type Multiplicity Description

data

STRING

1

Data to set.

Sample (auto-generated)
CSK_Fieldbus.setTempTransmitData(data)
CSK_Fieldbus.setTransmissionMode()
Short description

Function to set transmission mode.

Parameters
Name Type Multiplicity Description

mode

ENUM
CSK_Fieldbus.TransmissionMode

1

Transmission mode.

Sample (auto-generated)
CSK_Fieldbus.setTransmissionMode(mode)
CSK_Fieldbus.storeDAPIMData()
Short description

Function to store ProfinetIO DAP I&M data.

Sample (auto-generated)
CSK_Fieldbus.storeDAPIMData()
CSK_Fieldbus.storeProfinetIOConfig()
Short description

Function to store ProfinetIO configuration.

Sample (auto-generated)
CSK_Fieldbus.storeProfinetIOConfig()
CSK_Fieldbus.submitProtocol()
Short description

Function to set preset fieldbus protocol (see 'setProtocol') and restart device.

Sample (auto-generated)
CSK_Fieldbus.submitProtocol()
CSK_Fieldbus.transmitViaUI()
Short description

Function to transmit preset data (see 'setDataToTransmit').

Sample (auto-generated)
CSK_Fieldbus.transmitViaUI()
CSK_Fieldbus.triggerTempDataViaUI()
Short description

Function to set preconfigured data to in UI selected data position (see 'setTempTransmitData').
After that it will transmit the full data to the fieldbus.

Sample (auto-generated)
CSK_Fieldbus.triggerTempDataViaUI()
CSK_Fieldbus.writeControlBitsInViaUI()
Short description

Function to write preset ControlBitsIn to the PLC.

Sample (auto-generated)
CSK_Fieldbus.writeControlBitsInViaUI()

Events

CSK_Fieldbus.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_Fieldbus.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
CSK_Fieldbus.OnNewData_NAME
Short description

Dynamically created event to provide received data from PLC via event.
NAME will be replaced by data identifier (e.g. 'CSK_Fieldbus.OnNewData_Data1').

Callback arguments
Name Type Multiplicity Description

data

AUTO

?

Received data content.

Sample (auto-generated)
function handleOnNewData_NAME(data)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewData_NAME", "handleOnNewData_NAME")
CSK_Fieldbus.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_Fieldbus.OnNewParameterName", "handleOnNewParameterName")
CSK_Fieldbus.OnNewStatusActiveProtocol
Short description

Notify currently active fieldbus protocol.

Callback arguments
Name Type Multiplicity Description

protocol

STRING

1

Fieldbus protocol.

Sample (auto-generated)
function handleOnNewStatusActiveProtocol(protocol)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusActiveProtocol", "handleOnNewStatusActiveProtocol")
CSK_Fieldbus.OnNewStatusBigEndianReceive
Short description

Notify if big endian should be used to convert received data (otherwise little endian will be used).

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusBigEndianReceive", "handleOnNewStatusBigEndianReceive")
CSK_Fieldbus.OnNewStatusBigEndianTransmit
Short description

Notify if big endian should be used to convert data to transmit (otherwise little endian will be used).

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusBigEndianTransmit", "handleOnNewStatusBigEndianTransmit")
CSK_Fieldbus.OnNewStatusBitMask
Short description

Notify bit mask to use for preset control bits to write.

Callback arguments
Name Type Multiplicity Description

bitMask

INT

1

Bit mask.

Sample (auto-generated)
function handleOnNewStatusBitMask(bitMask)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusBitMask", "handleOnNewStatusBitMask")
CSK_Fieldbus.OnNewStatusControlBitsIn
Short description

Notify current value of the control bits transmitted to the PLC.

Callback arguments
Name Type Multiplicity Description

controlbitsIn

INT

1

ControlBitsIn.

Sample (auto-generated)
function handleOnNewStatusControlBitsIn(controlbitsIn)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusControlBitsIn", "handleOnNewStatusControlBitsIn")
CSK_Fieldbus.OnNewStatusControlBitsInBitMaskTable
Short description

Notify bitmask of control bits IN as boolean table.

Callback arguments
Name Type Multiplicity Description

status

BOOL

+

Status of all bits of the bitmask.

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

Script.register("CSK_Fieldbus.OnNewStatusControlBitsInBitMaskTable", "handleOnNewStatusControlBitsInBitMaskTable")
CSK_Fieldbus.OnNewStatusControlBitsInTable
Short description

Notify control bits IN as boolean table.

Callback arguments
Name Type Multiplicity Description

status

BOOL

+

Status of all bits.

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

Script.register("CSK_Fieldbus.OnNewStatusControlBitsInTable", "handleOnNewStatusControlBitsInTable")
CSK_Fieldbus.OnNewStatusControlBitsInToWrite
Short description

Notify preset ControlBitsIn to write.

Callback arguments
Name Type Multiplicity Description

controlBits

INT

1

ControlBitsIn.

Sample (auto-generated)
function handleOnNewStatusControlBitsInToWrite(controlBits)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusControlBitsInToWrite", "handleOnNewStatusControlBitsInToWrite")
CSK_Fieldbus.OnNewStatusControlBitsOut
Short description

Notify latest ControlBitsOut received from the PLC.

Callback arguments
Name Type Multiplicity Description

controlBits

INT

1

ControlBitsOut.

Sample (auto-generated)
function handleOnNewStatusControlBitsOut(controlBits)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusControlBitsOut", "handleOnNewStatusControlBitsOut")
CSK_Fieldbus.OnNewStatusControlBitsOutTable
Short description

Notify ControlBitsOut as boolean table.

Callback arguments
Name Type Multiplicity Description

status

BOOL

+

Status of ControlBitsOut .

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

Script.register("CSK_Fieldbus.OnNewStatusControlBitsOutTable", "handleOnNewStatusControlBitsOutTable")
CSK_Fieldbus.OnNewStatusConvertDataReceive
Short description

Notify preconfigured status if data needs to be converted to binary after receiving.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE if data needs to be converted)

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

Script.register("CSK_Fieldbus.OnNewStatusConvertDataReceive", "handleOnNewStatusConvertDataReceive")
CSK_Fieldbus.OnNewStatusConvertDataTransmit
Short description

Notify preconfigured status if data needs to be converted to binary before transmission.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status (TRUE if data needs to be converted)

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

Script.register("CSK_Fieldbus.OnNewStatusConvertDataTransmit", "handleOnNewStatusConvertDataTransmit")
CSK_Fieldbus.OnNewStatusCreateMode
Short description

Notify fieldbus create mode.

Callback arguments
Name Type Multiplicity Description

mode

STRING

1

Create mode.

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

Script.register("CSK_Fieldbus.OnNewStatusCreateMode", "handleOnNewStatusCreateMode")
CSK_Fieldbus.OnNewStatusDAPIMDescriptor
Short description

Notify descriptor as used for the ProfinetIO DAP’s I&M3 data.

Callback arguments
Name Type Multiplicity Description

descriptor

STRING

1

Descriptor

Sample (auto-generated)
function handleOnNewStatusDAPIMDescriptor(descriptor)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMDescriptor", "handleOnNewStatusDAPIMDescriptor")
CSK_Fieldbus.OnNewStatusDAPIMHardwareRev
Short description

Notify hardware revision as used for the DAP used in the I&M0 data.

Callback arguments
Name Type Multiplicity Description

hardwareRev

INT

1

Hardware revision.

Sample (auto-generated)
function handleOnNewStatusDAPIMHardwareRev(hardwareRev)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMHardwareRev", "handleOnNewStatusDAPIMHardwareRev")
CSK_Fieldbus.OnNewStatusDAPIMInstallationDate
Short description

Notify installation date as used for the DAP’s I&M2 data.

Callback arguments
Name Type Multiplicity Description

date

STRING

1

Installation date.

Sample (auto-generated)
function handleOnNewStatusDAPIMInstallationDate(date)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMInstallationDate", "handleOnNewStatusDAPIMInstallationDate")
CSK_Fieldbus.OnNewStatusDAPIMSoftwareRev
Short description

Notify software revision for the DAP (device access point) used in the I&M0 data.

Callback arguments
Name Type Multiplicity Description

softwareRev

STRING

1

Software revision.

Sample (auto-generated)
function handleOnNewStatusDAPIMSoftwareRev(softwareRev)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMSoftwareRev", "handleOnNewStatusDAPIMSoftwareRev")
CSK_Fieldbus.OnNewStatusDAPIMTagFunction
Short description

Notify function tag as used for the DAP’s I&M1 data.

Callback arguments
Name Type Multiplicity Description

tagFunction

STRING

1

Function tag.

Sample (auto-generated)
function handleOnNewStatusDAPIMTagFunction(tagFunction)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMTagFunction", "handleOnNewStatusDAPIMTagFunction")
CSK_Fieldbus.OnNewStatusDAPIMTagLocation
Short description

Notify location tag as used for the DAP’s I&M1 data.

Callback arguments
Name Type Multiplicity Description

tagLocation

STRING

1

Location tag.

Sample (auto-generated)
function handleOnNewStatusDAPIMTagLocation(tagLocation)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDAPIMTagLocation", "handleOnNewStatusDAPIMTagLocation")
CSK_Fieldbus.OnNewStatusDataNameReceive
Short description

Notify name of preconfigured data to receive.

Callback arguments
Name Type Multiplicity Description

name

STRING

1

Data name as identifier.

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

Script.register("CSK_Fieldbus.OnNewStatusDataNameReceive", "handleOnNewStatusDataNameReceive")
CSK_Fieldbus.OnNewStatusDataNameTransmit
Short description

Notify name of preconfigured transmit data.

Callback arguments
Name Type Multiplicity Description

name

STRING

1

Data name as identifier.

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

Script.register("CSK_Fieldbus.OnNewStatusDataNameTransmit", "handleOnNewStatusDataNameTransmit")
CSK_Fieldbus.OnNewStatusDataReceivingList
Short description

Notify list of data entires to use for data receiving.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List of data entries.

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

Script.register("CSK_Fieldbus.OnNewStatusDataReceivingList", "handleOnNewStatusDataReceivingList")
CSK_Fieldbus.OnNewStatusDataToTransmit
Short description

Notify preset data to be transmitted.

Callback arguments
Name Type Multiplicity Description

data

STRING

1

Data to transmit.

Sample (auto-generated)
function handleOnNewStatusDataToTransmit(data)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDataToTransmit", "handleOnNewStatusDataToTransmit")
CSK_Fieldbus.OnNewStatusDataTransmissionList
Short description

Notify list of data entires to use for data transmission.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List of data entries.

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

Script.register("CSK_Fieldbus.OnNewStatusDataTransmissionList", "handleOnNewStatusDataTransmissionList")
CSK_Fieldbus.OnNewStatusDataTypeReceive
Short description

Notify preconfigured data type of data to receive.

Callback arguments
Name Type Multiplicity Description

dataType

STRING

1

Data type

Sample (auto-generated)
function handleOnNewStatusDataTypeReceive(dataType)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDataTypeReceive", "handleOnNewStatusDataTypeReceive")
CSK_Fieldbus.OnNewStatusDataTypeTransmit
Short description

Notify preconfigured data type of data to transmit.

Callback arguments
Name Type Multiplicity Description

dataType

STRING

1

Data type

Sample (auto-generated)
function handleOnNewStatusDataTypeTransmit(dataType)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusDataTypeTransmit", "handleOnNewStatusDataTypeTransmit")
CSK_Fieldbus.OnNewStatusEtherNetIPAddressingMode
Short description

Notify addressing mode for EtherNet/IP IP assignment.

Callback arguments
Name Type Multiplicity Description

mode

STRING

1

Mode

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

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPAddressingMode", "handleOnNewStatusEtherNetIPAddressingMode")
CSK_Fieldbus.OnNewStatusEtherNetIPDomainName
Short description

Notfify domain name of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

domainName

STRING

1

Domain name.

Sample (auto-generated)
function handleOnNewStatusEtherNetIPDomainName(domainName)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPDomainName", "handleOnNewStatusEtherNetIPDomainName")
CSK_Fieldbus.OnNewStatusEtherNetIPGateway
Short description

Notfify gateway of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

gateway

STRING

1

Gateway

Sample (auto-generated)
function handleOnNewStatusEtherNetIPGateway(gateway)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPGateway", "handleOnNewStatusEtherNetIPGateway")
CSK_Fieldbus.OnNewStatusEtherNetIPIPAddress
Short description

Notify IP address of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

ip

STRING

1

IP

Sample (auto-generated)
function handleOnNewStatusEtherNetIPIPAddress(ip)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPIPAddress", "handleOnNewStatusEtherNetIPIPAddress")
CSK_Fieldbus.OnNewStatusEtherNetIPMACAddress
Short description

Notfify MAC address of specified interface of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

macAddress

STRING

1

MAC address of specified interface.

Sample (auto-generated)
function handleOnNewStatusEtherNetIPMACAddress(macAddress)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPMACAddress", "handleOnNewStatusEtherNetIPMACAddress")
CSK_Fieldbus.OnNewStatusEtherNetIPNameServer
Short description

Notfify primary name server of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

nameserver

STRING

1

Name server

Sample (auto-generated)
function handleOnNewStatusEtherNetIPNameServer(nameserver)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPNameServer", "handleOnNewStatusEtherNetIPNameServer")
CSK_Fieldbus.OnNewStatusEtherNetIPNameServer2
Short description

Notfify secondary name server of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

nameServer

STRING

1

Secondary Name server.

Sample (auto-generated)
function handleOnNewStatusEtherNetIPNameServer2(nameServer)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPNameServer2", "handleOnNewStatusEtherNetIPNameServer2")
CSK_Fieldbus.OnNewStatusEtherNetIPSubnetMask
Short description

Notfify subnet mask of EtherNet/IP network.

Callback arguments
Name Type Multiplicity Description

subnet

STRING

1

Subnet mask.

Sample (auto-generated)
function handleOnNewStatusEtherNetIPSubnetMask(subnet)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusEtherNetIPSubnetMask", "handleOnNewStatusEtherNetIPSubnetMask")
CSK_Fieldbus.OnNewStatusExplicitModeActive
Short description

Notify if explicit mode is selected.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusExplicitModeActive", "handleOnNewStatusExplicitModeActive")
CSK_Fieldbus.OnNewStatusFieldbusActive
Short description

Notify if fieldbus communication is currently 'OPENED' or 'ONLINE'.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusFieldbusActive", "handleOnNewStatusFieldbusActive")
CSK_Fieldbus.OnNewStatusFieldbusFeatureActive
Short description

Notify if Fieldbus features should be used.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusFieldbusFeatureActive", "handleOnNewStatusFieldbusFeatureActive")
CSK_Fieldbus.OnNewStatusFieldbusInfo
Short description

Notify info of fieldbus communication.

Callback arguments
Name Type Multiplicity Description

fieldbusInfo

STRING

1

Fieldbus Info.

Sample (auto-generated)
function handleOnNewStatusFieldbusInfo(fieldbusInfo)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusFieldbusInfo", "handleOnNewStatusFieldbusInfo")
CSK_Fieldbus.OnNewStatusFieldbusStatus
Short description

Notify status of the fieldbus communication.

Callback arguments
Name Type Multiplicity Description

status

STRING

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusFieldbusStatus", "handleOnNewStatusFieldbusStatus")
CSK_Fieldbus.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_Fieldbus.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
CSK_Fieldbus.OnNewStatusLogMessage
Short description

Notify fieldbus relevant log message.

Callback arguments
Name Type Multiplicity Description

message

STRING

1

Message

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

Script.register("CSK_Fieldbus.OnNewStatusLogMessage", "handleOnNewStatusLogMessage")
CSK_Fieldbus.OnNewStatusProfinetIODeviceName
Short description

Notify name of the device in the Profinet network.

Callback arguments
Name Type Multiplicity Description

mode

STRING

1

Mode

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

Script.register("CSK_Fieldbus.OnNewStatusProfinetIODeviceName", "handleOnNewStatusProfinetIODeviceName")
CSK_Fieldbus.OnNewStatusProfinetIOGateway
Short description

Notfify gateway of ProfinetIO network.

Callback arguments
Name Type Multiplicity Description

gateway

STRING

1

Gateway

Sample (auto-generated)
function handleOnNewStatusProfinetIOGateway(gateway)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusProfinetIOGateway", "handleOnNewStatusProfinetIOGateway")
CSK_Fieldbus.OnNewStatusProfinetIOIPAddress
Short description

Notify IP address of ProfinetIO network.

Callback arguments
Name Type Multiplicity Description

ip

STRING

1

IP

Sample (auto-generated)
function handleOnNewStatusProfinetIOIPAddress(ip)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusProfinetIOIPAddress", "handleOnNewStatusProfinetIOIPAddress")
CSK_Fieldbus.OnNewStatusProfinetIOMACAddress
Short description

Notfify MAC address of specified interface of ProfinetIO network.

Callback arguments
Name Type Multiplicity Description

macAddress

STRING

1

MAC address of specified interface.

Sample (auto-generated)
function handleOnNewStatusProfinetIOMACAddress(macAddress)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusProfinetIOMACAddress", "handleOnNewStatusProfinetIOMACAddress")
CSK_Fieldbus.OnNewStatusProfinetIORemanent
Short description

Notfify if the ProfinetIO network configuration tool set the IP address settings permanently.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

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

Script.register("CSK_Fieldbus.OnNewStatusProfinetIORemanent", "handleOnNewStatusProfinetIORemanent")
CSK_Fieldbus.OnNewStatusProfinetIOSubnetMask
Short description

Notfify subnet mask of ProfinetIO network.

Callback arguments
Name Type Multiplicity Description

subnet

STRING

1

Subnet mask.

Sample (auto-generated)
function handleOnNewStatusProfinetIOSubnetMask(subnet)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusProfinetIOSubnetMask", "handleOnNewStatusProfinetIOSubnetMask")
CSK_Fieldbus.OnNewStatusProtocol
Short description

Notify current selected fieldbus protocol.

Callback arguments
Name Type Multiplicity Description

protocol

STRING

1

Fieldbus protocol.

Sample (auto-generated)
function handleOnNewStatusProtocol(protocol)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusProtocol", "handleOnNewStatusProtocol")
CSK_Fieldbus.OnNewStatusReceivedData
Short description

Notfiy received data.

Callback arguments
Name Type Multiplicity Description

data

BINARY

1

Received binary data.

Sample (auto-generated)
function handleOnNewStatusReceivedData(data)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusReceivedData", "handleOnNewStatusReceivedData")
CSK_Fieldbus.OnNewStatusRegisteredEventTransmit
Short description

Notify name of event to receive data to transmit.

Callback arguments
Name Type Multiplicity Description

eventName

STRING

1

Name of event.

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

Script.register("CSK_Fieldbus.OnNewStatusRegisteredEventTransmit", "handleOnNewStatusRegisteredEventTransmit")
CSK_Fieldbus.OnNewStatusRestartInfo
Short description

Notify info text to restart device.

Callback arguments
Name Type Multiplicity Description

msg

STRING

1

Info message.

Sample (auto-generated)
function handleOnNewStatusRestartInfo(msg)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusRestartInfo", "handleOnNewStatusRestartInfo")
CSK_Fieldbus.OnNewStatusTempDataTransmit
Short description

Notify temporarily set data to transmit on selected data position.

Callback arguments
Name Type Multiplicity Description

value

STRING

1

Data value.

Sample (auto-generated)
function handleOnNewStatusTempDataTransmit(value)
  -- Do something
end

Script.register("CSK_Fieldbus.OnNewStatusTempDataTransmit", "handleOnNewStatusTempDataTransmit")
CSK_Fieldbus.OnNewStatusTransmissionMode
Short description

Notify fieldbus transmission mode.

Callback arguments
Name Type Multiplicity Description

mode

STRING

1

Transmission mode.

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

Script.register("CSK_Fieldbus.OnNewStatusTransmissionMode", "handleOnNewStatusTransmissionMode")
CSK_Fieldbus.OnPersistentDataModuleAvailable
Short description

Notify status if features of CSK_PersistendData 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_Fieldbus.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
CSK_Fieldbus.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_Fieldbus.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
CSK_Fieldbus.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_Fieldbus.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
CSK_Fieldbus.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_Fieldbus.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
CSK_Fieldbus.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_Fieldbus.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")

CSK_Module_Fieldbus

Short description

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

Enumerations

CSK_Fieldbus.AddressingMode

Addressing mode for the IP address assignment.

Items
Value Name Description
DHCP

DHCP

Get IP-address via DHCP.

BOOTP

BOOTP

Get IP-address via BOOTP.

STATIC

STATIC

Statically set the IP-address.

CSK_Fieldbus.CreateMode

Mode for calling Fieldbus 'create' function.

Items
Value Name Description
EXPLICIT_OPEN

EXPLICIT_OPEN

Only create the handle, but do not automatically open communication. Communication must be started explicitly using the function 'open'.

AUTOMATIC_OPEN

AUTOMATIC_OPEN

Create the handle and automatically open the communication.

CSK_Fieldbus.DataTypes

Types of data to transmit

Items
Value Name Description
S_INT2

S_INT2

Signed INT (2 bytes)

S_BYTE

S_BYTE

Signed byte (1 byte)

U_INT2

U_INT2

Unsigned INT (2 bytes)

U_BYTE

U_BYTE

Unsinged byte (1 byte)

S_SHORT

S_SHORT

Signed short (2 byte)

U_SHORT

U_SHORT

Unsigned short (2 bytes)

U_INT1

U_INT1

Unsigned INT (1 byte)

U_INT8

U_INT8

Unsigned INT (8 bytes)

U_INT4

U_INT4

Unsigned INT (4 bytes)

S_INT1

S_INT1

Signed INT (1 byte)

S_INT4

S_INT4

Signed INT (4 bytes)

U_LONG

U_LONG

Unsigned long (4 bytes)

S_INT8

S_INT8

Signed INT (8 bytes)

DOUBLE

DOUBLE

Double (8 bytes)

FLOAT

FLOAT

Float (4 bytes)

S_LONG

S_LONG

Signed long (4 bytes)

CHAR

CHAR

1 ASCII sign (1 byte)

CSK_Fieldbus.Protocol

Fieldbus protocol.

Items
Value Name Description
PROFINET

PROFINET

PROFINET

EtherNet_IP

EtherNet_IP

EtherNet/IP

EtherCAT

EtherCAT

EtherCAT

CSK_Fieldbus.TransmissionMode

Fieldbus TransmissionMode

Items
Value Name Description
RAW

RAW

Transmission mode without any protocol.

CONFIRMED_MESSAGING

CONFIRMED_MESSAGING

Transmission mode using the SICK Confirmed Messaging protocol to transfer and fragment process data.