1 #ifndef __MLPITASKLIB_H__ 2 #define __MLPITASKLIB_H__ 357 #if !defined(TARGET_OS_VXWORKS) 393 #if !defined(TARGET_OS_VXWORKS) 404 #if defined(TARGET_OS_WINNT) 405 #if defined(MLPI_EXPORTS) 406 #define MLPI_API __declspec(dllexport) 407 #elif defined(MLPI_IMPORTS) 408 #define MLPI_API __declspec(dllimport) 413 #if defined(MLPI_EXPORTS) 414 #define MLPI_API __attribute__ ((visibility("default"))) 415 #elif defined(MLPI_IMPORTS) 939 #endif // endof: #ifndef __MLPITASKLIB_H__ MlpiTaskEvent
There are different system task events in the system.
static const ULONG MLPI_PRIORITY_BACKGROUND
Default priority for user task. Use for tasks which are doing GUI, HMI, service, etc...
MLPIRESULT mlpiTaskViewerStart(const MLPIHANDLE connection)
This function starts a task viewer session, all task information is stored in a ring buffer as long a...
unsigned char UCHAR
1 byte unsigned integer
This event raises before any plc task will writes its outputs (helpful for I/O simulation, e.g. read from outputs of task images).
MLPIRESULT mlpiTaskViewerTaskStop(const MLPIHANDLE connection)
This function sets a STOP event into a task viewer session.
MlpiTaskTriggerEvent
There are different trigger events.
MLPIRESULT mlpiTaskViewerAddItem(const MLPIHANDLE connection, const UCHAR *data, const ULONG numElements)
This function adds a user event into the task viewer session. Use this function to mark special event...
signed char BOOL8
1 byte boolean
unsigned short USHORT
2 byte unsigned integer
MlpiProcessState
This enumeration defines the state of a process.
This option says if an warning should be set as long as an event is decoupled from cyclic execution...
MLPIRESULT mlpiTaskViewerStop(const MLPIHANDLE connection)
This function stops a task viewer session.
MLPIRESULT mlpiTaskExecuteGetStatus(const MLPIHANDLE connection, const MLPITASKHANDLE handle, MlpiProcessState *state)
This function gets the status of an executed file.
struct MlpiTaskTrigger MlpiTaskTrigger
This structure defines the information to trigger events.
MlpiSystemTask
There are different system tasks.
MLPIRESULT mlpiTaskSetCurrentPriority(const MLPIHANDLE connection, const ULONG priority)
This function sets the priority of the calling task. Use this to set the priority of your own user C/...
This option says if the sercos is decoupled from cyclic execution.
MLPIRESULT mlpiTaskSetTriggerSetup(const MLPIHANDLE connection, const MlpiTaskTriggerSetup *triggerSetup, const ULONG numElements)
This function sets the configuration of the external trigger. Use this function to deactivate cyclic ...
This event raises every new sercos cycle after the actual values arrive.
This option says if the motion is decoupled from cyclic execution.
MlpiTaskViewerState
There are different task viewer states.
wchar_t WCHAR16
UTF16 string.
unsigned int ULONG
4 byte unsigned integer
unsigned long long MLPITASKHANDLE
MLPI-API handle value used for tasks.
MLPIRESULT mlpiTaskViewerGetState(const MLPIHANDLE connection, MlpiTaskViewerState *state)
This function gets the current state if the task viewer.
MLPIRESULT mlpiTaskGetCurrentPriority(const MLPIHANDLE connection, ULONG *priority)
Read back the priority of the calling task.
MLPIRESULT mlpiTaskGetSystemPriority(const MLPIHANDLE connection, const MlpiSystemTask task, ULONG *priority)
This function reads back the priority of a task inside the system. For example, you can get the prior...
This state says that the task viewer is currently stopped.
MLPIRESULT mlpiTaskSetSystemPriority(const MLPIHANDLE connection, const MlpiSystemTask task, const ULONG priority)
This function sets the priority of tasks inside the system. For example, you can set the priority of ...
static const ULONG MLPI_PRIORITY_HIGH_MAX
The highest available level for cyclic system/user tasks. Use with mlpiTaskSetCurrentPriority and NOT...
struct MlpiTaskTriggerSetup MlpiTaskTriggerSetup
This structure defines the information needed to get or set the trigger setup.
This event raises every time a watchdog expires.
MLPIRESULT mlpiTaskExecuteFile(const MLPIHANDLE connection, const WCHAR16 *path, const WCHAR16 *envArguments, const WCHAR16 *arguments, MLPITASKHANDLE *handle)
This function executes a file.
This option says if the call of the function 'mlpiTaskSetTrigger' should be synchronous.
This option says if the execution of the external trigger should be executed immediately. The events are triggered immediately one after the other, not within their cycletimes.
MLPIRESULT mlpiTaskExecuteGetActive(const MLPIHANDLE connection, MLPITASKHANDLE *handles, const ULONG numElements, ULONG *numElementsRet)
This function gets handles for all executed files.
This event executes all sercos cyclic tasks (e.g. sercos cyclic PLC-Tasks, tasks delaying on event 'M...
This is the task which is doing all the motion calculation. For example all PLCOpen motion...
MlpiTaskTriggerOption
There are different trigger options.
This event raises after any plc task will reads its inputs (helpful for I/O simulation, e.g. write to inputs of task images).
MLPIRESULT mlpiTaskSetTrigger(const MLPIHANDLE connection, const MlpiTaskTrigger *taskTrigger, const ULONG numElements)
This function executes the external trigger. To trigger an event it has to be decoupled from the cycl...
This option says if decoupling of events should stay active in case of an error.
This state says that the task viewer is currently running.
This event executes all motion cyclic tasks (e.g. MotionKernel for Interpolation, motion cyclic PLC-T...
static const ULONG MLPI_PRIORITY_HIGH_MIN
The lowest available level for cyclic system/user tasks. Use with mlpiTaskSetCurrentPriority and NOT ...
MLPIRESULT mlpiTaskGetTriggerSetup(const MLPIHANDLE connection, MlpiTaskTriggerSetup *triggerSetup, const ULONG numElements, ULONG *numElementsRet)
This function gets the configuration of the external trigger.
MLPIRESULT mlpiTaskExecuteGetName(const MLPIHANDLE connection, const MLPITASKHANDLE handle, WCHAR16 *name, const ULONG numElements)
This function gets the name of an executed file.
This event raises every new motion cycle after the actual values of all axes have been updated...
MLPIRESULT mlpiTaskWaitForEvent(const MLPIHANDLE connection, const MlpiTaskEvent taskEvent, const ULONG timeout)
This function pends the calling task until the given event occurs. You can use it to synchronize a ta...
unsigned long MLPIHANDLE
common MLPI-API handle value
MLPIRESULT mlpiTaskViewerTaskStart(const MLPIHANDLE connection)
This function sets a START event into a task viewer session.
int MLPIRESULT
common MLPI-API return value
MLPIRESULT mlpiTaskExecuteKill(const MLPIHANDLE connection, const MLPITASKHANDLE handle)
This function stops execution of file.
MLPIRESULT mlpiTaskGetTrigger(const MLPIHANDLE connection, MlpiTaskTrigger *taskTrigger, const ULONG numElements, BOOL8 *cmdActive, ULONG *numElementsRet)
This function gets the configuration of the events of external trigger functionality.