Documentation Home Page ◇ RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Digital Input Threshold Configuration
Note that the OP5369 card does not support this feature.
Block
Mask
Description
This block can be used into an RT-LAB model to control the low and high voltage threshold values of a 32 channels digital input card equipped with this functionality. From the model, the user can control the voltage at which input should be returned as a low level (0) or a high-level value (1) to the model.
As an example, if the low voltage threshold of a given channel is configured to 2V and the voltage applied to this digital input changes from 12V to 3V, the model will continue to receive a high-level value (1) for this channel. But if the low-level threshold is configured to 5V for the same channel, the model will receive a low-level value (0) because the voltage (3V) will cross the configured threshold (5V).
The principle is the same for the high voltage threshold value. If the high voltage threshold of a given channel is configured to 15V and the voltage applied to this digital input changes from 5V to 12V, the model will continue to receive a low-level value (0) for this channel. But if the high-level threshold is configured to 10V for the same channel, the model will receive a high-level value (1) because the voltage(12V) will cross the configured threshold (10V).
All thresholds are configured in a group of 4 channels. For a 32 channels cards, the bloc has 8 input signals for the low-level thresholds and 8 input signals for the high-level thresholds. The first signal of the low-level threshold input sets the low-level threshold of channels 0, 1, 2 and 3. These channels must share a common threshold. The first signal of the high-level threshold input sets the high-level threshold of channels 0, 1, 2 and 3. And so on.
The low-level threshold of a given group of 4 channels must not be higher than the high-level threshold for the same group. The high-level threshold of a given group of 4 channels must not be lower than the low-level threshold for the same group. If the configuration is wrong for a given group of 4 channels, it will be indicated by the status outputs (see Outputs section for more details).
All the threshold values can be changed dynamically during the simulation.
Parameters
Controllername | Specify the name of the OpCtrl block tied to the FPGA that controls the digital input cards with configurable thresholds. It is mandatory that the OpCtrl block referenced in this filed comes from the 'rtio_opalrt_common' library. Also, the 'Digital Input threshold configuration' must be placed in the same subsystem than the referenced OpCtrl block. |
---|---|
LoadInport | Specify the port number of the LoadIn block that will receive the threshold values. This port number must match with the LoadIn port configured for the digital input card block of the FPGA model. |
Cardtype | Select the type of digital input card to configure. Actually, only the OP5363 digital input card can handle configurable thresholds but additional cards might support this functionality in the future. |
Inputs
Low voltage threshold: A vector of 8 values must be connected to this input. Each signal controls the low threshold value of a group of 4 channels:
Vector index | Channels |
---|---|
0 | 0, 1, 2, 3 |
1 | 4, 5, 6, 7 |
2 | 8, 9, 10, 11 |
3 | 12, 13, 14, 15 |
4 | 16, 17, 18, 19 |
5 | 20, 21, 22, 23 |
6 | 24, 25, 26, 27 |
7 | 28, 29, 30, 31 |
High voltage threshold: A vector of 8 values must be connected to this input. Each signal controls the high threshold value of a group of 4 channels:
Vector index | Channels |
---|---|
0 | 0, 1, 2, 3 |
1 | 4, 5, 6, 7 |
2 | 8, 9, 10, 11 |
3 | 12, 13, 14, 15 |
4 | 16, 17, 18, 19 |
5 | 20, 21, 22, 23 |
6 | 24, 25, 26, 27 |
7 | 28, 29, 30, 31 |
Outputs
Status: A vector of 8 status values is returned to the model. This vector can be used to report the wrong threshold configuration. Each signal represents the status of the configured threshold for a 4-channel group.
If the status is 0, the configuration is correct for this group and the configured thresholds are applied to this group for this 4-channel group.
If the status is different than 0, it means the low-level threshold value configured for the corresponding 4-channel group is equal or higher than the high-level threshold value configured for the same 4-channel group. This setting is invalid and in this case, both low level and high-level thresholds are set to the same value, which is the high-level value. This value is returned in the status vector.
As an example, if a low-level threshold of channels [0, 1, 2, 3] is configured to 5V and the high-level threshold is configured to 10V, the status returned (first signal of the status output vector) will be 0 because this configuration is correct. But if the low-level threshold of channels [0, 1, 2, 3] is configured to 5V and the high-level threshold is configured to 3V, the status returned will be 5. It means that in this case, for this 4-channels group, the low and high-level thresholds applied is 5V.
Characteristics and Limitations
- Controller bloc: The bloc must be used in combination with an OpCtrl from the Opal-RT library that can be used will all the FPGAs (c9mmon) and NOT with an OpCtrl block from the libraries specific to a given FPGA (i.e OP5152, ML605, OP7161)
- FPGA: The bloc can only be used with FPGAs that supports the selected digital input cards with a configurable threshold.
Example
In the example above, low threshold values of channels [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15] are configured at 5V. Channels [16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31] are configured with a low threashold values of 3V.High threshold values of channels [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15] are configured at 12V. The remaining channels are are configured with high threshold values of 10V.
In the case of this example, assume the initial voltage applied to all digital input channels are 0V. All channels will report low-level value (0) to the model. If the voltage applied to all channels changes from 0V to 11V, only channels [16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]will report high-level values (1) to the model since their high threshold (10V) has been crossed.
If the voltage applied to all channels changes from 11V to 15V, all the channels will report high-level values (1) to the model.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter