CAN Connect Terminals.vi
Purpose
Connect terminals in the CAN hardware.
Format
Inputs
task reference in is the task reference from the previous NI-CAN VI. The task reference is originally returned from CAN Init Start.vi, CAN Initialize.vi, or CAN Create Message.vi, and then wired through subsequent VIs. | |||||||
source terminal specifies the source of the connection. Once the connection is successfully created, behavior flows from source terminal to destination terminal. For a list of valid source/destination pairs, refer to Valid Combinations of Source/Destination. The following list describes each value of source terminal: RTSI0... RTSI6Selects a general-purpose RTSI line as source (input) of the connection. RTSI7/RTSI ClockSelects RTSI line 7 as source (input) of the connection. RTSI7 is dedicated for routing of a timebase (10 MHz or 20 MHz). RTSI7 is also known as RTSI Clock in some National Instruments software products, such as NI-DAQ. The only valid destination terminal for this source is Master Timebase. For PCI and PXI form factors, this receives a 20 MHz (default) timebase from another CAN or DAQ card. For example, you can synchronize a CAN and DAQ E Series MIO card by connecting the 20 MHz oscillator (board clock) of the DAQ card to RTSI7/RTSI Clock, and then connecting RTSI7/RTSI Clock to Master Timebase on the CAN card. For PCMCIA form factor, a 10 MHz timebase is required on RTSI7/RTSI Clock. For synchronization with a PCMCIA DAQ card, this is done by programming FREQOUT signal of the DAQ card to 10 MHz, then wiring FREQOUT to the RTSI7/RTSI Clock of the CAN card. This value applies to Series 2 cards only (returns error for Series 1). PXI_StarPXI_Star selects the PXI star trigger signal. Within a PXI chassis, some PXI products can source star trigger from Slot 2 to all higher-numbered slots. PXI_Star enables the PXI CAN card to receive the star trigger when it is in Slot 3 or higher. This value applies to Series 2 PXI CAN cards only. If you are using a Series 1 CAN card or Series 2 PCI or PCMCIA CAN card, selecting this value results in an error. PXI_Clk10PXI_Clk10 selects the PXI 10 MHz backplane clock. The only valid destination terminal for this source is Master Timebase. This routes the 10 MHz PXI backplane clock for use as the timebase of the CAN card. When you use PXI_Clk10 as the timebase for the CAN card, you must also use PXI_Clk10 as the timebase for other PXI cards to perform synchronized input/output. This value applies to Series 2 PXI CAN cards only. If you are using a Series 1 CAN card or Series 2 PCI or PCMCIA CAN card, selecting this value results in an error. 20 MHz Timebase20 MHz Timebase selects the local 20 MHz oscillator of the CAN card. The only valid destination terminal for this source is RTSI7/RTSI Clock. This routes the local 20 MHz clock of the CAN card for use as a timebase by other NI cards. For example, you can synchronize two CAN cards by connecting 20 MHz Timebase to RTSI7/RTSI Clock on one CAN card and then connecting RTSI7/RTSI Clock to Master Timebase on the other CAN card. 20 MHz Timebase applies to the entire CAN card, including both interfaces of a 2-port CAN card. The CAN card is specified by the task interface, such as the interface input to CAN Initialize.vi. This value applies to Series 2 PXI or PCI CAN cards only. If you are using a Series 1 CAN card or Series 2 PCMCIA CAN card, selecting this value results in an error. 10 Hz Resync Clock10 Hz Resync Clock selects a 10 Hz, 50 percent duty cycle clock. This slow rate is required for resynchronization of Series 1 CAN cards. On each pulse of the resync clock, the other CAN card brings its clock into sync. By selecting RTSI0 to RTSI6 as the destination terminal, you route the 10 Hz clock to synchronize with other Series 1 CAN cards. NI-DAQ cards cannot use the 10 Hz resync clock, so this selection is limited to synchronization of two or more CAN cards. 10 Hz Resync Clock applies to the entire CAN card, including both interfaces of a 2-port CAN card. The CAN card is specified by the task interface, such as the interface input to CAN Initialize.vi. This value is typically used with Series 1 CAN cards only. If all of the CAN cards are Series 2, the 20 MHz timebase is preferable due to the lack of drift. If you are using a mix of Series 1 and Series 2 CAN cards, you must use the 10 Hz Resync Clock. Interface Receive EventInterface Receive Event selects the dedicated receive interrupt output on the Philips SJA1000 CAN controller. When a received frame successfully passes the acceptance filter, a pulse with the width of one bit time is output during the last bit of the end of frame position of the CAN frame. Incoming CAN frames can be filtered using the Series 2 Filter Mode property. The CAN controller is specified by the task interface, such as the interface input to CAN Initialize.vi. The Interface Receive Event can be used as the start trigger for other NI cards, or for external instruments. Since this value requires the Philips SJA1000 CAN controller, it applies to Series 2 CAN cards only. If you are using a Series 1 CAN card, selecting this value results in an error. Interface Transceiver EventInterface Transceiver Event selects the NERR signal from the CAN transceiver. The Low-Speed/Fault-Tolerant transceiver and the High-Speed transceiver provide the NERR signal. This signal asserts when the transceiver detects a fault. The default value of NERR is logic-high, which indicates no error. The CAN controller is specified by the task interface, such as the interface input to CAN Initialize.vi. This value applies to Series 2 CAN cards only. If you are using a Series 1 CAN card, selecting this value results in an error. Start TriggerStart Trigger selects the start trigger, the event that begins sampling for tasks. The start trigger is the same for all tasks using a given interface, such as the interface input to CAN Initialize.vi. In the default (disconnected) state of the Start Trigger destination, the start trigger occurs when communication begins on the interface. By selecting RTSI0 to RTSI6 as the destination terminal, you route the start trigger of this CAN card to the start trigger of other CAN or DAQ cards. This ensures that sampling begins at the same time on both cards. For example, you can synchronize two CAN cards by routing Start Trigger as the source terminal on one CAN card and then routing Start Trigger as the destination terminal on the other CAN card, with both cards using the same RTSI line for the connections. | |||||||
destination terminal specifies the destination of the connection. The following list describes each value of destination terminal: RTSI0... RTSI6Selects a general-purpose RTSI line as destination (output) of the connection. RTSI7/RTSI ClockSelects RTSI line 7 as destination (output) of the connection. RTSI7 is dedicated for routing of a timebase. RTSI7 is also known as RTSI Clock in some National Instruments software products, such as NI-DAQ. The only valid source terminal for this source is 20 MHz Timebase. The CAN card can import a 10 MHz or 20 MHz timebase, but can export only a 20 MHz timebase. This value applies to Series 2 CAN cards only. If you are using a Series 1 CAN card, selecting this value results in an error. Master Timebase Master Timebase instructs the CAN card to use the source of the connection as the master timebase. The CAN card uses this master timebase for input sampling (including timestamps of received messages) as well as periodic output sampling. For PCI and PXI form factors, you can use RTSI7/RTSI Clock as the source terminal. By default, this receives a 20 MHz timebase from another CAN or DAQ card. For example, you can synchronize a CAN and DAQ E Series MIO card by connecting the 20 MHz oscillator (board clock) of the DAQ card to RTSI7/RTSI Clock, and then connecting RTSI7/RTSI Clock to Master Timebase on the CAN card. To change the Master Timebase Rate to 10 MHz, use CAN Set Property.vi to change the Hardware Master Timebase Rate. For PXI form factor, you also can use PXI_Clk10 as the source terminal. This receives the PXI 10 MHz backplane clock for use as the master timebase. For PCMCIA form factor, you can use RTSI7/RTSI Clock as the source terminal. Unlike PCI and PXI, the PCMCIA CAN card requires a 10 MHz timebase on RTSI7/RTSI Clock. For synchronization with a PCMCIA DAQ card, this is done by programming the FREQOUT signal of the DAQ card to 10 MHz, then wiring FREQOUT to the RTSI7/RTSI Clock of the CAN card. Master Timebase applies to the entire CAN card, including both interfaces of a 2-port CAN card. The CAN card is specified by the task interface, such as the interface input to See CAN Initialize.vi. The default (disconnected) state of this destination means the CAN card uses its local 20 MHz timebase as the master timebase. This value applies to Series 2 CAN cards only. If you are using a Series 1 CAN card, selecting this value results in an error. 10 Hz Resync Clock10 Hz Resync Clock instructs the CAN card to use a 10 Hz, 50 percent duty cycle clock to resynchronize its local timebase. This slow rate is required for resynchronization of CAN cards. On each low-to-high transition of the resync clock, this CAN card brings its local timebase into sync. When synchronizing to an E Series MIO card, a typical use of this value is to use RTSI0 to RTSI6 as the source terminal, then use NI-DAQ functions to program the Counter 0 of the MIO card to generate a 10 Hz 50 percent duty cycle clock on the RTSI line. For an example, refer to CAN Sync Start with NI-DAQ.vi. When synchronizing to a CAN card, a typical use of this value is to use RTSI0 to RTSI6 as the source terminal, then route the 10 Hz Resync Clock of the other CAN card as the source terminal to the same RTSI line. 10 Hz Resync Clock applies to the entire CAN card, including both interfaces of a 2-port CAN card. The CAN card is specified by the task interface, such as the interface input to CAN Initialize.vi. The default (disconnected) state of this destination means the CAN card does not resynchronize its local timebase. This value is typically used with Series 1 CAN cards only. If all of the CAN cards are Series 2, the 20 MHz timebase is preferable due to the lack of drift. If you are using a mix of Series 1 and Series 2 CAN cards, you must use the 10 Hz Resync Clock. Start TriggerStart Trigger selects the start trigger, the event that begins sampling for tasks. The start trigger occurs on the first low-to-high transition of the source terminal. The start trigger is the same for all tasks using a given interface, such as the interface input to CAN Initialize.vi. By selecting RTSI0 to RTSI6, or PXI_Star for PXI hardware, as the source terminal, you route the start trigger from another CAN or DAQ card. This ensures that sampling begins at the same time on both cards. For example, you can synchronize with an E Series DAQ MIO card by routing the AI start trigger of the MIO card to a RTSI line and then routing the same RTSI line with Start Trigger as the destination terminal on the CAN card. The default (disconnected) state of this destination means the start trigger occurs when communication begins on the interface. Because communication begins when the first interface task is started, this does not synchronize sampling with other NI cards. | |||||||
modifiers provides optional connection information for certain source/destination pairs. The current release of NI-CAN does not use this information for any source/destination pair, so modifiers must be left unwired. | |||||||
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.
|
Outputs
task reference out is the same as task reference in. Wire the task reference to subsequent VIs for this task. | |||||||
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.
|
Description
This VI connects a specific pair of source/destination terminals. One of the terminals is typically a RTSI signal, and the other terminal is an internal terminal in the CAN hardware. By connecting internal terminals to RTSI, you can synchronize the CAN card with another hardware product such as an NI-DAQ card.
The most common uses of RTSI synchronization are demonstrated by CAN Sync Start with NI-DAQ.vi, CAN Sync Start with NI-DAQmx.vi, CAN Sync Start Multiple with NI-DAQ.vi, and CAN Sync Start Multiple with NI-DAQmx.vi. The diagram for each of these example VIs uses CAN Connect Terminals, and therefore serves as a good starting point when learning this VI.
When the final task for a given interface is cleared with CAN Clear.vi, NI-CAN disconnects all terminal connections for that interface. Therefore, CAN Disconnect Terminals.vi is not required for most applications. NI-DAQ terminals remain connected after the tasks are cleared, so you must disconnect NI-DAQ terminals manually at the end of the application.
For a list of valid source/destination pairs, refer to the following section.
Valid Combinations of Source/Destination
The following table lists all valid combinations of source terminal and destination terminal.
The series of the NI CAN hardware determines what combinations of source terminal to destination terminal are valid. Within the table, 1 indicates Series 1 hardware, and 2 indicates Series 2 hardware. You can determine the series of the NI CAN hardware by selecting the name of the card within the Devices and Interfaces view in the left pane of MAX.
Series 1 hardware has the following limitations.
- PXI cards do not support RTSI6.
- Signals received from a RTSI source cannot occur faster than 1 kHz. This prevents the card from receiving a 10 MHz or 20 MHz timebase, such as NI E Series MIO hardware provides.
- Signals received from a RTSI source must be at least 100 µs in length to be detected. This prevents the card from receiving triggers in the nanoseconds range, such as the AI trigger that E Series MIO hardware provides. Series 2 CAN cards also send RTSI pulses in the nanoseconds range, so Series 1 CAN cards cannot receive RTSI input from Series 2 CAN cards.
- For CAN cards with High-Speed (HS) ports only, four RTSI signals are available for input (source), and four RTSI signals are available for output (destination). This limitation applies to the number of signals per direction, not the RTSI signal number. For example, if you connect RTSI0, RTSI1, RTSI3, and RTSI5 as input, connecting RTSI4 as input will return an error.
- For CAN cards with one or more Low-Speed (LS) ports, two RTSI signals are available for input (source), and three RTSI signals are available for output (destination).
Series 2 hardware has the following limitations.
- For all form factors (PCI, PXI, PCMCIA), the connection of Interface Transceiver Event to a RTSI destination depends on the physical port location. If the interface is on Port 1, you can connect to only even-numbered RTSI lines (RTSI0, RTSI2, RTSI4, RTSI6). If the interface is on Port 2, you can connect to only odd-numbered RTSI lines (RTSI1, RTSI3, RTSI5). You can determine the location by selecting the name of the interface in MAX.
- PCI cards do not support the PXI_Star and PXI_Clk10 terminals, as those signals exist on the PXI backplane.
- PCMCIA cards do not support the 20 MHz Timebase, PXI_Star, and PXI_Clk10 terminals. Because 20 MHz Timebase is not supported, you cannot synchronize the timebases of two PCMCIA CAN cards.
- On PCMCIA cards, RTSI4 , RTSI5 and RTSI6 are not available.
Source | Destination | ||||
---|---|---|---|---|---|
RTSI0 to RTSI6 | RTSI_CLOCK | Master Timebase | 10 Hz Resync Clock | Start Trigger | |
RTSI0 to RTSI6 | — | — | — | 1,2 | 1,2 |
RTSI7/RTSI Clock | — | — | 2 | — | — |
PXI_Star | — | — | — | — | 2 |
PXI_Clk10 | — | — | 2 | — | — |
20 MHz Timebase | — | 2 | — | — | — |
10 Hz Resync Clock | 1,2 | — | — | — | 1,2 |
Interface Receive Event | 2 | — | — | — | 2 |
Interface Transceiver Event | 2 | — | — | — | — |
Start Trigger Event | 1,2 | — | — | — | — |
1—Valid connection for Series 1 hardware
2—Valid connection for Series 2 hardware