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.
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.
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.
|
Operator |
Function |
Description |
|
Standard Operators |
||
|
+ |
add |
addition and unary positive |
|
– r – |
Substract and negative |
subtraction and negation |
|
o |
Multiply |
multiplication |
|
r÷ |
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:
Otherwise (!) is always treated as factorial and the negating token ¬ as logical NOT.
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.
Click on OK after completion to see the expression in the Tag(Address) field.
Vídeňská 186/118
619 00 Brno
Czech Republic
Company ID: 276 52 203
TIN: CZ27652203
We often send out our newsletter with news and great offers. We will never disclose your data to third parties and you can unsubscribe from the newsletter at any time.
Unfortunately, we’re unable to offer free samples. As a retailer, we buy all magazines from their publishers at the regular trade price. However, you could contact the magazine’s publisher directly to ask if they can send you a free copy.
You can create a new account at the end of the order process or on the following page. You can view all of your orders and subscriptions in your customer account. You can also change your addresses and your password.
No, you don’t have to create an account. But there are a few advantages if you create an account.
You never have to enter your billing and shipping address again
Find all of your orders, subscriptions and addresses in your account
Download invoices of your orders
No, we don’t have a physical store location at the moment. We accept only orders through our online shop and we’re shipping all orders with the Swiss Post Service. Please visit our shipping section for more details.
From time to time you will find us at design fairs and popup markets in Switzerland. Subscribe to our newsletter and you’ll receive the latest news.
We often send out our newsletter with news and great offers. We will never disclose your data to third parties and you can unsubscribe from the newsletter at any time.
Unfortunately, we’re unable to offer free samples. As a retailer, we buy all magazines from their publishers at the regular trade price. However, you could contact the magazine’s publisher directly to ask if they can send you a free copy.
You can create a new account at the end of the order process or on the following page. You can view all of your orders and subscriptions in your customer account. You can also change your addresses and your password.
No, you don’t have to create an account. But there are a few advantages if you create an account.
You never have to enter your billing and shipping address again
Find all of your orders, subscriptions and addresses in your account
Download invoices of your orders
No, we don’t have a physical store location at the moment. We accept only orders through our online shop and we’re shipping all orders with the Swiss Post Service. Please visit our shipping section for more details.
From time to time you will find us at design fairs and popup markets in Switzerland. Subscribe to our newsletter and you’ll receive the latest news.
You must be logged in to view this form.
Enter your e-mail address and we will send you a link to reset your password.