What is the best way to trend the data quality of a Sql tag? Or monitor other tag properties over a period of time? We have had issues with our screens all turning red from possible data quality and would like to monitor that value over time. Is that property available to look at in a trend or is it going to have to be looked at a different way with like the database query browser? Either way I am not sure how to get this information.
I have a tag change gateway script that, when one of the tags in my UDT changes, reads several other tags and stores their value and quality in a SQL table. When you read a tag with the system.tag.read function, shown in Appendix C in the online help, it returns three things, the value of the tag, the quality of the tag, and a timestamp for the tag. Once you read the tag, if you store both the value and quality in a SQL table, then later on you can read this table into a chart to show the trending of the value, and the quality also, if desired.
Here is a an example of reading a tag called MyTag in the SqlTags folder and breaking out the value, quality, and timestamp.
qv = system.tag.read("MyTag")
value = qv.value
quality = qv.quality
timestamp = qv.timestamp
Might want to check the log files on the gateway, you’ll probably find that the tag quality is related to a flaky connection with a device. Is happening with all the devices you’re connected to or just one?
The guys at IA are very good at analyzing the log file traffic so you can always give them a call and they can vnc/teamview to your desktop and get the logging set up correctly.
Had a further thought on this that you may also be running up against a TCP connection limit on your device network card (assuming it is on an ethernet network, but could also apply to gateways performing the conversion between two protocols i.e. DH+ to Ethernet/IP.
If its a controllogix and you are using an ENBT card I think the TCP connection limit is 64 (some devices will consume multiple connections though so 64 does not mean 64 devices).
Can fix by installing additional cards and spreading your connections or probably easiest is to install an EN2T (higher spec ethernet card).
If it’s another device say with only one built in ethernet port you might need to think about using an OPC gateway (such as ignition) to provide comms to the other devices on the network accessing info from that device.
Ran across this problem trying to connect 24 VFDs on ethernet to one compactlogix… didn’t end well!