Using DLL on WINccOA project
Search
-
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
Using DLL on WINccOA project
Hello
Can I use my own DLL on WIIcc OA project? If it's possible , how to invoque it?
I tried with #Use and put it in bin directory but without success. I have a message that Using DLL is not allowed.
Thanks for your reply.
Can I use my own DLL on WIIcc OA project? If it's possible , how to invoque it?
I tried with #Use and put it in bin directory but without success. I have a message that Using DLL is not allowed.
Thanks for your reply.
- schneebergera
- Posts: 89
- Joined: Sun Apr 03, 2016 5:52 pm
Re: Using DLL on WINccOA project
Hello,
please refer to oa_help.
chapter:
[Special functions - Control Extensions - CtrlExtension, basics]
Via the keyword #uses you can specify which CTRL extensions are needed in a script or in a panel. Therefore, the extensions must not be entered into the config file anymore. This facilitates the use of the extensions and the extensions are loaded first when they are needed. Which extensions a manager should load can also be defined via entries in the config.level file.
best regards,
Andreas
please refer to oa_help.
chapter:
[Special functions - Control Extensions - CtrlExtension, basics]
Via the keyword #uses you can specify which CTRL extensions are needed in a script or in a panel. Therefore, the extensions must not be entered into the config file anymore. This facilitates the use of the extensions and the extensions are loaded first when they are needed. Which extensions a manager should load can also be defined via entries in the config.level file.
best regards,
Andreas
-
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
Re: Using DLL on WINccOA project
I tried but without success
Only wrote #uses "namesofmydll" and fatal error cames
WCCOAui (1), 2018.01.22 09:32:13.546, SYS, WARNING, 134, Could not find function getVersionString in shared library C:\\******.dll: La proc?dure sp?cifi?e est introuvable.
WCCOAui (1), 2018.01.22 09:32:13.550, CTRL, SEVERE, 5/ctrl, Location of the following log entry: , Line:1
WCCOAui (1), 2018.01.22 09:32:13.550, IMPL, FATAL, 54, Unexpected state, The Ctrl Extension C:\\***.dll is not compatible with the current library version 315000 of WinCC OA.
It might be from version
Only wrote #uses "namesofmydll" and fatal error cames
WCCOAui (1), 2018.01.22 09:32:13.546, SYS, WARNING, 134, Could not find function getVersionString in shared library C:\\******.dll: La proc?dure sp?cifi?e est introuvable.
WCCOAui (1), 2018.01.22 09:32:13.550, CTRL, SEVERE, 5/ctrl, Location of the following log entry: , Line:1
WCCOAui (1), 2018.01.22 09:32:13.550, IMPL, FATAL, 54, Unexpected state, The Ctrl Extension C:\\***.dll is not compatible with the current library version 315000 of WinCC OA.
It might be from version
- schneebergera
- Posts: 89
- Joined: Sun Apr 03, 2016 5:52 pm
Re: Using DLL on WINccOA project
Hello,
the used *.dll must be based on WinCC_OA.
Therefore it has to be built with API (Application Programming Interface).
Documentation of the API functions can be found in your installation directory /api/docu
(if you select the API installation from the installation options).
best regards,
Andreas
the used *.dll must be based on WinCC_OA.
Therefore it has to be built with API (Application Programming Interface).
Documentation of the API functions can be found in your installation directory /api/docu
(if you select the API installation from the installation options).
best regards,
Andreas
Re: Using DLL on WINccOA project
Some years ago I wrote documents called 'X-Files'. You'll find them in the Labs section. One of them discusses how to make a "control DLL" which is fairly simply.
A 'control DLL' adds some statements to your scripting language. E.g. you can call 'myFunction' and do some intelligent stuff.
A control DLL is a DLL with a specific interface. The \\API folder has an example which should help. It requires C++ knowledge and some knowledge of the WInCC OA API would help.
Yes you can do dpSet() directly from a DLL. 'Waiting' stuff like a dpGet() is far more complex
Take care : the scripting interpreter will not switch threads as long as your (C++) function is running. Or, your functions should not take up any time.
There are methods to make a waiting function, but this is more complex
Hope this helps. Read my X-File or look in the \\API folder
share the fun
Frenk Mulder
A 'control DLL' adds some statements to your scripting language. E.g. you can call 'myFunction' and do some intelligent stuff.
A control DLL is a DLL with a specific interface. The \\API folder has an example which should help. It requires C++ knowledge and some knowledge of the WInCC OA API would help.
Yes you can do dpSet() directly from a DLL. 'Waiting' stuff like a dpGet() is far more complex
Take care : the scripting interpreter will not switch threads as long as your (C++) function is running. Or, your functions should not take up any time.
There are methods to make a waiting function, but this is more complex
Hope this helps. Read my X-File or look in the \\API folder
share the fun
Frenk Mulder
-
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
Re: Using DLL on WINccOA project
Thank you all.
This procedure is a little bit complicate for a newbe like me with wincc OA.
I'm using VS 2015. all documentations refered to VS 2013 or older version. Is it still compatible?
How to set correctly environment variables and VC8_DEFS? (I don't undestand this part)
After I must create a new project (*.sln) and import my existing files to build it with wincc_OA API. is it true?
If you have some documenttions with screen copy it will be very usefull.
This procedure is a little bit complicate for a newbe like me with wincc OA.
I'm using VS 2015. all documentations refered to VS 2013 or older version. Is it still compatible?
How to set correctly environment variables and VC8_DEFS? (I don't undestand this part)
After I must create a new project (*.sln) and import my existing files to build it with wincc_OA API. is it true?
If you have some documenttions with screen copy it will be very usefull.
Re: Using DLL on WINccOA project
Again. Look at X-File number 5 in the Lab section of the portal. It will tell you what to do !
I guess the visual studio version should be ok.
share the fun
Frenk Mulder
I guess the visual studio version should be ok.
share the fun
Frenk Mulder
Re: Using DLL on WINccOA project
Which software versions (operating system, additional software) are required is described in the documentation for the WinCC OA version you are using.
Please have a look at the documentation to get the information.
If you are a newbie and you are not familiar with the WinCC OA API toolkit we suggest to make a API training.
When you want to get more detailed information for a WinCC OA training please get in contact with your common WinCC OA sales contact.
Best Regards
Leopold Knipp
Senior Support Specialist
Please have a look at the documentation to get the information.
If you are a newbie and you are not familiar with the WinCC OA API toolkit we suggest to make a API training.
When you want to get more detailed information for a WinCC OA training please get in contact with your common WinCC OA sales contact.
Best Regards
Leopold Knipp
Senior Support Specialist
Re: Using DLL on WINccOA project
Leo is right. A badly written DLL can easily crash your UI !
A WinCC OA UI i sbasiclaly single-threaded. Your C++ code runs in this single thread.
if you do something blocking or just a simple loop that takes too much time -> then your UI will be non-responsive.
This is quite hard to recognise and/or fix
A DLL is not something for a newbie.
Consider the training
share the fun
Frenk Mulder
A WinCC OA UI i sbasiclaly single-threaded. Your C++ code runs in this single thread.
if you do something blocking or just a simple loop that takes too much time -> then your UI will be non-responsive.
This is quite hard to recognise and/or fix
A DLL is not something for a newbie.
Consider the training
share the fun
Frenk Mulder
-
- Posts: 12
- Joined: Fri Nov 24, 2017 10:43 am
Re: Using DLL on WINccOA project
I'm sure about my code. It is running in a single thread. functions are very quick. I wrote many DLL on VS but it's my first application in WINcc_OA.
Your X-File N° 5 is still open and I try to understand the procedure. but without any experience it's not easy.
Training is maybe a good way. I have also a consulting Pool with ETM but not activate now. I'm waiting for that.
Your X-File N° 5 is still open and I try to understand the procedure. but without any experience it's not easy.
Training is maybe a good way. I have also a consulting Pool with ETM but not activate now. I'm waiting for that.