Title of your website

myDESIGNER USER MANUAL
  1. Introduction
    1. About myDESIGNER
  2. Tutorial videos
    1. myDESIGNER
    2. myREPORTS
    3. myMOBILE
  3. Getting started with myDESIGNER
    1. Creating a project
    2. Workspace management
  4. Checking project
  5. Projects’ visual appearance
  6. GUI/HMI Editor
    1. Creating views
    2. Selecting objects
    3. Drawing primitives
    4. Creating text elements
    5. Insert image
    6. Poly-lines
    7. Moving objects
    8. Resizing objects
    9. Rotating objects
    10. Skewing objects
    11. Filleting
    12. Combining objects
    13. Fill and stroke
    14. Rulers and guides
    15. Layers
    16. Copying and pasting elements
    17. Object's order
    18. Grouping
    19. Repeated actions mode
    20. View scripts
    21. Used tags
    22. Zoom on zone
    23. Undo and redo
    24. View properties
  7. Components
    1. Default components
    2. Custom components
    3. Used components
    4. Editing components
    5. Replacements
    6. On touch actions
    7. Entering advanced functions (equations)
  8. Components library
    1. Combo box, List box and Text box
      1. Inserting into view
      2. Components parameters
      3. Using components in view scripts
      4. Supported functions
    2. Chart component
  9. Active area
    1. Introduction
    2. Creating active areas
    3. External web page in active area
    4. HTML code
    5. DIV type
  10. Layout views
    1. Page layout
    2. Adding layout view
    3. Creating new layout
  11. Entering tags and math expressions
    1. Entering tags
    2. Entering mathematical expressions
  12. Tree tags database
    1. Changing tag value
    2. Engineering units
    3. Filtering data
    4. Usage count
    5. MS Excel import and export
    6. Tag import
    7. Deleting unused tags
    8. Restoring tag database
    9. Specifying a new tag during development
  13. Formatting numerical values
  14. Linking views with PLC
    1. Introduction
    2. Animations
    3. Show value animation
    4. Value to text mapping animation
    5. Visibility animation
    6. Opacity animation
    7. Color animation
    8. Moving animation
    9. Size animation
    10. Scale animation
    11. Rotate animation
    12. Circular sector animation
    13. Zoom visibility animation
    14. Sounds
    15. Sounds triggered by tag value
    16. Effects
  15. Time Sequence
    1. Example
    2. Triggering time sequences
    3. Modifying time settings
    4. Adding new sequences
    5. Renaming time sequence
    6. Switching among time sequence
    7. Modifying timing
    8. Combining multiple time sequences
  16. Open command
    1. Open type
    2. Target
    3. Popup (face plate) window
    4. View type
  17. Write/Set command
    1. Using batches
    2. Specifying set command parameters
    3. Value options
  18. Scaling set values
    1. Set example
  19. Key shortcuts
  20. On touch
    1. On touch in views
    2. On touch in component
    3. On touch example
    4. Lock element
    5. Lock key
    6. Slider
  21. Parametric views
    1. Opening parametric views
    2. Symbolic text replacements
    3. Symbolic tag creation
    4. Replacing connections
    5. Nesting parametric views
    6. Usage example:
  22. View scripts
    1. Using script in views
    2. Declaring variables
    3. Script writing
    4. Using variables in animations and effects
    5. Debugging view scripts
    6. Using debug screen on your view
    7. Using web browsers integrated debugger
    8. Using JavaScript libraries - Includes
    9. Linking external JavaScript libraries – Remote includes
  23. View scripts - list of functions
    1. Dealing with elements
    2. ListBox, TextBox and ComboBox functions
    3. Animations
    4. Effects
    5. Error frames
    6. Zoom
    7. Open command
    8. Users, language and login
    9. Retrieving files
    10. Communicating with server side scripts
    11. Tables
    12. Alarms and aggregated alarms
    13. Data - Log data
    14. Custom charts
    15. Tag info
    16. Other useful functions
  24. Documents
  25. Reports
    1. Creating report templates
    2. Designing report
    3. Inserting text
    4. Adding picture – logo
    5. Table data
    6. Table summary
    7. Previewing report during design
    8. Showing report in runtime
    9. Creating custom report in runtime
    10. Creating report on demand
  26. CAS alarms
    1. Digital alarms
    2. Analog alarms
    3. Alarm window
    4. Alarm history
      1. CAS alarms occurrence - Chart/Table
    5. CAS alarms in view - example
    6. CAS alarms preview of appearance
  27. Data logging
    1. Data - logs
    2. Defining connection
    3. Defining data points
    4. Continuous data logging
    5. Triggered data logs
    6. Triggered logging example
    7. Simple periodic export to CSV and Microsoft Power BI
    8. Data-logs properties
  28. Data - Log views
    1. Data points selection
    2. Data grouping
    3. Filtering data
    4. 3D chart
    5. Data-logs preview - appearance editor
  29. Aggregated data logs
    1. Creating aggregated data log
    2. Aggregated values:
    3. Time aggregates
    4. Value change aggregates
    5. Aggregates based on alarm activation
    6. Running the aggregation periodically
  30. Advanced trends
    1. Using multiple axes
    2. Advanced trends – visual appearance
    3. Gantt chart
  31. Connections
    1. Creating new connection
    2. Creating PLC type connection
    3. Creating database type connection
    4. Creating IoT type connection
    5. Deleting connections
    6. Advanced options - optimizations
  32. User accesses
    1. Access levels
    2. Access groups
    3. User accounts
    4. Limiting access for whole project
    5. Limited access for views and trends
    6. Limited access of arbitrary object in views
    7. User edit in runtime
    8. RFID
  33. Multi - language support
    1. Providing translations inside a project
    2. Translating names of Views
    3. Translating Data - logs
    4. Translating CAS alarms
    5. Translating advanced trends
  34. Server-side scripts
    1. Introduction
    2. Server-side scripts folder
    3. Server-side scripts folder structure
    4. Variables tables
    5. Script data-logs
    6. Global variables
    7. Sources folder
    8. Organizing project into modules
    9. Importing modules
    10. Using the event-driven asynchronous callbacks
    11. Creating server side reports
    12. mySCADA specific functions
    13. Debugging
    14. Script status (on myBOX devices only)
    15. Ser2Net (on myBOX devices only)
  35. View and server side scripts – common tasks
    1. Graphical guides
    2. Read/Write data from/to PLC
    3. Generating report
    4. Other guides
    5. Server side scripts – examples
    6. Reading data from PLC
    7. Writing data into PLC
    8. Timers – eg. run code in given time intervals
    9. Scheduled execution e.g run code every Monday at 2:00 PM
    10. Generating a report at given time interval
    11. Limiting access to generated files
    12. Processing data-log data
    13. Exporting data-log data into CSV files
    14. Using virtual PLC
    15. Sending data from view script into server side scripts
  36. Devices
  37. EtherNet/IP driver
  38. MicroLogix and SLC driver
  39. Modbus driver
    1. Tag name syntax
    2. 32-bit registers in Modbus
    3. Floating point numbers
    4. 32-bit integers
    5. Address mapping
    6. Signed and unsigned numbers
  40. Siemens S7 family PLCs driver
    1. Memory types
    2. S7 data types
    3. S7 1200/1500 notes
    4. Protection
    5. LOGO! 0BA7/0BA8 configuration
    6. S7-200 (via CP243-1) configuration
  41. OPC UA driver
    1. Connection configuration
    2. Tag name syntax
  42. MELSEC-Q driver
    1. Tag name syntax
    2. Connection settings
  43. SigFox driver
    1. Datatype
    2. Reverse order
  44. Databases driver
    1. Reading values from SQL database
    2. Examples
    3. Writing values to SQL database
    4. Using SQL connectivity in Server Side Scripts
  45. Download/Upload from/to device
    1. Download to device
    2. Upload from device
  46. Recipes
  47. Running hours
  48. Timeline
  49. mySCADA TIA portal connector

11.2.Entering mathematical expressions #

Instead of writing the tag name, you can enter mathematical expressions. This way you can scale and offset the values read from the PLCs or create more complex data processing. These expressions can be entered either directly or through the dialog window.

11.2.1

 

11.2.2

 

In the equations you can use operators + – * / and common mathematical functions such as sin, cos, exp, etc  You can also do a binary comparison and much more. To get the complete list of options, call the Tag Dialog and click on the tab Equation.

11.2.3

 

Formatting and Limits

  • Tag name is entered by the adr() function
  • Tag name can be also entered as an alias using the alias() function
  • You can use only supported functions and operators

 

The supported functions and operators are listed under the input box and are broken down into five groups: Oper, Func, Trig, Vers, and Const – they will be inserted into the box if selected.

You can use multiple tags in an expression.

Example:

  1. We read a value from Modbus H:0
  2. Let’s scale this value by 10 and offset it by 0.5
  3. Formula to enter is: =10*adr(H:0)+0.5

Supported Functions and Operators:

Operator

Function

Description

Standard Operators

+

add

addition and unary positive

– r –

Substract and negative

subtraction and negation

o

Multiply

multiplication

Divie

division

 

Percnt

modulus and percentage of a value

!

Facoial

factoria

**

Po

exponential

 

Deg

converts values to radians

Bitwise Operators

&

An

btise and

|

Or

bitwise or

^

Xor

bitwise xor

~

Not

bitwise not

<< 

Ishift

bitwise left shift

>> 

Rshift

bitwise right shift

Comparison Operators

=

I_eq

equal

!=

I_neq

not equal

I_It

less than

I_gt

greater than

<= or ≤

I_toe

greater than or equal

>= or ≥

I_gtoe

greater than or equal

Logical Operators

&& or _

I_and

logical and

|| or _

I_or

logical or

! or ¬

I_not

logical not

 

Degree operator °

The degree operator (°) is very useful when converting user input. Because all of the trigonometric functions require their parameters to be in radians, the degree operator will convert its operand into radians. Thus, 45° is equivalent to dtor(45).

Percentage sign %

When the percent sign is interpreted as the modulo, then:

10 % 3 … evaluates to 1 (the remainder after 10 is divided by 3); however, if you flip the switch to make the % sign stand for percentage, then it becomes:

250 + 10%

By default, the percentage sign % is usually shorthand for “/100”. In other words, 42% becomes 42/100 or 0.42.

However, if the % term on the right-hand side of subtraction or addition (such as in “250 + 10%”), then the percent is evaluated as a percentage of the left-hand side (i.e. “250 plus 10% of 250”).

If you choose to interpret the percent sign as the modulo operator, you can still request a percentage by using the function name directly:

(10 % 3) + percent (50) = 1.5

Factorial and Logical Not (!)

Differentiating between factorial (!) and logical NOT (!) is more difficult.

Logical NOT is interpreted as factorial (!) only if:

  • it is the first token
  • it is preceded by a binary operator
  • it is preceded by a right associative unary operator

Otherwise (!) is always treated as factorial and the negating token ¬ as logical NOT.

Supported Functions

Functions using more than one parameter:

  • sum() – returns a sum of the passed parameters
  • count() – returns the number of passed parameters
  • min() – returns the minimum of the passed parameters
  • max() – returns the maximum of the passed parameters
  • median() – returns the median of the passed parameters
  • stddev() – returns the standard deviation of the passed parameters
  • average() – returns the average of the passed parameters
  • random() – returns a random integer. Can take 0, 1, or 2 parameters. The first parameter (if given) is the lower bound of the random integer. The second parameter (if given) is the upper bound of the random integer.
  • nthroot() – returns the nth root of a number; for example, nthroot(27,3) returns the cube root of 27, or 3.

Functions using one parameter:

  • sqrt() – returns the square root of the passed parameter
  • log() – returns the base 10 log of the passed parameter
  • ln() – returns the base e log of the passed parameter
  • log2() – returns the base 2 log of the passed parameter
  • exp() – returns e raised to the power of the passed parameter
  • ceil() – returns the passed parameter rounded up
  • floor() – returns the passed parameter rounded down

Trigonometric functions:

  • sin(), cos(), tan()
  • inverses (asin, acos, atan)
  • reciprocals (csc, sec, cotan)
  • reciprocals of the inverses (acsc, asec, acotan)
  • hyperbolic variations (sinh, cosh, tanh, asinh, acosh, atanh, csch, sech, cotanh, acsch, asech, acotanh)
  • versine functions (versin, vercosin, coversin, covercosin, haversin, havercosin, hacoversin, hacovercosin, exsec, excsc, crd)
  • dtor() – converts the passed parameter from degrees to radians
  • rtod() – converts the passed parameter from radians to degrees

Functions using no parameters (“constant functions”):

  • phi() – returns the value of ϕ (the Golden Ratio), also recognized as ϕ()
  • pi() – returns the value of π. Also recognized as π()
  • pi_2() – returns the value of π/2
  • pi_4() – returns the value of π/4
  • tau() – returns the value of τ. Also recognized as τ()
  • sqrt2() – returns the value of the square root of 2
  • e() – returns the value of e
  • log2e() – returns the value of the log base 2 of e
  • log10e() – returns the value of the log base 10 of e
  • ln2() – returns the value of the log base e of 2
  • ln10() – returns the value of the log base e of 10

The parentheses are used for grouping sub-expressions and setting the order of execution, and they can be nested to any depth. All computation is carried out with a double precision floating point. In the case of error, the editor shows a warning, and the error expressions will not be evaluated.

You can always check the validity of the entered expression Clicking on the Test button.

11.2.4

 

Click on OK after completion to see the expression in the Tag(Address) field.

Examples of valid expressions:

  • adr(N100:0)*adr(F30:10)
  • sin(adr(N100:0))+cos(adr(F30:10))
  • median(adr(N100:0),adr(F30:10),adr(N20:5),adr(F10:10))

 

  • Note: Multiple arguments should be separated with commas 2>=1. Logical operations always return binary result (0 or 1).
Suggest Edit