EngeeComms.ErrorRateCalculation
Calculates a bit or character error in the input data.
Library |
|
Block |
Description
The system object EngeeComms.ErrorRateCalculation compares input data from the transmitter with input data from the receiver. The object calculates the error rate as a running statistic by dividing the total number of unequal pairs of data items by the total number of input data items from the same source.
You can use this system object to calculate the error rate by character or bit because it does not consider the magnitude of the difference between input data items. If the input arguments are bits, the object calculates the error rate on a bit-by-bit basis. If the input arguments are characters, the object calculates the character error rate.
To compare the input data from the transmitter with the input data from the receiver, perform the following steps:
-
Create an object EngeeComms.ErrorRateCalculation and set its properties.
-
Call the object with arguments as if it were a function.
To learn more about how to work with system objects, see Engee system objects.
Syntax
Creation
-
errcalc = EngeeComms.ErrorRateCalculation()
creates a system object to compare data from the transmitter with input data from the receivererrcalc
with by default properties.Example:
errcalc = EngeeComms.ErrorRateCalculation()
-
errcalc = EngeeComms.ErrorRateCalculation(Name=Value)
creates aerrcalc
system object with the specifiedName
property set to the specifiedValue
value. You can specify additional arguments as a name-value pair in any order (Name1
=Value1
,…,NameN
=ValueN
).Example:
errcalc = EngeeComms.ErrorRateCalculation(ReceiveDelay=5)
Arguments
Input arguments
Tx — transmitted data
scalar
| vector-column
Details
Transmitted data as a scalar or vector-column.
If you specify Tx or Rx input as a scalar, the block compares this value with all elements of the other input. If you specify both inputs as vectors, they must have the same size and data type. |
Типы данных |
|
Rx — received data
scalar
| vector-column
Details
Received data as a scalar or vector-column.
Типы данных |
|
Output arguments
Out -.
difference between transmitted and received data
`vector-column
Details
The difference between the transmitted and received data returned in the form of a vector-column [R; N; S]
, where:
-
R
- error rate. -
N
- number of errors. -
S
- number of samples to be compared.
Dependencies
To use this argument, set the property OutputData property Port
.
Типы данных |
|
Properties
#
ReceiveDelay —
resulting signal delay
Int64 integer
Details
The number of samples by which the received data lags behind the transmitted data as a non-negative integer. Use this property to align the samples for comparison in the transmitted and received input data vectors.
Типы данных |
|
#
ResetPort —
description missing
Logical
Details
Description missing
#
ComputationMode —
comparison method
String
Details
Specify the method of comparing data samples:
-
Entire frame
- compare all samples of received data with samples of transmitted frame.Типы данных String
#
StopSimulation —
simulation stop
Logical
Details
Stops the simulation after a specified number of errors or comparisons.
#
OutputData —
data output method
String
Details
Specify the method of data output.
#
ComputationDelay —
calculation delay
Int64 integer
Details
The number of data samples that the object ignores at the beginning of the comparison as a non-negative integer. Use this property to ignore the transient behaviour of both input signals.
Типы данных |
|