The OPC Gateway (Protocol converter, Data Manager) transfers data between any brand of OPC Servers or between our protocols. It functions similarly to ladder logic, except that the Gateway is event-driven and runs asynchronously. The source and trigger expression can be any arithmetic or logical expression with any number of variables.
This documents the OPC Gateway 2 features as implemented in Alpha release alpha2526M.exe (29th August 2024). Alpha release should not be used in production systems. Please report all issues immediately to support@ioserver.com. Request for new features must have at least three items accompanied by explanations for why those features are needed.
Group Definition
Group Settings
Settings
Description
Group Name
User supplied public Group Name OPC clients can access variables in the group via the Group Name
Update Rate
Acquisition rate of all items in this group in milliseconds.
Write Delay
Put a delay between each write. Delay before writing to destination or displayed
Deadband
Read data percentage deadband Only items whose value is changed by greater than the specified dead band will be transferred. Applies only to items in which the raw low and high values are defined. See addtags for information on how to set the raw low and high values in IOServer. Each brand of OPC Server has its method of setting the low and high values.
Active
Set to 0 to deactivate this group.
Copy timestamp to destination
If enabled the value, quality, and timestamp of the source is copied to the destination using IOPCAsyncIO3::WriteVQT instead of IOPCAsyncIO::Write.
Sync Read and Write
Force the use of synchronous read and write. For use with OPC Servers that do not support async or exception reporting. Sync read and write will reduce performance.
Write On Good Quality Only
Copy to the destination only if the quality of the source is good.
Allow spaces in OPC Tag
Tags must be bracketed by parenthesis when this option is enabled.
OPC 2
Force the use of OPC 2.0 even if the OPC 1.0 interface is published by the OPC Server.
Force Initial Update
Normally IOServer does not perform any polling to read values. The source OPC Server is responsible for sending all changes (including the initial read value) to IOServer. Some third-party OPC Servers do not send the initial read value to IOServer. When set to true, an async refresh is issued once at the beginning to force the OPC Server to send the initial read value.
Fuzz
Floating point number comparison tolerance
Widths
Screen space allocation Percentage allocation of screen to ListBox, Declarations and Parameters
Work Space File
Name Load data from this file at startup. Store data to this file at shutdown. Use .z extension to compress file. Use .zz extension for double compression. Otherwise, no compression is used.
Threads
Commands run in separate threads. The number of threads allocated to each group is the number of physical cores. The thread priority is idle.
Queue
Commands in execution queue
Display Precision
Significant digits Number of significant digits to use when displaying number
Display Number Base
Display values number base
Show Result Type
Show Result type
Display Elapsed time of command
Show Elapsed time
Item Definition
Each item defines the sources and destination of the data with an optional trigger expression.
Source Expression
When reading from IOServer the OPC Server Name may be omitted. The OPC Server name is anything before the '\' character. Any error detected is appended to this field. \App1\IOServer\Device1.40001 will access itemdID "Device1.40001" in the OPC Server "IOServer" on the remote computer "App1". The source expression cannot be a constant unless a non-constant trigger is specified.
Destination ItemIDs
Write to Destination ItemID whenever the value at Source is changed. Any error detected is appended to this field. Any number of destinations may be specified. Each is space-comma separated.
Trigger Expression
Copy Source to Destination only when the trigger is true or if the trigger is not specified. The trigger cannot be a constant value. Any error detected is appended to this field
Browse
Browse OPC Servers items.
Item ID
Current Item ID
Done
Use this Item ID
Test
Test if Item ID is valid
Cancel
Don't use this item ID
Error
Result of test
Available Item ID:
Click on the text to first expand the tree
Active
Set to 0 to stop this item.
Force Write
Force writes to the destination even if the value of source or trigger is not changed.
Write Delay
Delay the write by this number of milliseconds.
Write Enable Time
Writes to the destination is enabled after the configured number of milliseconds since gateway group creation. To stop writing to the destination on startup, Set the "Write Enable Time" to say 1000 ms.
Write Data Type
Convert data to this type before writing to the destination. If EMPTY is specified, then the data is converted to the destination data type.
Value
The last value read.
Time Stamp
The last time data was read. If the destination OPC Server supports IOPCAsyncIO3::WriteVQT, then the Timestamp information of the source is also copied. IOServer supports IOPCAsyncIO3::WriteVQT. If the source consists of more than one item, then the newest timestamp is used.
Quality
The last quality of this item. If the destination is a DNP Slave, the .Online of that object will be set to 0/1 if the source quality is bad/good.
Reads
Total number of reads
Writes
Total number of writes
Source and Trigger Expression
The Trigger and source expression can be any combination of comparison, logical, or arithmetic operation on OPC items from any OPC Server. ItemID must be space-separated. All operators and functions can operate on multidimensional arrays.
Gateway 1 vs Gateway 2
Gateway version
Description
Gateway 1
Gateway 2
APL (A Programing Language) operators to manipulate arrays up to 127 dimensions. Support for Complex numbers, arbitrary precision rational numbers, strings and characters. User defined nameless operators and functions. Plotting of variables. OPC clients can read and write to OPC Gateway group variables.
A=B
A==B for equality test
,
; to separate parameters in function call
stradd(A, B)
A+B to join strings
A/B
A%B for division
A mod B
A|B for modulus
not A
!A for logical not
abs(A)
+A for absolute value
pow(A,B)
A^B for power
log10(A)
10 log A for log to base 10
exp(A)
^A for exponential of A
strcmp
== <> > >= < <= eq ne gt ge lt le for string comparison
acos acosh asin asinh atanh cosh sin sinh tan tanh
A pi B for circular functions
-
use ~ to prefix negative numbers
Data Types
Data Types
Description
c128: Complex number
Two 64 bits reals
1j1 0j~1
f64: Floating point value
64 bits reals
3.14 ~2.1 3e8 3e-8
In: Arbitrary precision integer
n is the number of bits used
(2r1^3481-1)%(2r1^59-1) #A Mersenne-Fermat number
Rn: Arbitrary precision rational number
n is total number of bits used in the numerator and denominator
1,0,0:1e6r3
in: signed integer
n is the number of bits used
1 ~1
un: unsigned integer
n is the number of bits used
1 0b10 0o3 0x4
string: String
"Active" "Inactive"
char16: Character
'Red'
u1: Boolean
Binary Value
0 1
T: any data type
A:Base Precision Trend FFT :Height Type :Pen :Color
Text and Graphic Display Format
Type
Display Format
A
Values to display
Base
Number base
Precison
Number Precision
Trend
Maximum items for trends
FFT
Number of FFT slots to display
Height
% height of display to use for graphics
Type
Graphs type
Pen
Pen width
Color
Color
Graph Type
Type of graphs
Type
Graphs
0
Lines
1
Trend
2
Bar
3
Histogram
4
FFT
5
Scatter plot
0x100
Points
0x200
Lines
Array[x;y;z]: Array Indexing
The first axis is x and the last axis is z. If an axis is omitted the entire axis is selected.
((2 3 4)$+1)[0;1;]
Var[x;y;z] = expression : Assignment
a[1;] = 3 Replace 1st row of a with 3
Operators Priority (from the highest)
Operator
Description
()
Override priority
op A
Unary operators
^
Power
*
Times
%
Divide
log div |
Log, integer divide, modulus
+
Plus
-
Minus
<< >>
Left Shift, Right Shift
< <= > >= lt le gt ge
Comparison, the case is ignored in string comparison <, <=, >, >=, == and <>
== <> eq ne
Equality and non equality
bitand
Bitwise and
bitxor
Bitwise xor
bitor
Bitwise or
and
logical and
or
logical or
=<
Minimum
=>
Maximum
Unary Operators
Unary
Description
T : {op A}A
User-defined Unary Operator. A inside {} represents the left parameter of the unary operator
{(1==+/(0==A|.A))/A}1000$+2 # primes from 2 to 1000
c128 : ^A
e to the power of A. If A is a string, reverse the string
^(10$+1)
i64 : bitnot A
Bitwise not of A.
(bitnot (16 $+ 0)):2 # bitnot of 0 to 15
u1 : !A
Logical not of A.
!0 1
c128 : -A
Negative of A. if A is a string, convert string to lowercase
-(10$+1)
i64 : >=A
Ceil of A.
>= ~2.3 ~1.3 1.2 3.4
i64 : <=A
Floor of A.
<= ~2.3 ~1.3 1.2 3.4
c128 : log A
Natural logarithm of A.
log ^(10$+1)
c128 : gamma A
Complex gamma function.
gamma(20$+1)
c128 : erf A
Complex error function.
erf(10$+1)
c128 : erfc A
Complex complement of error function.
erfc(20$+1)
c128 : sqrt A
Square root of A.
sqrt(9 $+~4)
c128 : pi A
pi times A.
pi(10$+1)
c128 : conj A
Change sign of imaginary part of A.
conj (sqrt(9$+~4))
f64 : norm A
Sum of square of real and imaginary part of A.
norm (sqrt(9$+~4))
f64 : real A
Real part of A.
real (sqrt(9$+~4))
f64 : imag A
Imaginary part of A.
imag(sqrt(9$+~4))
f64 : +A
Absolute value of A. If A is string, convert A to uppercase
sqrt(A.real*A.real+A.imag*A.imag
+(sqrt(9$+~4))
u8 : number A
Convert A to integers.
number $'(6 16$+32)
char16 : $'A
Convert A to characters.
$'(14*16$+32)
string32 : $"A
Convert A to string.
$"(26$+number'A')
string32 : $=A
Number of bits in A.
$"$=1e16r1
c128 : det A
Determinant of square matrix A.
i64 : rank A
Rank of square matrix A.
f64 : rand A
Random numbers from 0 to A - 1. If A is an arbitrary-precision number greater than 15, then A is the number of bits to be generated. The most significant bit of this number will always be 1 and the method used is not seedable.
{==rand(A$6)}1e6 #count of each occurrences for 1 million dice throws
i64 : $A
The dimensions of A.
$(2 3 4 5$+1)
i64 : factors A
Factors of A.
factors 65536
T : &A
Transpose A. The axes are reversed
&(3 4$+0)
u8 : >>A
Zip A. Zip string A. Return UI1
string32 : <<A
Unzip A. Unzip UI1 A. Return a string
c128 : fft B
fft of A.
fft 1 1 1 1 0 0 0 0
c128 : mdiv B
Invert square matrix A.
mdiv (3 3$5 15 56 ~4 ~11 ~41 ~1 ~3 ~11)
T : op/A
Reduction. Apply operator op between each element of A along the last axis
+/(1e6$+1) # sum of first 1 million integers
T : op\A
Scan. Apply operator op between each element of A cumulatively along the last axis
*\(20$+1)# factorials of first 20 integers
i64 : =<A
Gradeup. Indices of values of A sorted in ascending order along the last axis
{A[=<A]}20 rand 20
i64 : =>A
GradeDown. Indices of values of A sorted in descending order along the last axis
{A[=<A]}20 rand 20
T : =>A
Maximum. Of values along the last axis.
=>5 7 9 1 2 8 0 3 6 4
T : =<A
Minimum. Of values along the last axis.
=<5 7 9 1 2 8 0 3 6 4
T : <>A
Minimum and maximum Of values along the last axis.
<>5 7 9 1 2 8 0 3 6 4
i64 : ==A
Histogram of A
==rand(1e6$6)
T : ,A
Ravel. Vector of elements of A choosen first from the last axis
,&(2 3$+0)
T : @A
Reverse of A along the last axis.
@(2 3 4 $+0)
T : :C
Optional part of conditional statement.
Binary Operators
Binary
Description
T : A{A op B}B
User-defined Binary Operator. A inside {} represents the right parameter and B represents the left parameter of the binary operator
3 {+/[0](1 pi(((A$+1 2).*((B$+0)*pi (2%B)))))} 64 #sum of first 3 odd harmonics of sine
T : A op` B
Swap A and B. Change to B op A.
12 %` (12$+1) # 1 to 12 divided by 12
c128 : A^B
A to power of B.
{(A$+1).^(A$+1)}10 # 10 power table
c128 : A*B
A times B.
{(A$+1).*(A$+1)}10 # 10 times table
c128 : A%B
A divided by B. If A and B are strings, A / "/old/new/", replace all occurences of old with new in string A
12 % (12$+1) # 12 divided by 1 to 12
c128 : A log B
Logarithm of B to base A.
(2 10) log. (10$+1) # log 2 and 10 for integers 1 to 10
i64 : A div B
Integer divide. Result is integer, A divided by B
{(A$+1).div(A$+1)}10 # 10 integer divide table
f64 : A|B
Remainder of A%B.
{(A$+1).|(A$+1)}10 # 10 remainder table
c128 : A+B
A plus B.
{(A$+1).+(A$+1)}10 # 10 plus table
c128 : A-B
A minus B.
{(A$+1).-(A$+1)}10 # 10 minus table
i64 : A<<B
Shift Left. Shift A to the left B bits
1 <<.(17$+0)
i64 : A>>B
Shift Right. Shift A to the right by B bits
65536 >>.(17$+0)
u1 : A<B
Is A less than B.
(5$+~2)<.(5$+~2)
u1 : A<=B
Is A less than or equal to B.
(5$+~2)<=.(5$+~2)
u1 : A>B
Is A greater than B.
(5$+~2)>.(5$+~2)
u1 : A>=B
Is A greater than or equal to B.
(5$+~2)>=.(5$+~2)
u1 : A lt B
Is string A less than string B.
{A lt. A}"A" "B" "C" "D" "E" "F"
u1 : A le B
Is string A less than or equal to string B.
{A le. A}"A" "B" "C" "D" "E" "F"
u1 : A gt B
Is string A greater than string B.
{A gt. A}"A" "B" "C" "D" "E" "F"
u1 : A ge B
Is string A greater than or equal to string B.
{A ge. A}"A" "B" "C" "D" "E" "F"
u1 : A==B
Is A equal to B.
(5$+~2)==.(5$+~2)
u1 : A<>B
Is A not equal to B.
(5$+~2)<>.(5$+~2)
u1 : A eq B
Is string A equal to string B.
{A eq. A}"A" "B" "C" "D" "E" "F"
u1 : A neq B
Is string A not equal to string B.
{A neq. A}"A" "B" "C" "D" "E" "F"
i64 : A bitand B
Bitwise and of A and B.
((16$+0) bitand. (16$+0)):2 # bitand table for 0 to 15
i64 : A bitxor B
Bitwise exclusive or of A and B.
((16$+0) bitxor. (16$+0)):2 # bitxor table for 0 to 15
i64 : A bitor B
Bitwise or of A and B.
((16$+0) bitor. (16$+0)):2 # bitor table for 0 to 15
u1 : A and B
Is A and B both true.
0 1 and. 0 1
u1 : A or B
Is A or B true.
0 1 or. 0 1
f64 : A=<B
Minimum of A or B.
{A=<.A}10$+0
f64 : A=>B
Maximum of A or B.
{A=>.A}10$+0
c128 : A pi B
Circular functions. A is ~7 to 7
A
Function
~7
arctanh(B)
~6
arccosh(B)
~5
arcsinh(B)
~4
(~1+B*B)^0.5
~3
arctan(B)
~2
arccos(B)
~1
arcsin(B)
0
(1-B*B)^0.5
1
sine(B)
2
cosine(B)
3
tangent(B)
4
(1+B*B)^0.5
5
sinh(B)
6
cosh(B)
7
tanh(B)
(3$+1) pi 1 # sine cosine and tangent of 1
c128 : A ja B
Order three Bessel function. Of the first kind, A is the order, B is the Complex number
c128 : A ya B
Order three Bessel function. Of the second kind, A is the order, B is the Complex number
i64 : A rand B
A random numbers choosen from 0 to B - 1. If A is greater than B, the seed is set to A
9 10 rand 10
f64 : rand[P m]p
Random numbers with P probability distribution. P is ~7 to ~1 for continuous distributions and 0 to 6 for discrete distributions
P
Generator
Range(x)
Mean
Variance
~7
Student(p)
>all x
0 for p>1
p/(p-2) for p>2
~6
Chisquare(p) p>0
x>0
p
2*p
~5
Normal(m,p)
all x
m
p*p
~4
Lognormal(m,p) m>0
x>0
^(m+p^2/2)
(^(p^2) - 1)*^ (2*m + p^2)
~3
Erlang(m,p) m>0 p>0
x>0
m*p
m*p*p
~2
Exponential(p) p>0
x>0
p
p*p
~1
Uniform(m,p) m<p
m<x<p
(m+p)/2
(p-m) ^ 2 / 12
0
Equilikely(p)
x=0..p
p/2
((p - 1) ^ 2 - 1) / 12
1
Equilikely(m,p) m<p
x=m..p
(m+p)/2
((p-m+1)^2-1)/12
2
Bernoulli(p) 0<p<1
x=0 or 1
p
p*(1-p)
3
Geometric(p) 0<p<1
x=0..
p/(1-p)
p/((1-p) ^ 2))
4
Poisson(p) p>0
x=0..
p
p
5
Binomial(m,p) 0<p<1
x=0..m
m*p
m*p *(1 - p)
6
Pascal(m,p) 0<p<1
x=0..
m*p/(1-p)
m*p/((1 - p) ^ 2))
T : A$B
Reshape B with shape A.
3 4 $1r1 1r2 1r3
i64 : A factors B
Number of factors in B. A is not used
1 factors (10 $* 1e12) # check that primes have 1 factor only
f64 : A$+B
Sequence of B with the shape of A.A$+a: increment a by 1 each subsequent time. A$+a b: increment a by b. A$+a b c: increment a by b, and increment b by c. 10$+1 # integers 1 to 10
i64 : A$*B
Sequence of next prime numbers after B with the shape of A.
10$*3e9 # The next 10 primes numbers after 3 billion
i64 : A$^B
Sequence of next probable prime numbers after B with the shape of A. Uses Miller-Rabin primality test.
1$^1e100r1 # Gooprol, the first probable prime after 1 googol
i64 : A$^[certainty baseType]B
Next probable prime numbers after B with the shape of A. Default certainty is 2.
i64 : A$?B
Probable prime numbers with B number of bits with the shape of A.
1$?256 # A random 256 bits probable prime
i64 : A$?[certainty baseType]B
Probable prime numbers with B number of bits with the shape of A. Default bases are prime numbers starting from 2. A baseType of 0, uses random bases.
T : A&B
Transpose B. The axes of B are permuted according to A
2 1 0 &(2 3 4$+1)
T : A take B
Take. Return the first (last) elements of B where A is positive (negative). If too much is taken, fill elements are used
T : A drop B
Drop. Drop the first (last) elements of B where A is positive (negative).
u8 : A encode B
Encode B with Reed-Solomon FEC. A is a three elements vector (SymbolWidth key parity), if parity is not specified, parity is 2.
u8 : A decode B
Decode B with Reed-Solomon forward error correction. A is a three elements vector (SymbolWidth key parity). key and parity are optional.
i32 : A!B
Index of. If the element in A is present in B, return its index in B. Otherwise, return the shape of B. If the size of B is one and either A or B is Integer, it return gcd(A,B)
u1 : A in B
Membership. Return 1 if the element in A is present in B. Otherwise, return 0.
c128 : A fft B
Inverse fft of B. A can be any value.
1 fft fft 0 0 0 0 1 1 1 1
c128 : A mdiv B
Matrix Equation Solver: A / B.
35 ~26 ~7 mdiv (3 3$5 15 56 ~4 ~11 ~41 ~1 ~3 ~11)
T : A op1.op2 B
Inner Product of A and B. Apply operator op2 between each element of rows of A and column of B, then operator op1 between each element of the result.The number of elements in each row and column must be equal, or one of them is of size 1
(2 3$+1)+.*(3 4$+1)
T : A op. B
Outer Product. Apply operator op between each element of A and B
Inner Reduction of A and B. Apply operator op2 between each element of rows of A and the last axis of B, then the reduction operator op1 on the result.
T : op/[k]A
Reduction. Apply operator op between each element of A along axis k
T : op\[k]A
Scan. Apply operator op between each element of A cumulatively along axis k
i64 : =<[k]A
Gradeup. Indices of values of A sorted in ascending order along axis k
i64 : =>[k]A
Gradedown. Indices of values of A sorted in descending order along axis k
T : =>[k]A
Maximum. Of values along axis k
T : =<[k]A
Minimum. Of values along axis k
T : <>[k]A
Minimum and maximum Of values along axis k
i64 : ==[bins]A
Histogram of A binned with bins slots
T : A/B
Compress. Duplicate each item in B according to the number of times specified in A along the last axis
3 2 1 0 / 3 4 5 6
T : A\B
Expand. Expand B along the last axis according to A, zeros in A indicate where fill elements are to be inserted in B
1 0 1 1 \ 'abc'
T : A@B
Rotate. Rotate vectors along the last axis of B to the left (for A > 0) or right (for A < 0)
1@(2 3 4$+1)
T : A,B
Join A and B. Along the last axis.
T : ,[k]A
Ravel. Vector of elements A choosen first from axis k
T : @[k]A
Reverse A along axis k.
"@["+$"(0 1 2)+"](2 3 4$+1)\n"
T : A B
Join A and B. Implied when A and B, are not separated an operator
1 2 0j1 3
ItemID32 : A[]=B
Assign B to variable A[].
ItemID32 : A=B
Assign B to variable A.
Ternary Operators
Ternary
Description
I32 : A^[C]B
(A^B)|C. ModPow ((1$^1e6r1)^[33](1$^1e4r1))
T : A op1/op2[k] B
Inner Reduction of A and B. Apply operator op2 between each element of rows of A and the k axis of B, then the reduction operator op1 on the result.
T : A/[k]B
Compress. Duplicate each item in B according to the number of times specified in A along axis K
T : A\[k]B
Expand. Expand B along axis k according to A, zeros in A indicate where fill elements are to be inserted in B
T : A@[k]B
Rotate. Rotate vectors along axis k of B to the left (for A > 0) or right (for A < 0)
"@["+$"(0 1 2)+"](2 3 4$+1)\n"
T : A,[k]B
Join A and B. Along axis k. If k is a fraction, a new axis of length 2 is inserted before the floor k axis, A fills the first index, B fills the second index
T : A?B:C
Conditional statement. Use B if A is true. Otherwise, use C. B or C is not evaluated if there are not used
1?4+5:6*7
Functions
Functions
Description
T : {A op B op C}(A;B;C)
User defined Function. A-Z inside {} represent the parameters to the function. Each expression inside () is separated by;
add3 = "{A+B+C}"
i32 : quality(i32)
Quality(itemID) OPC quality of itemID.
i32 : time(i64 ;i32)
Time(itemID, type) Get time from itemID according to type.
Type
Value
0
Seconds since January 1, 1970
1
Year
2
Month, 1 is January
3
Day of Week, 0 is Sunday
4
Day, 1 to 31
5
Hour, 0 to 23
6
Minute, 0 to 59
7
Seconds, 0 to 59
8
Milliseconds, 0 to 999
9
Milliseconds since Midnight
f64 : date(i64 ;i32)
Date(itemID, type) Convert time stamp of item to VT_DATE. Use UTC time for type 0. Otherwise, use local time.
string32 : strftime(i64 ;string32)
strftime(itemID , fmt) Return a string formatted according to fmt using the strftime function with itemID timestamp.
string32 : strftimeUTC(i32 ;string32)
strftimeUTC(seconds , fmt) Return a string formatted according to fmt using the strftime function with integer seconds. Seconds is the number of seconds since January 1, 1970.
lookup(source , table , index , options) Table lookup returns a changed copy of the source. Replace values in the source that matches values in the table with the corresponding value in the index. If the index is omitted, it is generated based on the number of items in the table. Options '2x' means the width of each element in the source is 2 and to use hex. If the largest value in the table is greater than the values in the index, then the most significant bit of the source is replaced with '-' then '.'. e.g. lookup(QM1538.QM.Value , '7D,05,5b,1f,27,3e,7e,15,7f,3f', '', '2x') will return -014.2 for 'fd0527db'
string32 : replace(string32 ;string32 ;string32)
replace(string, pattern, replace) Replace all patterns in string with replace.
string32 : strFmt(string32 ;f64)
strfmt(fmt , n) Return a string of real value n formatted according to fmt. Use formatting convention of printf. eg. strftime((DNPM.1.2.0.State),'%Y-%m-%dT%H:%M:%S.') + strfmt('%03.0fZ',time((DNPM.1.2.0.State),8)) to convert the timestamp to a string value.
i32 : changed(ItemID32 ;f64 ;f64 ;f64)
changed(itemID , percentDeadband, low, high) Return 1 if itemID have exceeded the percentDeadband. Otherwise, it returns 0. If percentDeadband is 0, then the timestamp of itemID must be within 3x the group update rate. If low is equal to high, then percentDeadband is the absolute deadband.
f64 : scale(ItemID32 ;f64 ;f64 ;f64 ;f64 ;f64)
scale(itemID , percentDeadband, rawLow, rawHigh, engLow, engHigh) Scales itemID and clamp the value to [engLow, engHigh] within the percentDeadband.
f64 : delta(ItemID32)
delta(itemID) Return the difference between the current value and the last value. For arrays, the sum of the absolute difference is returned.
f64 : lowpass(ItemID32 ;f64)
lowpass(itemID , unitPerSecond) Apply lowpass filtering. Reject values that changes faster than unitPerSecond.
i32 : setTime(i32 ;i32)
settime(value , type) Set the system time, if type is 0, the value is the number of seconds since January 1 1970. Otherwise, it is the number of milliseconds since midnight.
i32 : setactivestate(ItemID32 ;i32)
f64 : if(f64 ;f64 ;f64)
if(cond , x , y) return x if cond is true. Otherwise return y.
i32 : Now(i32)
now(type) Return the current time. if type is 0, the value is the number of seconds since January 1 1970. Otherwise, it is the number of milliseconds since midnight.
f64 : j0(f64)
f64 : j1(f64)
f64 : jn(i32 ;f64)
f64 : y0(f64)
f64 : y1(f64)
f64 : yn(i32 ;f64)
f64 : rgamma(f64)
f64 : factorial(f64)
f64 : atan2(f64 ;f64)
Keyboard short cuts
ShortCuts
Description
ctr + x
Delete line, Push it to deleted stack and clipboard
ctr + v
Paste line, Insert before current position from deleted stack
ctr + c
Copy line, Push it to deleted stack and clipboard
ctr + d
Delete line
ctr + e
Copy all lines to clipboard, Copy text from Operators, Functions or Help instead if they are selected
ctr + f
Copy all lines including result
ctr + j
Activate line, move forward one line
ctr + k
Activate line, move backward one line
ctr + r
Activate all lines
ctr + l
Clear all results
ctr + q
Activate or Inactivate line
ctr + s
Save Save variables and previous commands to Work Space File
ctr + y
Expand rows to fit screen
ctr + +
Increase font size by 5%
ctr + -
Decrease font size by 5%
F3
Search Go to the next line that matches the characters typed in the search box
F4
Next Error Go to the next line with an error.
F5
Sort Declarations
Sort
Order
^t
Ascending by elapsed time
vt
Descending by elapsed time
^
Ascending
v
Descending
Enter
Activate lines at input
Home
Go back 500 lines
Page Up
Go back 50 lines
Up
Move up one line
Down
Move down one line
Page Down
Move forward 50 lines
End
Move forward 500 lines
Escape
Clear input
Tab
Tab between input and command list
# prefix
Line is activated, This line will run at startup
) prefix
Line have a result
Verification and Validation
The configuration file verify.io is used to verify the correct operation of all aspects of the OPC Gateway.
Read Item History
The last 16 changes of the read items are displayed.
Time
Time the read value was acquired.
Delta (ms)
Time difference from previous read.
Read
Value and itemID of read
Quality
Quality of read value.
Time Stamp
Time stamp of read value.
Write
Value and status of write
Reserved
Not used.
FAQ for OPC Gateway
Q: In the OPC Gateway, tags from some non-IOServer OPC Servers have very long names, is there a way of having shortcuts to reference these tags?
A: You can define your structured tags by using the user-defined tag list as described in addtags to reference these tags in the OPC Gateway. The prefix "tags." can be omitted.
Q: Can we set a deadband on the DNP3 point or only in the OPC gateway group?
A: The %deadband of an OPC Group specifies the deadband of each source item in that group. The deadband will only work for items that have specified their low limit and high limit. In IOServer the low and high limits are specified in the item name.
e.g in "Device1.30.5.1,,0,2000"
The low limit is 0 and the high limit 2000. See addtags for more information. For source items from OPC Servers that do not define their low and high limit. You can use the Changed function in the OPC Gateway.
e.g.
Source Expression: TestTag1
Destination: Device1.20.5.1
Trigger: Changed(TestTag1 ,1,0,2000)
Note that the space character before the comma stops IOServer from interpreting ",1,0,2000" as part of TestTag1
Q: How do I set a tag(TagIsAlive) to false when the tag (TagMonitored) has not changed for 60 seconds?
A: Set the Gateway group update time for TagMonitored tag to 20 seconds.
Source Expression: Changed(tagMonitored , 0, 0, 0)
Destination: TagIsAlive
Trigger Expression: ChangingTag
ChangingTag is a value that changes every say 10 seconds to make sure that the Changed function is evaluated periodically. Use the OPC Explorer.PLC Simulator to write to ChangingTag every 10 seconds.