Hello
I'm making WinCC OA API Manager with C++ and I have some problem.
When I get the _address.._reference and _address.._active, _address.._drv_ident by function that is, dpQuery or dpQueryConnectSingle or dpGet,
The Manager which is compiled in Visual Studio 2013 (I use WinCC OA 3.14) is not function collectly (The manager status turns to abnormal(number 3)).
The query used in function is "SELECT '_original.._value', '_address.._reference' FROM '*.PVRAW' WHERE _DPT = \\"AI\\"".
So, I tested that other configs like "SELECT '_original.._value', '_distrib.._driver' FROM '*.PVRAW' WHERE _DPT = \\"AI\\"", and It work's well.
I think the configs of _address have some problem. (I havn't used another WinCC OA Version, only 3.14)
Because, even though dpQuery in WinCC OA Ctrl function don't return _address configs value. (It returns Null)
Thank you.
About getting _address of DP config
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: About getting _address of DP config
With a query function (dpQuery, dpQueryConnectSingle, dpQueryConnectAll) you cannot read the attributes for the _address config.
The _address config is only known by the driver and the query is handled by the Event Manager.
Best Regards
Leopold Knipp
Senior Support Specialist
The _address config is only known by the driver and the query is handled by the Event Manager.
Best Regards
Leopold Knipp
Senior Support Specialist
- kiducduc
- Posts:7
- Joined: Tue Nov 28, 2017 3:18 am
Re: About getting _address of DP config
Thank you for your reply.
As you mentioned, I got it that dpQuery can't return _address config.
And I checked that dpGet can return _address config in API manager.
However, when I try to get _address by dpGet of datapoint without _address config, the API manager goes to die.
So, my question is
1. How can I know which datapoint don't have _address config in API Manager.
2. Is there datapoint related to address finder function like _DriverCommon.AD.HWMast/DPMatch in API Manager.
Thank you.
As you mentioned, I got it that dpQuery can't return _address config.
And I checked that dpGet can return _address config in API manager.
However, when I try to get _address by dpGet of datapoint without _address config, the API manager goes to die.
So, my question is
1. How can I know which datapoint don't have _address config in API Manager.
2. Is there datapoint related to address finder function like _DriverCommon.AD.HWMast/DPMatch in API Manager.
Thank you.
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: About getting _address of DP config
JONGYUN KIM wrote:
2. No idea what you mean with 'address finder', but you could also use these datapoints in an API manager.
1. Each config has a 'type' attribute if this does not have the value 'DpConfigNrType::DPCONFIGNR_NOCONFIGNR', then this config exists. But an address config cannot exist without distrib config, so normally datapoint element with a distrib config also have an address config.1. How can I know which datapoint don't have _address config in API Manager.
2. Is there datapoint related to address finder function like _DriverCommon.AD.HWMast/DPMatch in API Manager.
2. No idea what you mean with 'address finder', but you could also use these datapoints in an API manager.
- kiducduc
- Posts:7
- Joined: Tue Nov 28, 2017 3:18 am
Re: About getting _address of DP config
Gertjan van Schijndel wrote:
I tested by below code, but whatever there is config or not, getConfig() don't return 'DpConfigNrType::DPCONFIGNR_NOCONFIGNR'. (_address, _distrib config)
CharString dp = "SVR-L5-ELEC-M:HVCB_MAIN_POWER.PVRAW" // example dp
CharString str = dp + ":_address";
DpIdentifier dpid;
Manager::getId(str, dpid);
cout
1. Each config has a 'type' attribute if this does not have the value 'DpConfigNrType::DPCONFIGNR_NOCONFIGNR', then this config exists. But an address config cannot exist without distrib config, so normally datapoint element with a distrib config also have an address config.
I tested by below code, but whatever there is config or not, getConfig() don't return 'DpConfigNrType::DPCONFIGNR_NOCONFIGNR'. (_address, _distrib config)
CharString dp = "SVR-L5-ELEC-M:HVCB_MAIN_POWER.PVRAW" // example dp
CharString str = dp + ":_address";
DpIdentifier dpid;
Manager::getId(str, dpid);
cout
- siemens_dva
- Posts:11
- Joined: Tue May 03, 2016 10:23 am
Re: About getting _address of DP config
In my project, we read the name of the connection from a datapoint element.
I'm running the following query which so far seems to work fine.
If I understand Leopold correctly this is not supported? What is the correct way to read the address reference from a datapoint element.
I'm running the following query which so far seems to work fine.
Code: Select all
dyn_dyn_anytype tab;
dpQuery("SELECT ALL '_address.._reference' FROM '" + dpSubStr(dpe, DPSUB_SYS_DP_EL) + "'", tab);
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: About getting _address of DP config
This information is not correct.Gertjan van Schijndel wrote:
But an address config cannot exist without distrib config, so normally datapoint element with a distrib config also have an address config.
If the _address config is related to driver number 1 there is no need to configure a _distrib config.
When configuring an _address config with the PARA module the _distrib config is also created for addresses related to driver number 1.
Best Regards
Leopold Knipp
Senior Support Specialist
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: About getting _address of DP config
Don von Allwörden wrote:
Best Regards
Leopold Knipp
Senior Support Specialist
With a dpGet() you can get the _address.._reference for a datapoint element. Before you read the _reference attribute you should check if an _address config exists by reading the _type attribute.In my project, we read the name of the connection from a datapoint element.
I'm running the following query which so far seems to work fine.
If I understand Leopold correctly this is not supported? What is the correct way to read the address reference from a datapoint element.Code: Select all
dyn_dyn_anytype tab; dpQuery("SELECT ALL '_address.._reference' FROM '" + dpSubStr(dpe, DPSUB_SYS_DP_EL) + "'", tab);
Best Regards
Leopold Knipp
Senior Support Specialist
- kiducduc
- Posts:7
- Joined: Tue Nov 28, 2017 3:18 am
Re: About getting _address of DP config
Leopold Knipp wrote:
with dpGet(...:_address.._type), I can know that whether _address exists or not.
In API Manager,With a dpGet() you can get the _address.._reference for a datapoint element. Before you read the _reference attribute you should check if an _address config exists by reading the _type attribute.
with dpGet(...:_address.._type), I can know that whether _address exists or not.