Operation
Fieldgate FXA42
46
Hauser
Description of the units
Unless otherwise indicated, units are processed during the processing stage of the IPO
cycle .
Unit
Description
Add
A0034215
This unit performs an addition. It adds the values of its input ports and writes the total to its output
port.
The addition is performed in the largest numeric data type of all the output ports that are connected
to the input ports of the unit. All the ports of the unit adopt this data type. Input ports connected to
string output ports are treated as if they were connected to a 64-bit floating point output port.
For example, if one input port is connected to an 8-bit unsigned integer output port and another input
port is connected to an 8-bit signed integer output port, the addition is performed in an 8-bit signed
integer, and this will also be the data type for all the ports.
And
A0034216-EN
This unit performs a binary And. The operation is performed in the largest integer data type of all the
output ports that are connected to the input ports of the unit. All the ports of the unit adopt this data
type. Input ports connected to floating point or string output ports are treated as if they were
connected to a 32-bit signed integer output port.
Example:
•
0
and
0
⇒
0
•
0
and
1
⇒
0
•
1
and
1
⇒
1
•
11 (1011
2
)
and
14 (1110
2
)
⇒
10 (1010
2
)
•
5 (00000005
16
)
and
-15 (FFFFFFF1
16
)
⇒
1 (00000001
16
)
LT
EQ
GT
In1
In2
Tol
Compare
A0034217-EN
This unit represents a comparator. It compares the values of the two input ports
In1
and
In2
and
assigns values to the three Boolean outputs.
The output port
LT
is set to
1
if
In1
is less than
In2
.
The output port
EQ
is set to
1
if
In1
is equal to
In2
. A tolerance value for the equation can be specified
via the
Tol
input port. This is particularly useful for floating point values where direct comparison may
not work on account of rounding errors. With a tolerance value of
0.5
, the values
1.0
and
1.5
are
considered equal. If strings are compared, the
Tol
input port is ignored and should be left open.
The output port
GT
is set to
1
if
In1
is greater than
In2
.
The unit operates in the largest numeric data type of all the output ports that are connected to the
input ports of the unit. All the input ports of the unit adopt this data type.
Year
Month
Day
WeekDay
Hour
Minute
Second
Bitmap
Compare Time
A0034218-EN
This unit performs a time comparison. It compares the date and the time specified through its input
ports with the current local time. If the two times match, the Boolean output port is set to
1
.
The input port
Bitmap
(8-bit unsigned integer) can be used to specify which components of the date
and time should be compared; if the value
0
is set, then all the input ports are ignored and the output
port is set to
1
.
There are input ports for the following date/time components:
•
Year:
compared if bit
0
of the input port
Bitmap
(16-bit unsigned integer) is set
•
Month:
compared if bit
1
of the input port
Bitmap
is set (8-bit unsigned integer, range [1 to 12])
•
Day:
day of the month – compared if bit
2
of the input port
Bitmap
is set (8-bit unsigned integer,
range [1 to 31])
•
WeekDay:
days since Sunday – compared if bit
3
of the input port
Bitmap
is set (8-bit unsigned
integer, range [0 to 6])
•
Hour:
compared if bit
4
of the input port
Bitmap
is set (8-bit unsigned integer, range [0 to 23])
•
Minute:
compared if bit
5
of the input port
Bitmap
is set (8-bit unsigned integer, range [0 to 59])
•
Second:
compared if bit
6
of the input port
Bitmap
is set (8-bit unsigned integer, range [0 to 59])
Clk
Down
Rst
RVal
Val
Over
Counter
A0034219-EN
This unit represents a counter. Each rising edge (transition from
0
to
1
) on the Boolean input port
Clk
increases the numeric value on the output port
Val
(32-bit unsigned integer) by one. If the value on
the Boolean input port is
Down 1
, the counter value is reduced by one instead. The maximum value
that can be output on the
Val
port is
4,294,967,295 (2
32
-1)
. The minimum value is
0
. An overflow
(from 4,294,967,295 to 0 or vice versa) is indicated by the Boolean output port
Over
. Its value is
1
until the next clock pulse increases or decreases the counter value by one or the counter is reset.
If the value on the Boolean input port
Rst
is 1, the counter value is reset to the current value of the
input port
RVal
(32-bit unsigned integer).
K
Store
In
Out0
Out1
Demux
A0034221
This unit represents a demultiplexer. It copies the value of the input port
In
to the output port
Out<K>
.
The relevant output port is selected by the input port
K
(8-bit unsigned integer).
Out0
is selected if
K
equals
0
.
If the value for
K
is too low,
Out0
is selected. If the value for
K
is too high, the output port with the
highest index value is selected.
The value of the Boolean input port
Store
determines whether a previously selected output port keeps
its value (
Store 1
) or is reset to
0
(
Store 0
).
The input port
In
and all the output ports adopt the data type of the output port connected to the input
port
In
.