OPC UA retrieve value on-demand
- iain
- Posts:33
- Joined: Fri May 19, 2017 7:08 pm
OPC UA retrieve value on-demand
Is there a way for me to read OPC UA values only when triggered, rather than polled or unsolicited? Would this be done with "Single Query," or is that part of the dpQuery() mechanism? I see comments about "Single Query" in a couple of cases in the online help, but I'm not understanding what it does.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: OPC UA retrieve value on-demand
With the function dpQuery() you can get data which is already available in the system. There is no connection to the driver functionality in that case.
If you want to read values for dp elements with an input address on demand you can use the single query functionality of the driver.
To start a single query for a specific dp element you have to use the driver common datapoint _DriverX.SQ (dp type _DriverCommon).
Information for the dp type _DriverCommon you can find in the WinCC OA documentation: Reference tables --> Internal data point types --> _DriverCommon (General driver)
Best Regards
Leopold Knipp
Senior Support Specialist
If you want to read values for dp elements with an input address on demand you can use the single query functionality of the driver.
To start a single query for a specific dp element you have to use the driver common datapoint _DriverX.SQ (dp type _DriverCommon).
Information for the dp type _DriverCommon you can find in the WinCC OA documentation: Reference tables --> Internal data point types --> _DriverCommon (General driver)
Best Regards
Leopold Knipp
Senior Support Specialist
- iain
- Posts:33
- Joined: Fri May 19, 2017 7:08 pm
Re: OPC UA retrieve value on-demand
Thanks. That helps a lot.
I'm finding that even if I set an address config to "Single Query" I am polling continuously. Is that normal, or did I miss a step?
If I disable polling by disabling the poll group or setting PM to false then I can query by setting SQ to the DP name. I can also query by setting GQ to 1. For what I'm doing - reading up several hundred strings to modify and write down one time - it will probably be better for me to attach all of these addresses to a disable poll group and use driver common .GQ, so I have a solution. I'm still puzzled about why "Single Query" would still need the poll disabled, though.
I'm finding that even if I set an address config to "Single Query" I am polling continuously. Is that normal, or did I miss a step?
If I disable polling by disabling the poll group or setting PM to false then I can query by setting SQ to the DP name. I can also query by setting GQ to 1. For what I'm doing - reading up several hundred strings to modify and write down one time - it will probably be better for me to attach all of these addresses to a disable poll group and use driver common .GQ, so I have a solution. I'm still puzzled about why "Single Query" would still need the poll disabled, though.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: OPC UA retrieve value on-demand
Maybe the polling you are describing is the publishing interval defined in the OPC UA subscription.
Please check the settings of the used OPC UA subscription and afterwards compare it with the update interval you see for the original values.
Best Regards
Leopold Knipp
Senior Support Specialist
Please check the settings of the used OPC UA subscription and afterwards compare it with the update interval you see for the original values.
Best Regards
Leopold Knipp
Senior Support Specialist
- iain
- Posts:33
- Joined: Fri May 19, 2017 7:08 pm
Re: OPC UA retrieve value on-demand
It's definitely tracking the first polling group time. I changed the subscription interval to 10 seconds and there was no change, then I changed the polling group interval to 5 seconds and the update rate followed suit.
The datapoint address doesn't specify either the polling group or subscription.
The datapoint address doesn't specify either the polling group or subscription.