CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Feb 24, 2020 9:11 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Nov 26, 2019 3:26 pm 
Offline

Joined: Tue Jan 08, 2019 4:24 pm
Posts: 3
Hi,
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?

Thanks!!!!


Top
   
PostPosted: Tue Nov 26, 2019 5:06 pm 
Offline
Frequent User
Frequent User

Joined: Thu Mar 17, 2016 1:24 pm
Posts: 209
Hi.
Maybe this helps:
CmpApp library, function AppGetProjectInformation.
This function return not only project info, but app info too.

_________________
Make CODESYS great again


Top
   
PostPosted: Fri Jan 03, 2020 8:33 am 
Offline

Joined: Fri Sep 20, 2019 12:47 pm
Posts: 9
You can do something like this:

char appName[96];
RTS_HANDLE pInterface;
pInterface = CAL_IecVarAccGetFirstInterface(NULL);

while (pInterface != RTS_INVALID_HANDLE)
{
CAL_IecVarAccGetApplicationName(pInterface, &appName[0], sizeof(appName);

pInterface = CAL_IecVarAccGetNextInterface(pInterface, NULL);
}


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: andre_teprom and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited