Home

Documentation - AGG Software

image

Contents

1. Expressions module PRINTED MANUAL 2006 2008 AGG Software Expressions module 2006 2008 AGG Software All rights reserved No parts of this work may be reproduced in any form or by any means graphic electronic or mechanical including photocopying recording taping or information storage and retrieval systems without the written permission of the publisher Products that are referred to in this document may be either trademarks and or registered trademarks of the respective owners The publisher and the author make no claim to these trademarks While every precaution has been taken in the preparation of this document the publisher and the author assume no responsibility for errors or omissions or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document Printed 28 01 2008 Publisher AGG Software Production 2006 2008 AGG Software http www aggsoft com Contents l Table of Contents Part 1 Introduction 1 Part 2 System requirements 1 Part 3 Installing Expressions 2 Part 4 Glossary 5 Part 5 User Manual 6 T Config rat ON r seca cece tee ARR a rnntde es dent saaana SE rara staat tenses 6 2 Supported functions
2. ss ssneennennnnnnnnennnnnenernnnneenenennnenennns 7 Math functions sieaa NGARAN ND NANG RN LAKAN DIN DY NANANA AL 7 Operators a NABA AATA NA NLA 9 String functions a aa AN NA BEA BAR Aa paa 9 Date and Time Se PR RE 10 Miscellaneous functions Anna 11 Part 6 Troubles 12 1 Possible problems Aa 12 2006 2008 AGG Software 1 Expressions module 1 Introduction The filter module Expressions for our data loggers for example Advanced Serial Data Logger or Advanced TCP IP Data Logger is an interpreter for quick and easy evaluation of expressions It is a smart tool easy in use Supports different data types string date time decimal float and boolean arithmetic and boolean operators multiple levels of brackets built in math string boolean functions and user defined variables It supports the following operators and functions Mathematics operations e Addition Substraction Multiplication Division N Exponential only positive numbers for the base Mathematics functions ABS ATAN COS EXP LN ROUND SIN SQRT SQR TRUNC and many others String functions COPY REPLACE POS and many others Logical functions AND OR XOR and etc 2 System requirements The following requirements must be met for Expressions to be installed Operating system e Windows 95 Windows 95 OSR2 Windows 98 Windows Me Windows NT4 Windows 2000 Windows XP all editions both
3. the new or existing parser variable and EXPRESSION is any valid set of functions and or variables This module may use all existing parser variables you may select these variables in the Variables group Your may read about parser variables in a parser s help file Additionally you may define new variables here and assign a result of an expressions to these variables Therefore user defined variables may be used in data export modules as a regular parser variable All functions operators and variables are exist in a drop down list If you want to add any function then you should 1 Put the cursor to a position in the edit window 2 Select the corresponding category Date and Time for example 3 Select a function that you need to insert to the edit window DATE for example 4 Click the Add button Later you may type your expressions directly without using of drop down lists All supported functions are described in following sections B8 Expressions 3 0 0 build 14 IRONsIRON10045IN ALUM ALUMSALUM 100 Date and Time x DATE x Usage VARIABLE NAME EXPRESSION one expression per row Example YAAR 31 SIN 2 COS A A parser variable Cu Lens Pic 1 The configuration window 2006 2008 AGG Software 7 Expressions module 5 2 5 2 1 Supported functions Math functions ABS X Abs returns the absolute value of the argument X X is an integer type or real type expr
4. x86 and x64 Windows 2003 Server both x86 and x64 Windows Vista both x86 and x64 Free disk space Not less than 5 MB of free disk space is recommended Special access requirements You should log on as a user with Administrator rights in order to install this module The main application core must be installed for example Advanced Serial Data Logger Notes for Microsoft Vista Since our software saves data to the registry and installs to the Program Files folder the following requirements must be met 1 You need Administrator rights to run and install our software 2006 2008 AGG Software System requirements 2 2 The shortcut icon of our software will be located on the desktop 3 Windows Vista will ask for your confirmation to continue the installation NOTE You can configure the user account only once in order not to see the above dialog box any more Search Google for the solution of this problem Installing Expressions Close the main application for example Advanced Serial Data Logger if it is running Copy the program to your hard drive Run the module installation file with a double click on the file name in Windows Explorer Follow the instructions of the installation software Usually it is enough just to click the Next button several times Start the main application The name of the module will appear on the Modules tab of the Settings window if it is successfully
5. C ODBC database odbcexport dil 3 2 0 3 Query Parse Filter C Direct Excel connection olexcel dll 3 2 0 8 a Send keystrokes wndem dil 3 2 0 2 ES C Excel export excelexport dil 3 00 19 Data export FS Download plugin now Help Setup Redirect data to another configuration Events handling Configuration Fig 2 Examples of installed modules 2006 2008 AGG Software 5 Expressions module Port options Events handling Log file Select events handling modules 2 Module name Version C Events notification events dll 3 2 0 2 C Internet sharing ishare dll 3 2 0 2 i Query Parse Filter Data export 3 Events handling Download plugin now Fig 3 Examples of installed modules 4 Glossary Plug in module Main program the program shell that uses this module For example Advanced Serial Data Logger Parser the module that processes the data flow singling out data packets from it and variables from data packets These variables are used in data export modules after that Core see Main program 2006 2008 AGG Software User Manual 6 User Manual Configuration The module configuration is very simple pic 1 You may add one or more expressions to the edit window One row contains one expression Each expressions should have the following format VARIABLE_NAME EXPRESSION Where VARIABLE_NAME is a name of
6. NGINTTOSTRBE X converts 4 bytes in Big endian order in the array X to a 32 bit integer value LONGWORDTOSTR X converts 4 bytes in the array X to a 32 bit unsigned decimal value LONGWORDTOSTRBE X converts 4 bytes in Big endian order in the array X to a 32 bit unsigned decimal value SINGLETOSTR X converts 4 bytes in the array X to a float value 2006 2008 AGG Software User Manual 12 SINGLETOSTRBE X converts 4 bytes in Big endian order in the array X to a float value SMALLINTTOSTR X converts 2 bytes in the array X to a 16 bit signed decimal value SMALLINTTOSTRBE X converts 2 bytes in Big endian order in the array X to a 16 bit signed decimal value WORDTOSTR X converts 2 bytes in the array X to a 16 bit unsigned decimal value WORDTOSTRBE X converts 2 bytes in Big endian order in the array X to a 16 bit unsigned decimal value Troubles Possible problems No data for publication exporting no data is passed for exporting Solution configure the parser make sure that one or more variables are declared in the parser Error on binding variable with name 96s 965 the error usually occurs if data does not correspond to the specified format For example the date and time format does not correspond to the data Unable to disconnect from the database 26s and Unable to connect to a database 265 it is impossible to connect disconnect to form the database You should
7. an invalid format Perhaps you are using the module incompatible with the version of the Advanced Serial Data Logger kernel Update the versions of both the kernel and the module The time of connection is not due yet d d the message appears during an attempt to connect to the database after the connection to it has been lost and the Reconnect after option is enabled No additional actions are required Invalid procedure call Bad arguments an attempt to call the module using invalid parameters Perhaps you are using the module incompatible with the version of the Advanced Serial Data Logger kernel Update the versions of both the kernel and the module Writing to the database is complete the message appears if your queue of SQL queries is successfully executed It requires no additional actions Writing to the database is complete with errors the message appears if the executing your queue of SQL queries was interrupted by an error It requires no additional actions Your SQL is empty Please specify some SQL text first the message appears if you do not enter the text for your SQL query Check if the options on the SQL queue tab are configured correctly Invalid temporary path the path to the temporary file specified by you does not exist Enter a new path in the Temporary folder field on the Errors handling tab S Yd Will be replaced by additional information 2006 2008 AGG Software
8. check the parameters of the database connection The analysis of the additional information will help you locate the error Database access error s Stop operations with the database the message appears if an error occurs during an attempt to execute an SQL query if the second variant of reacting to errors is selected The message implies a Yes or No answer The analysis of the additional information will help you locate the error Unable to verify your SQL script s the message appears when an attempt to analyze your SQL query fails Check if the syntax of your SQL query is correct Tested successfully the message appears if your database connection is successfully tested It requires no additional actions Database isn t used the message appears if the module is temporarily disabled the Temporarily disabled check box is selected or the database name field is empty Check the connection parameters Database isn t selected the message appears if the database type is not selected Check the connection parameters Database s s contains the database name The message appears if the database connection is successful Usually you see it when you call the module for the first time It requires no additional actions Invalid data block length columns d length d an internal application error It means 2006 2008 AGG Software 13 Expressions module that the data sent by the parser is in
9. current date and time The return value is with DateTime type TIME Returns current time value of DateTime type TIME S Returns a time value of DateTime type converted from the string S The format of the string S HH NN Example TIME 15 21 TIME H M S MS Returns a date value of DateTime type converted from H hour M minutes S seconds and MS milliseconds integer values Example TIME 15 21 O 0 YEAR X Returns a year part from the X value The X value should be of DateTime type Miscellaneous functions Conditional group IIF X Y Z if X boolean condition is True then evaluates and returns Y otherwise evaluates and returns Z General group MAX A B Call Max to compare two numeric values Max returns the greater value of the two MIN A B Call Min to compare two numeric values in Delphi Min returns the smaller value of the two SUM A B Equal for A B where A and B can be string or number Miscellaneous group BYTETOSTR X converts 1 byte in the array X to a unsigned byte value DOUBLETOSTR X converts 8 bytes in the array X to a double value DOUBLETOSTRBE X converts 8 bytes in Big endian order in the array X to a double value INT64TOSTR X converts 8 bytes in the array X to a 64 bit integer value INT64TOSTRBE X converts 8 bytes in Big endian order in the array X to a 64 bit integer value LONGINTTOSTR X converts 4 bytes in the array X to a 32 bit integer value LO
10. ession ARCCOS X ArcCos returns the inverse cosine of X X must be between 1 and 1 The return value is in the range 0 Pil in radians ARCCOSH X ArcCosh returns the inverse hyperbolic cosine of X The value of X must be greater than or equal to 1 ARCSIN X ArcSin returns the inverse sine of X X must be between 1 and 1 The return value will be in the range Pi 2 Pi 2 in radians ARCSINH X ArcSinh returns the inverse hyperbolic sine of X ARCTAN2 X ArcTan2 calculates ArcTan Y X and returns an angle in the correct quadrant The values of X and Y must be between 2164 and 2164 In addition the value of X can t be 0 The return value will fall in the range from Pi to Pi radians ARCTANH X ArcTanh returns the inverse hyperbolic tangent of X The value of X must be between 1 and 1 inclusive CEIL X Call Ceil to obtain the lowest integer greater than or equal to X The absolute value of X must be less than Maxint For example Ceil 2 8 2 Ceil 2 8 3 Ceil 1 0 1 CLIP X Min Max Returns Min if X lt Min returns Max if Xs Max otherwise returns X For COS X Use the COS to calculate the cosecant of X where X is an angle in radians COSH X Use the COSH to calculate the hyperbolic cosecant of X where X is an angle in radians COTAN X COTG X Call Cotan or Cotg to obtain the cotangent of X The cotangent is calculated using the formula 1 Tan X DEG X Use Deg to conver
11. installed ROD o If the module is compatible with the program its name and version will be displayed in the module list You can see examples of installed modules on fig 1 2 Some types of modules require additional configuration To do it just select a module from the list and click the Setup button next to the list The configuration of the module is described below You can see some types of modules on the Log file tab To configure such a module you should select it from the File type list and click the Advanced button 2006 2008 AGG Software Expressions module S Port options Query Parse Filter Log file Other Data query module Parser module ASCII data query and parser default dll C Parsing and exporting for data sent Parsing and exporting for data received Query Parse Filte Select data filter modules 2 ASCII data query and parser default dil x Module name AS C Expressions expressions dll C Aggregation aggregator dll Data export C Deadband deadband di Events handling Version 3 2 0 2 3 2 0 1 3 2 0 1 Fig 1 Examples of installed modules 2006 2008 AGG Software Installing Expressions cE Port options Data export Log file Select data export modules Other Module name Version C OPC server buildin dil 32014 DDE Server ddesrv dil 3 2 0 1 C Local database localdb dll 3 2 0 3
12. ion of the Random function may change between compiler versions we do not recommend using Random for encryption or other purposes that require reproducible sequences of pseudo random numbers ROUND X the Round function rounds a real type value to an integer type value X is a real type expression Round returns an Int64 value that is the value of X rounded to the nearest whole number If X is exactly halfway between two whole numbers the result is always the even number This method of rounding is often called Banker s Rounding SIGN X Use Sign to test the sign of a numeric value Sign returns 0 if AValue is zero 1 if AValue is greater than zero 1 if AValue is less than zero SIN X Use the SIN to calculate the sine of X where X is an angle in radians SINH X Sinh calculates the hyperbolic sine of X SQR X the Sqr function returns the square of the argument X is a floating point expression The result of the same type as X is the square of X or X X SQRT X X is a floating point expression The result is the square root of X TAN X TG X Tan or Tg returns the tangent of X Tan X Sin X Cos X TRUNC X the Trunc function truncates a real type value to an integer type value X is a real 2006 2008 AGG Software Expressions module 5 2 2 5 2 3 type expression Trunc returns an Int64 value that is the value of X rounded toward zero Operators subtraction multi
13. plication real division or Power raises base to any power For fractional exponents or exponents greater than 65535 Base must be greater than 0 Example x y addition lt less than lt less than or equal to lt gt inequality equality gt greater than gt greater than or equal to AND bitwise AND Operand types integer Result type integer Example X and Y DIV integer division The value of x div y is the value of x y rounded in the direction of zero to the nearest integer MOD remainder The mod operator returns the remainder obtained by dividing its operands In other words x mod y x x div y y OR bitwise OR Operand types integer Result type integer Example X or Y SHL bitwise shift left Operand types integer Result type integer Example X shl 2 SHR bitwise shift right Operand types integer Result type integer Example X shr 2 XOR bitwise XOR Operand types integer Result type integer Example X xor Y String functions SUBSTR S Index Count STRCOPY S Index Count COPY S Index Count Returns a substring of a string Copy returns a substring or subarray containing Count characters or elements starting at S Index The substring is a unique copy that is it does not share memory with S although if the elements of the array are pointers or objects these are not copied as well If Index is larger than the length of S Copy returns an emp
14. stitute for occurrences of OldPattern The comparison operation is case insensitive REPLACECHAR S OldChar NewChar Returns a string with occurrences of one substring replaced by another substring REPLACECHAR replaces occurrences of the substring specified by OldChar with the substring specified by NewChar S is the source string whose substrings are changed OldChar is the substring to locate and replace with NewChar NewChar is the substring to substitute for occurrences of OldChar The comparison operation is case sensitive TRIMRIGHT S RTRIM S Trims trailing spaces and control characters from a string TRIM S Trims leading and trailing spaces and control characters from a string Date and Time DATE Returns current date value of DateTime type DATE S Returns a date value of DateTime type converted from the string S The format of the string S DD MM YYYY Example DATE 15 01 2007 DATE Y M D Returns a date value of DateTime type converted from Y year M month and D day integer values Example DATE 2007 1 15 DAY X Returns a day part from the X value The X value should be of DateTime type GOMONTH X Y adds Y months to X date value Y may be negative or positive integer value X should be of DateTime type MONTH X Returns a month part from the X value The X value should be of DateTime type 2006 2008 AGG Software 11 Expressions module 5 2 5 NOW Returns
15. t angles measured in radians to degrees where degrees radians 180 pi EXP X Exp returns the value of e raised to the power of X where e is the base of the natural logarithms 2006 2008 AGG Software User Manual 8 FLOOR X Call Floor to obtain the highest integer less than or equal to X For example Floor 2 8 3 Floor 2 8 2 Floor 1 0 1 Note The absolute value of X must be less than Maxint FRAC X Frac function returns the fractional part of the argument X X is a real type expression The result is the fractional part of X that is Frac X X Int X HEX X Converts a X value to a hexadecimal representation LN X Ln returns the natural logarithm Ln e 1 of the real type expression X LOG Base X Log returns the log base Base of X POW Base Exponent POWER Base Exponent Power raises Base to any power For fractional exponents or exponents greater than 65535 Base must be greater than 0 POWLN2 X Power raises Ln2 base to any power For fractional exponents or exponents greater than 65535 Base must be greater than 0 RAD X Use DegToRad to convert angles expressed in degrees to the corresponding value in radians where radians degrees pi 1 80 RANDOM X Random returns a random number within the range O lt X lt Range If Range is not specified the result is a real type random number within the range 0 lt X lt 1 Note Because the implementat
16. ty string or array If Count 2006 2008 AGG Software 5 2 4 User Manual 10 specifies more characters or array elements than are available only the characters or elements from S Index to the end of S are returned FIRSTLINE S Copies all characters until first CR or LF character TRIMLEFT S LTRIM S Trims leading spaces and control characters from a string STRPOS Substr S POS Substr S Pos searches for a substring Substr in a string S Substr and S are string type expressions Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S Pos is case sensitive If Substr is not found Pos returns zero REMOVECHAR S Char Returns a string with occurrences of one character deleted REMOVECHAR deletes occurrences of the character specified by Char S is the source string whose characters are deleted The comparison operation is case sensitive REMOVENONPRINT S Returns a string with occurrences of all non printable characters with ASCII code lt 32 deleted REPLACE S OldPattern NewPattern Returns a string with occurrences of one substring replaced by another substring REPLACE replaces occurrences of the substring specified by OldPattern with the substring specified by NewPattern S is the source string whose substrings are changed OldPattern is the substring to locate and replace with NewPattern NewPattern is the substring to sub

Download Pdf Manuals

image

Related Search

Related Contents

PYLE Audio PLCD79MP User's Manual  Benutzer- und Sicherheitshandbuch  P8AP - Sensor  取扱説明書 - 三菱電機  

Copyright © All rights reserved.
Failed to retrieve file