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
addDataToReceiveViaUI()
Short description
Function to add preconfigured data to receive.
Sample (auto-generated)
CSK_Fieldbus.addDataToReceiveViaUI()
addDataToTransmitViaUI()
Short description
Function to add preconfigured data to transmit.
Sample (auto-generated)
CSK_Fieldbus.addDataToTransmitViaUI()
applyProfinetIOConfig()
Short description
Function apply ProfinetIO configuration.
Sample (auto-generated)
CSK_Fieldbus.applyProfinetIOConfig()
closeCommunication()
Short description
Function to close fieldbus communication.
Sample (auto-generated)
CSK_Fieldbus.closeCommunication()
dataReceivePositionDown()
Short description
Function to move the position of the selected data to receive about one position lower.
Sample (auto-generated)
CSK_Fieldbus.dataReceivePositionDown()
dataReceivePositionUp()
Short description
Function to move the position of the data to receive about one position higher.
Sample (auto-generated)
CSK_Fieldbus.dataReceivePositionUp()
dataTransmitPositionDown()
Short description
Function to move the position of the selected transmit data about one position lower.
Sample (auto-generated)
CSK_Fieldbus.dataTransmitPositionDown()
dataTransmitPositionUp()
Short description
Function to move the position of the transmit data about one position higher.
Sample (auto-generated)
CSK_Fieldbus.dataTransmitPositionUp()
deleteDataToReceiveViaUI()
Short description
Function to delete preselected data entry.
Sample (auto-generated)
CSK_Fieldbus.deleteDataToReceiveViaUI()
deleteDataToTransmitViaUI()
Short description
Function to delete preselected data entry.
Sample (auto-generated)
CSK_Fieldbus.deleteDataToTransmitViaUI()
getDAPIMConfig()
Short description
Function to get ProfinetIO DAP IM data.
Sample (auto-generated)
CSK_Fieldbus.getDAPIMConfig()
getEtherNetIPConfig()
Short description
Function to get EtherNetIP configuration.
Sample (auto-generated)
CSK_Fieldbus.getEtherNetIPConfig()
getProfinetIOConfig()
Short description
Function to get ProfinetIO configuration.
Sample (auto-generated)
CSK_Fieldbus.getProfinetIOConfig()
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. |
Sample (auto-generated)
CSK_Fieldbus.loadParameters(wait)
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()
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()
refreshControlBits()
Short description
Function to refresh data of ControlBitsIn/Out
Sample (auto-generated)
CSK_Fieldbus.refreshControlBits()
resetTransmitData()
Short description
Function to reset all data to transmit.
Sample (auto-generated)
CSK_Fieldbus.resetTransmitData()
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)
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)
sendParameters()
Short description
Send parameters to CSK_PersistentData module if possible to save them.
Sample (auto-generated)
CSK_Fieldbus.sendParameters()
setAddressingMode()
Short description
Function to set addressing mode of EtherNetIP communication.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
1 |
Mode |
Sample (auto-generated)
CSK_Fieldbus.setAddressingMode(mode)
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)
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)
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)
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)
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)
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)
setCreateMode()
Short description
Function to set create mode of fieldbus communication.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
1 |
Create mode. |
Sample (auto-generated)
CSK_Fieldbus.setCreateMode(mode)
setDAPIMConfig()
Short description
Function to set ProfinetIO DAP IM configuration.
Sample (auto-generated)
CSK_Fieldbus.setDAPIMConfig()
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)
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)
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)
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)
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)
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)
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)
setDataTypeReceive()
Short description
Function to preconfigure type of data to convert received data.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
dataType |
1 |
Type of data. |
Sample (auto-generated)
CSK_Fieldbus.setDataTypeReceive(dataType)
setDataTypeTransmit()
Short description
Function to preconfigure type of data to convert data before transmission.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
dataType |
1 |
Type of data. |
Sample (auto-generated)
CSK_Fieldbus.setDataTypeTransmit(dataType)
setEtherNetIPConfig()
Short description
Function to setup preconfigured EtherNet/IP config.
Sample (auto-generated)
CSK_Fieldbus.setEtherNetIPConfig()
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
setProtocol()
Short description
Function to set fiedlbus protocol to use.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
protocol |
1 |
Fieldbus protocol. |
Sample (auto-generated)
CSK_Fieldbus.setProtocol(protocol)
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)
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)
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)
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)
setTransmissionMode()
Short description
Function to set transmission mode.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
1 |
Transmission mode. |
Sample (auto-generated)
CSK_Fieldbus.setTransmissionMode(mode)
storeDAPIMData()
Short description
Function to store ProfinetIO DAP I&M data.
Sample (auto-generated)
CSK_Fieldbus.storeDAPIMData()
storeProfinetIOConfig()
Short description
Function to store ProfinetIO configuration.
Sample (auto-generated)
CSK_Fieldbus.storeProfinetIOConfig()
submitProtocol()
Short description
Function to set preset fieldbus protocol (see 'setProtocol') and restart device.
Sample (auto-generated)
CSK_Fieldbus.submitProtocol()
transmitViaUI()
Short description
Function to transmit preset data (see 'setDataToTransmit').
Sample (auto-generated)
CSK_Fieldbus.transmitViaUI()
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()
writeControlBitsInViaUI()
Short description
Function to write preset ControlBitsIn to the PLC.
Sample (auto-generated)
CSK_Fieldbus.writeControlBitsInViaUI()
Events
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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
- C
CSK_Fieldbus.AddressingMode
Addressing mode for the IP address assignment.
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.
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
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.
Value | Name | Description |
---|---|---|
PROFINET |
PROFINET |
PROFINET |
EtherNet_IP |
EtherNet_IP |
EtherNet/IP |
EtherCAT |
EtherCAT |
EtherCAT |
CSK_Fieldbus.TransmissionMode
Fieldbus TransmissionMode
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. |