Originally created by: massimiliano.legati
I want to diagnose status of IEC tasks via code using "cmpIecTask" library.
For Example I want to use "IecTaskGetFirst" with the interface:
Return - IecTaskGetFirst --- RTS_IEC_HANDLE - Returns the handle to the first IEC task
Input - pszAppName ----- POINTER TO STRING - Application name
--------- pResult ------------ POINTER TO RTS_IEC_RESULT - Pointer that returns the runtime system error code
My problem is the input "pszAppName".
If I put manually the name of the application in te input everything work fine but I want to create a library than I need to readout the "Application Name" directly from the code.
Someone know how to read the "Application Name" via IEC-code?
Maybe this helps:
CmpApp library, function AppGetProjectInformation.
This function return not only project info, but app info too.
You can do something like this:
pInterface = CAL_IecVarAccGetFirstInterface(NULL);
while (pInterface != RTS_INVALID_HANDLE)
CAL_IecVarAccGetApplicationName(pInterface, &appName, sizeof(appName);
pInterface = CAL_IecVarAccGetNextInterface(pInterface, NULL);
Log in to post a comment.