Axon Queries and How to
- 1 Examples and How To write Axon queries
- 1.1 Server URIs
- 2 Functions
- 2.1.1 Simple function
- 2.1.2 DrTargeDrTargetKw(Kw()
- 2.1.3 boxWisker()
- 2.1.4 siteMeterKwhWrite
- 2.1.5 countDownSubmeters:
- 2.1.6 countSubmeters:
- 2.1.7 finDateSpan:
- 2.1.8 finCommit:
- 2.1.9 computed tag
- 2.1.10 calculateMeteredData
- 2.2 Add a function to a pod
Examples and How To write Axon queries
Name | Axon query | Description |
|---|---|---|
Find Unused Bacnet Connectors |
| Finds all bacnet connectors that are not being used |
Contains Search | Examples:
| looks for records that 'contain' the text specified in the 'contains' query |
Take point descriptions from the Connector and copy it onto a property tag on the point in FIN Stack. |
| This query takes every point coming from a bacnet connector and adds a string property tag called description and fills in the value of this tag with the description inside the BACnet device. |
priority for points |
| This will show you what level, and who wrote to a certain priority for points. |
create records via commit |
| This will allow the user to add a new record to the dataBase with a dis tag, action string, and a finActions marker |
add / edit tags on records |
| This will let you find a list of records that match the filter (Jason), and it will add the numberTest:88 tag to them. Or it will edit the tag if it already exists. |
Commit Records from Trio or just a grid |
| |
remove tags |
| -rochelle will find and remove all the rochelle tags, that have a jason marker |
delete/remove recrods |
| Finds all records that have the jason marker, and will remove them out of the dataBase. |
keep Cols |
| This takes a grid, in this example I just used the funcs function, and then only kept columns name,lib, and ID |
readAll then Fold |
| This finds all points, that are %, and it gives you the average for the curVal tag. Using the foldCol function. |
foldCols |
| This finds all point and unit, and then keeps just the id, curVal, and hisSize columns. Then it uses a foldCols function, and sums the curVal, and hisSize columns. |
uriPath | `http://host:81/a/b/file.txt`.uriPath | Takes a URI, and breaks out the path into a number of rows |
get date info |
| This query gets the current time, and then formats it so it's Month. |
Time Formats |
| YY Two digit year 07
YYYY Four digit year 2007
M One/two digit month 6, 11
MM Two digit month 06, 11
MMM Three letter abbr month Jun, Nov
MMMM Full month June, November
D One/two digit day 5, 28
DD Two digit day 05, 28
DDD Day with suffix 1st, 2nd, 3rd, 24th
WWW Three letter abbr weekday Tue
WWWW Full weekday Tuesday |
find all discover sessions, or find the devices that were previsouly discovered |
| |
start from a gird |
| Take a grid, and start working with it |