Wincc Oa 3.14 I need help to develop an application

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
13 posts • Page 2 of 2
mgulel
Posts:17
Joined: Mon Aug 15, 2016 1:48 pm

Re: Wincc Oa 3.14 I need help to develop an application

Post by mgulel »

I want to write and implement an application to get xml file from FTP server(which is supplied by CCTV system) and write it to a datapoint at winCC OA.
I've never write an API for WCC OA, and I'm not sure if its gonna be an manager or an extension.(Porbably will be a new manager)

Is there any examples for an API manager/extension? If there is can you send me one?

Thanks for your concern

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: Wincc Oa 3.14 I need help to develop an application

Post by fmulder »

You'll find an example:

* The \\API folder of the installation can show you a sample DLL or a sample manager Sample Ctrl DLL
* The Portal (lab section) has a document that I wrote years ago XFile 5

In general your choice would be:

* If you want to call your functionality from a script manager or a UI then use a control extension
* if you want something running continuously on your server -> then write a manager

Both are equal in complexity.

Please note: Both a control manzager or your(!) manager are single-threaded. This means:

* If you write a control DLL and your(!) function takes 10 minutes to collect the XMl file, then your UI will be basically dead ! You wont be able to click any buttons until your function returns. Solution : you'll have to start your own thread. Risk : when they close a panel and your thread has not yet finished then nice things may happen
* if you write a manager then the manager will no longer talk to pmon or to Event manager. It will eventually be marked as blocking or Event will disconnect

Write API is nice but... can be dangerous

Share the fun
Frenk Mulder

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Wincc Oa 3.14 I need help to develop an application

Post by RudiKreiner »

Before writing a manager to do this I would have a look at the functions that the control language provides. I think that could save you a lot of work.
Open the WinCC Help function and search for xml and ftp to find the functions I mean.
To avoid have an UI blocking, you could have a control function running that does the actual work, and is triggered by having an UI set a boolean datapoint to TRUE then the control script sets it back to FALSE when done (for example)

13 posts • Page 2 of 2