ncConfigCANNetRTSI.vi

NI-CAN

ncConfigCANNetRTSI.vi

Purpose

Configure a CAN Network Interface Object with RTSI features.

Format

Input

ObjName is the name of the CAN Network Interface Object to configure. This name uses the syntax "CANx", where x is a decimal number starting at zero that indicates the CAN network interface (CAN0, CAN1, up to CAN63). CAN network interface names are associated with physical CAN ports using the Measurement & Automation Explorer (MAX).

The 847x and 847x with Sync series CAN and LIN interfaces do not support ncConfigCANNetRTSI.vi.

CAN Network Interface Config provides the core configuration attributes of the CAN Network Interface Object. This cluster uses the typedef ncNetAttr.ctl. You can wire in the cluster by first placing it on the front panel from the NI-CAN Controls palette, or you can right-click the VI input and select Create Constant or Create Control. (For more information, refer to ncConfigCANNet.vi.)
CAN RTSI Config provides RTSI configuration attributes for the CAN Network Interface Object. This cluster uses the typedef ncCANRtsiAttr.ctl. You can wire in the cluster by first placing it on the front panel from the NI-CAN Controls palette, or you can right-click the VI input and select Create Constant or Create Control.

RTSI Mode specifies the behavior of the Network Interface with respect to RTSI, including whether the RTSI signal is an input or output.

Disable RTSI

Disables RTSI behavior for the Network Interface. All other RTSI attributes are ignored. Using this mode is equivalent to calling ncConfigCANNet.

On RTSI Input - Transmit CAN Frame

The Network Interface will transmit a frame from its write queue when the RTSI input transitions from low to high. To begin transmission, at least one data frame must be written using ncWriteNet. If the write queue becomes empty due to frame transmissions, the last frame will be transmitted on each RTSI pulse until another frame is provided using ncWriteNet.

On RTSI Input - Timestamp RTSI event

When the RTSI input transitions from low to high, a timestamp is measured and stored in the read queue of the Network Interface. The special RTSI frame uses the following format:

Arbitration ID:

40000001 hex

Timestamp:

Time when RTSI input transitioned from low to high

IsRemote:

3

DataLength:

RTSI signal detected (RTSI Signal)

Data:

N/A (ignore)

When calling ncReadNet or ncReadNetMult to read frames from the Network Interface, you typically use the IsRemote field to differentiate RTSI timestamps from CAN frames. Refer to ncReadNetMult for more information.

Note  When you configure a DAQ card to pulse the RTSI signal periodically, do not exceed 1000 Hertz (pulse every millisecond). If the RTSI input is pulsed faster than 1kHz on a consistent basis, CAN performance will be adversely affected (for example, lost data frames).

RTSI Output on Receiving CAN Frame

The Network Interface will output the RTSI signal whenever a CAN frame is stored in the read queue.

If the hardware is Series 2, NI-CAN connects a special pin of the Philips SJA1000 CAN controller to the RTSI output. This hardware connection provides jitter in the nanoseconds range, enabling triggering of external oscilloscopes and so on.

RTSI Output on Transmitting CAN Frame

The Network Interface will output the RTSI signal whenever a CAN frame is successfully transmitted from the write queue.

RTSI Output on ncAction call

The Network Interface will output the RTSI signal whenever the ncAction VI is called with Opcode Output on RTSI line. This RTSI mode can be used to manually toggle/pulse a RTSI output within the application.

RTSI Signal defines the RTSI signal associated with the RTSI Mode. Valid values are 0 to 6, corresponding to RTSI 0 to RTSI 6 on other National Instruments cards.

Series 1 and 2 CAN cards each have limitations regarding RTSI. For information on these limitations, refer to Valid Combinations of Source/Destination in the ncConnectTerminals.vi function reference.

RTSI Behavior specifies whether to pulse or toggle a RTSI output. This attribute is ignored when RTSI Mode specifies input (which are always detected low to high):

Output RTSI Pulse: Pulse the RTSI output. For Series 1 CAN cards, the pulse is at least 100 µs. For Series 2 CAN cards, the pulse is at least 100 ns.
Toggle RTSI Line: If the previous state was high, the output toggles low, then vice-versa.
RTSI Skip specifies the number of RTSI inputs (low-to-high transitions) to skip for RTSI Mode On RTSI Input - Timestamp RTSI event, and On RTSI Input - Transmit CAN Frame. It is ignored for all other RTSI Mode values. For example, if the RTSI input transitions every 1 ms, RTSI Skip of 9 means that a timestamp will be stored in the read queue every 10 ms.
Error in describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the Error in cluster in Error out.
status is True if an error occurred. If status is True, the VI does not perform any operations.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

Output

Error out describes error conditions. If the Error in cluster indicated an error, the Error out cluster contains the same information. Otherwise, Error out describes the error status of this VI.
status is True if an error occurred.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

Description

RTSI is a bus that interconnects National Instruments DAQ, IMAQ, Motion, and CAN boards. This feature allows synchronization of DAQ, IMAQ, Motion, and CAN boards by allowing exchange of timing signals. Using RTSI, a device (board) can control one or more slave devices.

If you are not using RTSI features to synchronize the Network Interface with other National Instruments cards, refer to the ncConfigCANNet VI.

The 847x and 847x with Sync series LIN interfaces do not support ncConfigCANNetRTSI.vi.