Custom Collector Design
Design topics for Creating Custom Collectors
Among the first design decisions to be made with a collector is to map the data source’s timestamps, values, and qualities to the Proficy Historian types.
- Timestamps
- You can let the toolkit assign timestamps to polled or unsolicited data or you can provide the timestamps with unsolicited data. If you choose to provide timestamps, you must provide them in the GMT+0 time zone. Proficy Historian offers microsecond resolution on timestamps, which should be sufficient for most applications.
- Values
- The Proficy Historian has a finite set of data types. If your data source has other types that cannot be converted then do not collect those tags. If there is any scaling or adjustments to the data, consider if those should be done in your collector specific code or via input scaling in the toolkit or calculation tags in the Data Archiver. Also, consider what the value means if the data quality is not good. In most parts of Proficy Historian, if you set the data quality to bad then the value will be ignored.
- Quality
- This can be the most important design decision of your collector. Your design needs to indicate what data is meaningful and should be used in trends and reports and what data is not meaningful. If the Historian contains tags from other data sources, you should be consistent with other collectors so that the retrieval program need to be aware of where the data came from.
Once you have a design for timestamp, value, and quality, you should think about how best to group your tags for the most efficient collection. The toolkit will pass a list of polled and unsolicited tags to your code at startup and their intervals. For polled tags, you can mostly ignore the tags because you will be sent a list later when it is time to poll the data. For unsolicited tags, you need to build your own groups and notify the toolkit when data changes.
Adding Browsing functionality is optional but is recommended to have. Think about how your code will respond to browse requests and how you will filter the tagnames and descriptions.
Your code does not need to do anything for collector compression or for store and forward of data.
You collector can utilize the same log file mechanism as other collectors but you should decide what you should write to help troubleshoot the collector.
Finally, you should consider how your collector should react to tag changes made while the collector is running. Tags can be added or deleted or properties like Collection interval or Deadband can be modified.