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.
OpNI6602 PWM In
Block
Mask
Description
This block reads the pulse width of a signal connected to the GATE pin of one counter/timer of National Instruments NI6602 card.
Depending on the options selected in the mask, the pulse width measured is returned in seconds, or as a duty ratio.
Parameters
Bus Type | This popup menu enables the user to select the bus type of the target computer where the NI6602 card is installed. The options are PCI or PXI. |
---|---|
PCI index | Enter the PCI index (see definition)of the card on the PCI (or PXI) bus. |
Counter | Specify the counter to which gate pin the input signal is connected. |
Clock Source | Three clock sources are available: 100 KHz, 20 MHz and 80MHz. This selection has a direct impact on the timing precision of the measurement. |
Polarity | Select which polarity of the signal will be measured - high or low. |
Output unit | Unit of the measurement returned at the PWM outport. The choices are second, i.e. raw measurement of the pulse width of the signal, or a ratio (%), i.e. duty ratio of the pulse relative the frequency of the signal. In the latter case, the frequency of the signal must be determined by one of the two methods provided with the Frequency parameter (see below). |
Frequency | This parameter appears only when the Output unit parameter is set to the ratio (%). Two methods can be used to determine the frequency of the signal. When the Use input value option is selected, the frequency value must be provided at the Freq inport (see Inputs section below). When the Measure signal frequency option is selected, the counter is set in Frequency Input measurement mode (similar to the Op NI6602 Freq In block) while the Cmd inport is set to 0. This frequency value is then used for calculating the duty ratio returned at the PWM outport. |
Digital Filter | This parameter allows each GATE input pin to be passed through or digitally filtered to remove noise. The digital filter sample the signal using Timebase 3, and upon detecting a state change, require it to be in the same state for a minimum pulse width of 5µs, 1µs,500ns or 100ns. |
Synchronize | see definition. |
Inputs
When the Output unit parameter is set to second, this block has no inputs. When this parameter is set to ratio (%), the block has one input. This input is named Freq or Cmd depending on the choice of the Frequency parameter.
Freq | When the Frequency parameter is set to Use input value, the frequency of the signal to be measured must be provided at this input. For example, this value can come from the output of an Op NI6602 Freq In block. |
---|---|
Cmd | When the Frequency parameter is set to Measure signal frequency, the counter is initialized in frequency measurement mode and remain in this mode while the input value is 0. The first time the input value goes from 0 to 1, the counter is reinitialized in pulse width measurement mode and the last measured frequency is used to determine the duty ratio of the signal. |
Outputs
PWM | Returns the measured pulse width, in seconds or as a duty ratio. This outport returns a0 value when the counter is set in frequency measurement mode (see the description of the Cmd input above). |
---|---|
Status | This output returns 1 if a new PWM measurement was completed during the previous step, it returns 0 if no new measurement was latched (the PWM output was measured during some previous timestep), and it returns 2 if we can not be sure whether the current PWM value is new or not. This can occur when the pulses to be measured are short compared to the time step, and when the period of the signal is shorter than the time step. |
Since last | Returns the time elapsed, in seconds, since the last edge that started a PWM measurement. |
Freq | This output appears only if the Output unit parameter is set to ratio (%) and the Frequency parameter is set to Measure signal frequency. It returns the last measured frequency of the signal, in Hz. |
Characteristics and Limitations
Connections Requirements
Connect the input signal to be measured to the GATE pin of the selected counter.
Connector Pin Assignments
Pin | Description | Pin | Description |
---|---|---|---|
1 | +5V | 35 | RG |
2 | SOURCE(0) | 36 | GND |
3 | GATE(0) | 37 | Reserved |
4 | Reserved | 38 | Reserved |
5 | OUT(0) | 39 | GND |
6 | UP_DOWN(1)/AUX_LINE(1) | 40 | UP_DOWN(0)/AUX_LINE(0) |
7 | SOURCE(1) | 41 | GND |
8 | GATE(1) | 42 | GND |
9 | OUT(1) | 43 | RG |
10 | PFI_0 | 44 | PFI_1 |
11 | GND | 45 | PFI_2 |
12 | PFI_3 | 46 | GND |
13 | PFI_4 | 47 | PFI_5 |
14 | GND | 48 | PFI_6 |
15 | PFI_7 | 49 | GND |
16 | OUT(7) | 50 | GND |
17 | UP_DOWN(7)/AUX_LINE(7) | 51 | GATE(7) |
18 | GND | 52 | SOURCE(7) |
19 | RG | 53 | OUT(6) |
20 | GND | 54 | UP_DOWN(6)/AUX_LINE(6) |
21 | GATE(6) | 55 | GND |
22 | SOURCE(6) | 56 | RG |
23 | OUT(5) | 57 | UP_DOWN(5)/AUX_LINE(5) |
24 | GND | 58 | GATE(5) |
25 | SOURCE(5) | 59 | GND |
26 | OUT(4) | 60 | UP_DOWN(4)/AUX_LINE(4) |
27 | GND | 61 | GATE(4) |
28 | SOURCE(4) | 62 | GND |
29 | OUT(3) | 63 | UP_DOWN(3)/AUX_LINE(3) |
30 | GND | 64 | GATE(3) |
31 | SOURCE(3) | 65 | GND |
32 | OUT(2) | 66 | UP_DOWN(2)/AUX_LINE(2) |
33 | GND | 67 | GATE(2) |
34 | SOURCE(2) | 68 | GND |
Direct Feedthrough | No |
---|---|
Discrete sample time | No |
XHP support | Yes |
Work offline | No |
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