Document metadata
Application name |
CSK_Module_Encoder |
|---|---|
Version |
1.0.0 |
Date |
2025-03-14 |
Author |
SICK AG |
Crowns
CSK_Encoder
Short description
Module to configure encoder / conveyor setup (realized in dynamical created cFlow) and to provide / forward encoder / conveyor data.
INFO : Compatible with CSK_DigitalIOManager module version >= 3.7.0 (if using DigitalIn port as encoder interface).
Typically the features of this module are used like this (check also main script of this module):
1) Setup
Select encoder interface where the encoder is connected to the device (setEncoderInterface).
Select encoder source to be used (setEncoderSource).
Select decoder instance to be used (setDecoderInstance).
Optionally configure decoder setup (setDecoder…).
Optionally activate conveyor feature and setup (setConveyor…).
Activate encoder feature (setEncoderFeatureActive).
2) Pulling encoder / conveyor data periodically
It is possible to configure a timer to periodically pull encoder / conveyor data.
Set the cycle time via setTimerCycle and activate it via setTimerActive.
If activated it will pull now the encoder / conveyor data and provide it via the OnNewIncrementInfo / OnNewConveyorInfo events.
3) Use ConveyorTimeout
It is possible to configure a ConveyorTimeout to receive an event if the conveyor moved for a defined amount of ticks or a distance.
To use it you need to configure the mode (setConveyorTimeoutMode) and value (setConveyorTimeoutValue) and activate it via setConveyorTimeoutActive.
It will then trigger the OnConveyorTimeout event if the timeout was reached and will restart the ConveyorTimeout.
4) Access from other applications
You can make use of the mentioned features / events from other apps or you can directy get the handles of the decoder or conveyor via 'getEncoderHandle' / 'getConveyorTimeoutHandle' to use their functions directly wihtin your app.
Overview
Functions
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_Encoder.clearFlowConfigRelevantConfiguration()
getConveyorTimeoutHandle()
Short description
Function to get Conveyor.Timeout handle.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle |
Sample (auto-generated)
handle = CSK_Encoder.getConveyorTimeoutHandle()
getEncoderHandle()
Short description
Function to provide the encoder handle.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle of encoder. |
Sample (auto-generated)
handle = CSK_Encoder.getEncoderHandle()
getParameters()
Short description
Function to get all parameters of the client in JSON format.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
jsonParameters |
STRING |
1 |
JSON string with all parameters. |
Sample (auto-generated)
jsonParameters = CSK_Encoder.getParameters()
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_Encoder.getStatusModuleActive()
loadParameters()
Short description
Load parameters for this module from the CSK_PersistentData module if possible and use them.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
success |
BOOL |
1 |
Success to load parameters. |
Sample (auto-generated)
CSK_Encoder.loadParameters(success)
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_Encoder.pageCalled()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_Encoder.resetModule()
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_Encoder.sendParameters(noDataSave)
setConveyorActive()
Short description
Function to set if conveyor features should be active.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setConveyorActive(status)
setConveyorPrescaler()
Short description
Function to set the prescaler value for the increment input. If greater than 1 all increment values are scaled with this factor. This can be used if the incoming values need a higher resolution than the increment should have.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
prescaler |
INT |
1 |
Prescaler (Default is 1. Needs to be greater than zero.) |
Sample (auto-generated)
CSK_Encoder.setConveyorPrescaler(prescaler)
setConveyorResolution()
Short description
Function to set the resolution value of the conveyor.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
resolution |
INT |
1 |
Resolution in micrometer/increment. |
Sample (auto-generated)
CSK_Encoder.setConveyorResolution(resolution)
setConveyorSource()
Short description
Function to set increment source for conveyor.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
source |
STRING |
1 |
Source |
Sample (auto-generated)
CSK_Encoder.setConveyorSource(source)
setConveyorTimeoutActive()
Short description
Function to set status of conveyor timeout.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setConveyorTimeoutActive(status)
setConveyorTimeoutMode()
Short description
Function to set mode of conveyor timeout.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
1 |
Mode |
Sample (auto-generated)
CSK_Encoder.setConveyorTimeoutMode(mode)
setConveyorTimeoutValue()
Short description
Function to set value for conveyor timeout.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
value |
INT |
1 |
Value (depends on conveyor timeout mode to use TICKS or DISTANCE). |
Sample (auto-generated)
CSK_Encoder.setConveyorTimeoutValue(value)
setDecoderCountMode()
Short description
Function to set count mode of decoder.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
1 |
Count mode. |
Sample (auto-generated)
CSK_Encoder.setDecoderCountMode(mode)
setDecoderHighResoltuion()
Short description
Function to set status of decoder high resolution mode.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setDecoderHighResoltuion(status)
setDecoderInstance()
Short description
Function to set decoder instance.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
instance |
STRING |
1 |
Decoder instance. |
Sample (auto-generated)
CSK_Encoder.setDecoderInstance(instance)
setDecoderNumberOfPhases()
Short description
Function to set number of decoder phases.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
phases |
1 |
Phases |
Sample (auto-generated)
CSK_Encoder.setDecoderNumberOfPhases(phases)
setDecoderPrescaler()
Short description
Function to set decoder prescaler.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
prescaler |
INT |
1 |
Prescaler |
Sample (auto-generated)
CSK_Encoder.setDecoderPrescaler(prescaler)
setEncoderFeatureActive()
Short description
Function to set status if encoder features are active.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setEncoderFeatureActive(status)
setEncoderInterface()
Short description
Function to set the interface the encoder is connected to.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
CSK_Encoder.setEncoderInterface(interface)
setEncoderSource()
Short description
Function to set encoder increment source.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
source |
STRING |
1 |
Source |
Sample (auto-generated)
CSK_Encoder.setEncoderSource(source)
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_Encoder.setFlowConfigPriority(status)
setForwardActive()
Short description
Function to set status if received encoder data should be forwarded on another interface.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setForwardActive(status)
setForwardInterface()
Short description
Function to set interface to forward received encoder data.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
CSK_Encoder.setForwardInterface(interface)
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_Encoder.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_Encoder.setParameterName(name)
setTimerActive()
Short description
Function to set status of timer to pull increment value periodically.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_Encoder.setTimerActive(status)
setTimerCycle()
Short description
Function to set cycte time to pull increment data.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
time |
INT |
1 |
Time in [ms]. |
Sample (auto-generated)
CSK_Encoder.setTimerCycle(time)
Events
OnConveyorTimeout
Short description
Notify if conveyor timeout expired.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
timestamp |
INT |
1 |
Timestamp |
Sample (auto-generated)
function handleOnConveyorTimeout(timestamp)
-- Do something
end
Script.register("CSK_Encoder.OnConveyorTimeout", "handleOnConveyorTimeout")
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_Encoder.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
OnNewConveyorInfo
Short description
Notify current conveyor info data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
conveyorInfo |
STRING |
1 |
Current conveyor info data. |
Sample (auto-generated)
function handleOnNewConveyorInfo(conveyorInfo)
-- Do something
end
Script.register("CSK_Encoder.OnNewConveyorInfo", "handleOnNewConveyorInfo")
OnNewConveyorSourceList
Short description
Notify list of available conveyor sources.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List |
Sample (auto-generated)
function handleOnNewConveyorSourceList(list)
-- Do something
end
Script.register("CSK_Encoder.OnNewConveyorSourceList", "handleOnNewConveyorSourceList")
OnNewDecoderInstanceList
Short description
Notify available decoder instances.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List of available decoder instances. |
Sample (auto-generated)
function handleOnNewDecoderInstanceList(list)
-- Do something
end
Script.register("CSK_Encoder.OnNewDecoderInstanceList", "handleOnNewDecoderInstanceList")
OnNewEncoderIncrementSourceList
Short description
Notify list of available encoder increment sources.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List |
Sample (auto-generated)
function handleOnNewEncoderIncrementSourceList(list)
-- Do something
end
Script.register("CSK_Encoder.OnNewEncoderIncrementSourceList", "handleOnNewEncoderIncrementSourceList")
OnNewEncoderInterfaceList
Short description
Notify list of available interfaces to connect the encoder.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List |
Sample (auto-generated)
function handleOnNewEncoderInterfaceList(list)
-- Do something
end
Script.register("CSK_Encoder.OnNewEncoderInterfaceList", "handleOnNewEncoderInterfaceList")
OnNewForwardInterfaceList
Short description
Notify list of interfaces to forward encoder data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List of interfaces. |
Sample (auto-generated)
function handleOnNewForwardInterfaceList(list)
-- Do something
end
Script.register("CSK_Encoder.OnNewForwardInterfaceList", "handleOnNewForwardInterfaceList")
OnNewIncrementInfo
Short description
Notify current increment info data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
incrementInfo |
STRING |
1 |
Current increment info data. |
Sample (auto-generated)
function handleOnNewIncrementInfo(incrementInfo)
-- Do something
end
Script.register("CSK_Encoder.OnNewIncrementInfo", "handleOnNewIncrementInfo")
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_Encoder.OnNewParameterName", "handleOnNewParameterName")
OnNewStatusConveyorActive
Short description
Notify if conveyor features are active.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusConveyorActive(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorActive", "handleOnNewStatusConveyorActive")
OnNewStatusConveyorPrescaler
Short description
Notify prescaler of conveyor.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
prescaler |
INT |
1 |
Prescaler |
Sample (auto-generated)
function handleOnNewStatusConveyorPrescaler(prescaler)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorPrescaler", "handleOnNewStatusConveyorPrescaler")
OnNewStatusConveyorResolution
Short description
Notify resolution of conveyor.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
resolution |
INT |
1 |
Resolution in mircromenter/increment. |
Sample (auto-generated)
function handleOnNewStatusConveyorResolution(resolution)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorResolution", "handleOnNewStatusConveyorResolution")
OnNewStatusConveyorSource
Short description
Notify source for conveyor.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
source |
STRING |
1 |
Source |
Sample (auto-generated)
function handleOnNewStatusConveyorSource(source)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorSource", "handleOnNewStatusConveyorSource")
OnNewStatusConveyorTimeoutActive
Short description
Notify if conveyor timeout should be used.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusConveyorTimeoutActive(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorTimeoutActive", "handleOnNewStatusConveyorTimeoutActive")
OnNewStatusConveyorTimeoutMode
Short description
Notify mode of conveyor timeout.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
STRING |
1 |
Mode (TICKS or DISTANCE). |
Sample (auto-generated)
function handleOnNewStatusConveyorTimeoutMode(mode)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorTimeoutMode", "handleOnNewStatusConveyorTimeoutMode")
OnNewStatusConveyorTimeoutValue
Short description
Notify value of conveyor timeout .
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
timeoutValue |
INT |
1 |
Value of timeout (can be mm or ticks). |
Sample (auto-generated)
function handleOnNewStatusConveyorTimeoutValue(timeoutValue)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusConveyorTimeoutValue", "handleOnNewStatusConveyorTimeoutValue")
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_Encoder.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
OnNewStatusDecoderCountMode
Short description
Notify the current status of the decoder count mode.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
STRING |
1 |
Mode (see Encoder.Decoder.DecoderCountMode). |
Sample (auto-generated)
function handleOnNewStatusDecoderCountMode(mode)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusDecoderCountMode", "handleOnNewStatusDecoderCountMode")
OnNewStatusDecoderHighResolution
Short description
Notify status of decoder high resolution.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusDecoderHighResolution(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusDecoderHighResolution", "handleOnNewStatusDecoderHighResolution")
OnNewStatusDecoderInstance
Short description
Notify instance of decoder.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
instance |
STRING |
1 |
Instance of decoder. |
Sample (auto-generated)
function handleOnNewStatusDecoderInstance(instance)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusDecoderInstance", "handleOnNewStatusDecoderInstance")
OnNewStatusDecoderNumberOfPhases
Short description
Notify decoder number of phases.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
decoderPhases |
STRING |
1 |
Phases of decoder (see DecoderPhases). |
Sample (auto-generated)
function handleOnNewStatusDecoderNumberOfPhases(decoderPhases)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusDecoderNumberOfPhases", "handleOnNewStatusDecoderNumberOfPhases")
OnNewStatusDecoderPrescaler
Short description
Notify decoder prescaler.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
prescaler |
INT |
1 |
Prescaler |
Sample (auto-generated)
function handleOnNewStatusDecoderPrescaler(prescaler)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusDecoderPrescaler", "handleOnNewStatusDecoderPrescaler")
OnNewStatusEncoderFeatureActive
Short description
Notify if encoder features are active.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusEncoderFeatureActive(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusEncoderFeatureActive", "handleOnNewStatusEncoderFeatureActive")
OnNewStatusEncoderInterface
Short description
Notify selected interface to connect the encoder.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
function handleOnNewStatusEncoderInterface(interface)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusEncoderInterface", "handleOnNewStatusEncoderInterface")
OnNewStatusEncoderSource
Short description
Notify selected source for encoder.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
source |
STRING |
1 |
Source |
Sample (auto-generated)
function handleOnNewStatusEncoderSource(source)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusEncoderSource", "handleOnNewStatusEncoderSource")
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_Encoder.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusForwardAvailable
Short description
Notify status if forwarding encoder data of currently selected interface is possible.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusForwardAvailable(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusForwardAvailable", "handleOnNewStatusForwardAvailable")
OnNewStatusForwardEncoder
Short description
Notify if encoder data should be forwarded.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusForwardEncoder(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusForwardEncoder", "handleOnNewStatusForwardEncoder")
OnNewStatusForwardInterface
Short description
Notify interface to forward encoder data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
function handleOnNewStatusForwardInterface(interface)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusForwardInterface", "handleOnNewStatusForwardInterface")
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_Encoder.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
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_Encoder.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
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_Encoder.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusTimerActive
Short description
Notify if timer is active to periodically pull increment.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusTimerActive(status)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusTimerActive", "handleOnNewStatusTimerActive")
OnNewStatusTimerCycle
Short description
Notify cycle time of increment timer.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
cycleTime |
INT |
1 |
Time of cycle. |
Sample (auto-generated)
function handleOnNewStatusTimerCycle(cycleTime)
-- Do something
end
Script.register("CSK_Encoder.OnNewStatusTimerCycle", "handleOnNewStatusTimerCycle")
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_Encoder.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_Encoder.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_Encoder.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_Encoder.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_Encoder.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
CSK_Module_Encoder
Short description
This is an automatically generated CROWN (description not necessary).
Overview
Encoder_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
Encoder_FC.OnNewData
Short description
Provide encoder / conveyor data.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
ENUM |
1 |
Mode of providing data. ENCODER: Provide pulled encoder data CONVEYOR: Provide pulled conveyor data TIMEOUT: Provide trigger of conveyor timeout HANDLE_ENCODER: Provide handle of encoder. HANDLE_TIMEOUT: Provide handle of conveyor timeout. |
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = Encoder_FC.OnNewData.create(mode)
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 = Encoder_FC.OnNewData.register(handle, eventname, callback)
Events
OnNewData
Short description
Provide encoder / conveyor data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
OnNewData |
STRING |
1 |
'CSK_Encoder.OnNewIncrementInfo' or 'CSK_Encoder.OnNewConveyorInfo' or ''CSK_Encoder.OnConveyorTimeout' or 'HANDLE_ENC' or 'HANDLE_TIM' Parameter: MODE = ENCODER 1: Increment Info (STRING) MODE = CONVEYOR 1: Conveyor Info (STRING) MODE = TIMEOUT 1: Timestamp of ConveyorTimeout (INT) MODE = HANDLE_ENCODER 1: Handle (Encoder) MODE = HANDLE_TIMEOUT 1: Handle (Conveyor.Timeout) |
Sample (auto-generated)
function handleOnNewData(handle, OnNewData)
-- Do something
end
Script.register("Encoder_FC.OnNewData.OnNewData", "handleOnNewData")
Enumerations
- C
- E
CSK_Encoder.ConveyorTimeoutMode
Mode for conveyor timeout.
| Value | Name | Description |
|---|---|---|
TICKS |
TICKS |
Use the increment ticks for conveyor timeout. |
DISTANCE |
DISTANCE |
Use the calculated distance for conveyor timeout. |
CSK_Encoder.DecoderCountMode
Decoder count mode.
| Value | Name | Description |
|---|---|---|
BIDIRECTIONAL |
BIDIRECTIONAL |
Counts up in Encoder forward / backward direction. |
POSITIVE_MOVEMENT |
POSITIVE_MOVEMENT |
Counts up in Encoder forward direction / counts down in Encoder backward direction |
NEGATIVE_MOVEMENT |
NEGATIVE_MOVEMENT |
Counts down in Encoder forward direction / counts up in Encoder backward direction. |
FORWARD_MOVEMENT |
FORWARD_MOVEMENT |
Counts up in Encoder forward direction / no count in Encoder backward direction. |
BACKWARD_MOVEMENT |
BACKWARD_MOVEMENT |
No count in Encoder forward direction / counts up in Encoder backward direction. |
CSK_Encoder.DecoderPhases
Phases of decoder.
| Value | Name | Description |
|---|---|---|
SINGLE_PHASE |
SINGLE_PHASE |
Using A_in. |
DUAL_PHASE |
DUAL_PHASE |
Using A_in and B_in. |
Encoder_FC.DataMode
Mode to provide encoder / conveyor data.
| Value | Name | Description |
|---|---|---|
ENCODER |
ENCODER |
Provide data of encoder. |
CONVEYOR |
CONVEYOR |
Provide data of conveyor. |
TIMEOUT |
TIMEOUT |
Provide trigger of conveyor timeout. |
HANDLE_ENCODER |
HANDLE_ENCODER |
Provide handle of encoder. |
HANDLE_TIMEOUT |
HANDLE_TIMEOUT |
Provide handle of Conveyor.Timeout. |