Can someone please help me with information on what is the settings which can be done at the tag level to get the value of the PI tag though the quality of the PI tag is bad which we can check in OPC Client tool?
The quality of the value is set by the OPC server and is received by the OPC interface along with the value.
If you look in PI-SMT for the tag in question and see a value and the 'Questionable' flag is set, you may experience issues getting to the value in an asset analytic in AF.
In asset analytics, if you test an attribute with BadVal('attribute') and the questionable flag is set, the function will return true indicating the value is bad.
If that is the case, you are having issues getting to the value in asset analytic in AF, use a conversion function such as float('attribute') or int('attribute") to force a conversion of the value.
There is a setting in the PI-OPC interface configuration to decide what to do about "questionable" tags.
There is nothing you can do to read the value of "bad" tags from the OPC server. If your OPC client tool shows no value then PI cannot get a value. There is a setting in the interface to discard bad and questionable quality data.
Retrieving data ...