API development tool

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

API development tool

Post by najoua »

Hello,

I am working on WinCC OA 3.13 and I need to develop some special functions, is it necessary to use visual studio 2013? Actually, I have visual studio 2010 on my PC but I can't open in it the "SampleTabUtil" available in WinCC.


Best regards,

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: API development tool

Post by leoknipp »

Hello,

as described in the requirements for WinCC OA (see online help) you have to use the following development tool:
Visual C++ / Visual Studio 2013 (VC12) Compiler Version 18.00.30501 for x64

The usage of the other VC++ versions is not supported.

Best Regards
Leopold Knipp
Senior Support Specialist

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: API development tool

Post by najoua »

Hello,

Does somebody have an example of a C++ code to add a column to the alert table? The sample available in the help "add user-defined column" shows how to concatenate two columns that already exist in the table, but in my case I need to add a different column that shows some information described in another DPE not the DPE that contains the alert; the only thing is that the two DPEs belongs to the same DP.

I have installed Visual Studio 2013. I did add a column to my AEScreen with the title "Building". The name of the building that I want to extract in this column is stored in a DPE called "Information". The other DPEs of my DP contains alerts that appear in the alert table. I think that I have to develop a C++ function in a DLL project and then store the resulted DLL in the the bin folder of my WinCC project. A screen is available in the setting >> alerts >> functions to specify the function to use and define its arguments. The problem is that these arguments are limited and are all related to the attributes of _alert_hdl. The only argument that seems interesting in my case is __V_dpid, but this is not a real ID it returns the name of the structure.How can I use this __V_dpid for example to get description of another DPE?

Is there a way to use a normal control script instead of API functions because this could be easily resolved with dpGet and dpSet? or is it possible to pass different arguments to the API function others than the ones specified in the list of arguments?

Thank you in advance,
Regards.

3 posts • Page 1 of 1