Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Link copied. Please paste this link to share this article on your social media post.
Originally published on Geo SCADA Knowledge Base by Anonymous user | June 09, 2021 11:58 PM
The licensed point count is made up of the sum of the number of point objects and pulse objects.
There are at least three ways to determine the point count currently being used by a server.
The first approach (and simplest) is to open the server status dialog by right clicking on the server icon and selecting status. At the bottom of the Info tab, the current licence details are shown. This method will list the number of points currently used as well as the total number of points available in the licence.
The second approach to determining a point count is to use the Queries views available in ViewX. Open the Queries views by selecting the queries icon in the toolbar. From the Queries section, double click on the Points table and select OK on the filter dialog to show all points. When the list is displayed, the number of rows in that list (displayed in the status bar at the bottom of the ViewX window) tells the number of points in the system.
For pulse points, repeat the process using the Pulse Actions table. The sum of the two numbers should give the total points.
This same mechanism can be used to determine point counts in any section of the database.
The actual queries run for points and pulses are as follows:
SELECT COUNT(y) FROM CDBPOINT
SELECT COUNT(y) FROM CDBPULSE
Using the SQL query format will only provide accurate results if the user you are logged in with has permissions to view all database point and pulse objects. Any object where you do not possess appropriate permissions will not be returned and so the apparent point count will be less than its actual value. |
You could use a logic program to store the used points in an internal analog point in the database. This method gets around the possibility of all points not being returned in a query due to permissions, since logic runs under a high level account which has access to all points.
TYPE
Result:
STRUCT
Count : DINT;
END_STRUCT;
END_TYPE
PROGRAM LicenceCount
VAR NOCACHE
Points AT %S(SELECT COUNT(*) AS "Count" FROM CDBPOINT) : RESULTSET OF Result;
Pulses AT %S(SELECT COUNT(*) AS "Count" FROM CDBPULSE) : RESULTSET OF Result;
Output AT %M(.Licence Usage.CurrentValue) : DINT;
END_VAR
Output := Points.Value.Count + Pulses.Value.Count;
END_PROGRAM
The output is to an internal analog point. Remember to change the Hand Control range and FullScale property as necessary so the logic doesn't attempt to write out of range values and throw an error.
Go: Home Back
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.