3.18, API Driver Code, Manager::getId(xx,xy) is not working

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
4 posts • Page 1 of 1
SergeyK
Posts: 12
Joined: Wed Nov 02, 2016 12:03 pm

3.18, API Driver Code, Manager::getId(xx,xy) is not working

Post by SergeyK »

Hello Community,

I'm working on a custom driver development with C++ API.
I can build the sample project and run it as a WinCC OA Manager.

For some reason the function DrvManager::getId(dpTestName, dpIdBytesTx) function is not working in a Driver project, but it works in an API Manager sample project.

Here is a code snippet. I triple-checked that the dp-name is correct.

Code: Select all

dpTestName = CharString("_MtmDriver.State.NumBytesTx:_original.._value");
DEBUG_MSG("MtmDriverIntDp::getDpName4Query dpTestName is : " << dpTestName);
if (DrvManager::getId(dpTestName, dpIdBytesTx)) {
	DEBUG_MSG("MtmDriverIntDp::getDpName4Query BytesTxAddr Address: " << dpIdBytesTx.getDp());

	if (!dpIdBytesTx.isNull())
		DrvManager::dpSet(dpIdBytesTx, IntegerVar(2));
	}
	else {
		DEBUG_MSG("MtmDriverIntDp::getDpName4Query BytesTxAddr GetID Failed.");
	}
I noticed that in case of the Driver project this function belongs to a class deriving from Manager, but for API Project the class derive from oaManager. is it related ?

User avatar
leoknipp
Posts: 2645
Joined: Tue Aug 24, 2010 7:28 pm

Re: 3.18, API Driver Code, Manager::getId(xx,xy) is not working

Post by leoknipp »

Normally a driver does not load the complete DP identification.
This is possibly the cause why resolving the DP name does not work in your example.

If you want to know the details of the WinCC OA API we suggest to attend a WinCC OA API training.
For details you can have a look at the following page:
https://www.winccoa.com/support/training.html

Best Regards
Leopold Knipp
Senior Support Specialist

SergeyK
Posts: 12
Joined: Wed Nov 02, 2016 12:03 pm

Re: 3.18, API Driver Code, Manager::getId(xx,xy) is not working

Post by SergeyK »

Hi Leopold,

You answer is not very helpful !
I understand that a driver would rely on a HWMapper for the linking purposes, but I also need to communicate with other DPs.

How can I enable the driver code to load complete DP identifications ? Is there an alternative to Manager::getId() method ?

I reviewed the 3 slide decks for API training (Control Extension, API Manager and Driver development), but this topic is not covered.
And overall impression about API documentation is quite poor.

Regards,

User avatar
leoknipp
Posts: 2645
Joined: Tue Aug 24, 2010 7:28 pm

Re: 3.18, API Driver Code, Manager::getId(xx,xy) is not working

Post by leoknipp »

I am not an API specialist. Therefore, I cannot give you detailed information how to change the API code to load identification or to access datapoint elements.
Why do you need to communicate to others DPs (not related to the driver)?

If you do an API training (can also be made with a live session) you can ask our API specialists for details how to manage WinCC OA data within your driver.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
4 posts • Page 1 of 1