Documentation

NAII 76CS1 S/D

NAII 76CS1 S/D block

Library

Simulink® Real-Time™ Library for NAII

Scaling Input to Output

Hardware Input

Block Output Data Type

Scaling

Synchro or Resolver

Double

position: radians
velocity: radians/second

Block Parameters

Channel vector

Enter a vector of numbers to specify the input channels. For example, to use the measurement (S/D) channels 1 and 4, enter

[1, 4]

The channel numbers can occur in arbitrary order. The maximum allowable channel number can be 0, 2, 4, or 8 depending on the board type.

Two-speed ratio vector (1: single speed; greater than 1: two-speed)

Enter a two-speed ratio vector of integers greater than 0. This must be either a scalar or a vector the same length as the Channel vector value.

The two-speed ratio is normally 1 unless you are using a contiguous odd-even channel pair (such as 3 and 4) as a single two-speed channel. In this case, the two-speed ratio represents the gear ratio between the odd (coarse) and even (fine) channels of the pair. Include only the even member of a two-speed channel pair in the Channel vector. For example, if you want to use channels 3 and 4 as a two-speed channel geared in the ratio of 36:1, perform the following:

  • Add the value 4 (but not the value 3) to the Channel vector value

  • Set the corresponding Two-speed ratio vector value to 36

High resolution vector (0: 16-bit; 1:24-bit)

Enter a high resolution vector for the channels. This must be a scalar or a vector the same length as the Channel vector value. Enter one of the following values:

  • 0 — Specifies a 16-bit channel

  • 1 — Specifies a 24-bit channel

    Note, you can specify high resolution only for the even-numbered channels of a two-speed channel pair. Specifying high resolution incurs a small additional overhead.

Synchro vector

Enter a value to indicate that a channel is synchro or resolver. This value must be a scalar or a vector that is the same length as the Channel vector value. For each channel, enter

  • 1 to indicate that the corresponding channel is a synchro

  • 0 to indicate that it is a resolver

Encoder vector (4, 6, 8: commutator poles; 12-16: encoder bits)

Enter a scalar or a vector that is the same length as the Channel vector value. The encoder vector controls the encoder or commutation outputs on connector JP5. Enter values according to the following:

  • Commutator — Enter values from the set [4 6 8]. These values specify the number of poles for a commutator output.

Encoder

Enter values from the set [12 13 14 15 16]. These values specify the number of bits for an encoder output.

Output format

From the list select an output format for all channels:

  • position — A signal width of 1 that contains the linear position.

  • position-status — A signal width of 2 that contains the linear position and status.

  • position-velocity — A signal width of 2 the contains the linear position and velocity.

  • position-velocity-status — A signal width of 3 that contains the linear position, velocity, and status.

The following notes apply to these formats:

  • The position and velocity values are each normalized to be between –1 and 1.

  • Position and velocity are returned in radians and radians per second, respectively.

  • The status value is encoded in a 3-bit integer that is returned as a double. The status value consists of the following status information for the channel:

    • Test status, weight of 1

    • Signal status, weight of 2

    • Reference status, weight of 4

    Each status value is a binary value (0 is OK, 1 is FAILURE). The driver encodes these binary values into a single signal. For example, a status value of 5 (100), means the test status is OK and both signal status and reference status are FAILURE. If the board does not provide a reference/excitation, the test status and reference status do nothing.

    When you request a format with status, you also enable the automatic background (bit D2 of the Test Enable Register) testing.

Max RPS vector

Enter the maximum measurable velocity (in revolutions per second) for each channel. This value sets the velocity scale for each channel. This value must be a scalar or a vector that is the same length as the Channel vector value. Enter positive numbers less than 152.

Show input ports for dynamic max RPS

Select this check box to display an input port for each channel to be used for specifying the maximum RPS dynamically. When you select this check box, the input port signal is internally limited to between 9.5367 and 152.5878 RPS.

Latch all channels before reading position data

Select this check box to latch all channels before reading them. The channels are sampled at the same time. Note that selecting this option incurs a small additional resource overhead.

Save board setup at model termination (takes 5 seconds)

Select this check box to save the current board settings to the board at model termination. This action takes approximately 5 seconds. Wait for the save action to complete before removing power from the board. Upon save completion, the message

Setup has been saved

appears in the message window on the upper right of the target computer screen.

Excitation frequency (47-10000)

Enter the frequency of the on-board reference/excitation.

Excitation voltage (0, 2-28, or 115)

Enter the voltage of the on-board reference/excitation.

Sample time

Enter the base sample time or a multiple of the base sample time (-1 means sample time is inherited).

PCI slot

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber]. To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

External Websites

Was this topic helpful?