CAN Get Property.vi

NI-CAN

CAN Get Property.vi

Purpose

Get a property for the task, or a single channel within the task. The poly VI selection determines the property to get.

To select the property, right-click the VI, go to Select Type and select the property by name. For LabVIEW 7.0 and later, you can right-click the VI and select Visible Items»Poly VI Selector to select the property from within the diagram.

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.

channel name specifies an individual channel within the task. The default (unwired) value of channel name is empty, which means the property applies to the entire task, not a specific channel.

Properties that begin with the word Channel or Message do not apply to the entire task, but an individual channel or message within the task. For these channel-specific properties, you must wire the name of a channel from channel list into the channel name input.

For properties that do not begin with the word Channel or Message, you must leave channel name unwired (empty).

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.

Outputs

task reference out is the same as task reference in. Wire the task reference to subsequent VIs for this task.

The poly output value returns the property value. You select the property returned in value by selecting the Poly VI type. The data type of value is also determined by the Poly VI selection. For information about the different properties provided by CAN Get Property, refer to the Poly VI Types section.

To select the property, right-click the VI, go to Select Type and select the property by name.

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.

Poly VI Types

Behavior After Final Output

Returns the Behavior After Final Output property, which is used with some output task configurations. For more information, refer to the Behavior After Final Output property in CAN Set Property.

Channel Byte Order

Returns the byte order of a channel in the message.

The value of Channel Byte Order is an enumeration:

0 Intel Bytes are in little-endian order, with most-significant first.
1 Motorola Bytes are in big-endian order, with least-significant first.

The value of this property cannot be changed using CAN Set Property.

Channel Data Type

Returns the data type of a channel in the message.

The value of Channel Data Type is an enumeration:

0 Signed Raw data in the message is a signed integer.
1 Unsigned Raw data in the message is an unsigned integer.
2 IEEE Float Raw data in the message is floating-point; no scaling required.

The value of this property cannot be changed using CAN Set Property.

Channel Default Value

Returns the default value of the channel in scaled floating-point units.

For information on how Channel Default Value is used, refer to CAN Read.vi and CAN Write.vi.

The value of this property is originally set within MAX or Can Create Message.vi. If the channel is initialized directly from a CAN database, the value is 0.0 by default, but it can be changed using CAN Set Property.vi.

Channel Maximum Value

Returns the maximum value of the channel in scaled floating-point units.

The CAN Read and CAN Write VIs do not coerce samples when converting to/from CAN messages. You can use this value with CAN database to set the range of front-panel controls and indicators.

The value of this property cannot be changed using CAN Set Property.

Channel Minimum Value

Returns the minimum value of the channel in scaled floating-point units.

The CAN Read and CAN Write VIs do not coerce samples when converting to/from CAN messages. You can use this value with property nodes to set the range of front-panel controls and indicators.

The value of this property cannot be changed using CAN Set Property.

Channel Mode Value

Returns the value of the mode channel associated to this channel. This property applies only to mode dependent channels.

Channel Number of Bits

Returns the number of bits in the message. The range is 1 to 64.

The value of this property cannot be changed using CAN Set Property.

Channel Scaling Factor

Returns the scaling factor used to convert raw bits of the message to/from scaled floating-point units. The scaling factor is the A in the linear scaling formula AX+B, where X is the raw data, and B is the scaling offset.

CAN messages use the raw data, and the CAN Read and CAN Write VIs provide access to samples in floating-point units.

The value of this property cannot be changed using CAN Set Property.

Channel Scaling Offset

Returns the scaling offset used to convert raw bits of the message to/from scaled floating-point units. The scaling offset is the B in the linear scaling formula AX+B, where X is the raw data, and A is the scaling factor.

CAN messages use the raw data, and the CAN Read and CAN Write VIs provide access to samples in floating-point units.

The value of this property cannot be changed using CAN Set Property.

Channel Start Bit

Returns the starting bit position in the message. The range is 0 (lowest bit in first byte) to 63 (highest bit in last byte).

The value of this property cannot be changed using CAN Set Property.

Channel Unit String

Returns the unit string of the channel. The string is no more than 80 characters in length.

You can use this value to display units (such as volts or RPM) along with the samples on a channel.

The value of this property cannot be changed using CAN Set Property.

Hardware Form Factor

Returns the hardware form factor for the NI-CAN hardware that contains Interface.

The value of Hardware Form Factor is an enumeration:

0 PCI
1 PXI
2 PCMCIA
3 AT

Hardware Master Timebase Rate

Returns the present Hardware Master Timebase Rate in MHz, programmed into the CAN hardware. For PCMCIA, this property will always return 10 MHz.

Hardware Serial Number

Returns the hardware serial number for the NI-CAN hardware that contains Interface.

Hardware Series

Returns the hardware series for the NI CAN hardware that contains Interface.

The value of Hardware Series is an enumeration:

0 Series 1 Series 1 hardware uses the Intel 82527 CAN controller.
1 Series 2 Series 2 hardware uses the Philips SJA1000 CAN controller and includes improved RTSI features.

Newer hardware series often have more features, so the application may need to determine which is installed.

Hardware Timestamp Format

Returns the present Timestamp Format programmed into the CAN hardware. This property applies to the entire card.

Interface

Returns the interface initialized for the task, such as with the CAN Init Start VI.

Interface Baud Rate

Returns the baud rate in use by the Interface.

Basic baud rates such as 125000 and 500000 are specified as the numeric rate. Advanced baud rates are specified as 8000XXYY hex, where YY is the value of Bit Timing Register 0 (BTR0), and XX is the value of Bit Timing Register 1 (BTR1) of the CAN controller chip. For more information, refer to the Interface Properties dialog in MAX.

The value of this property is originally set within MAX, but it can be changed using CAN Set Property.vi.

Interface Listen Only?

Returns a Boolean value that indicates whether the listen only feature of the Philips SJA1000 CAN controller is enabled (true) or disabled (false). For more information, refer to the Interface Listen Only? property in CAN Set Property.vi.

Since the listen only feature requires the Philips SJA1000 CAN controller, this property is supported on Series 2 NI CAN hardware only.

Interface Receive Error Counter

Returns the Receive Error Counter as described in the CAN specification.

Since the error counts require the Philips SJA1000 CAN controller, this property is supported on Series 2 NI CAN hardware only. If you are using Series 1 NI CAN hardware, this property returns an error.

Interface Self Reception?

Returns the Interface Self Reception property as configured in CAN Set Property.vi.

Interface Series 2 Error/Arb Capture

Returns the current values of the Error Code Capture register and Arbitration Lost Capture register from the Philips SJA1000 CAN controller chip.

The Error Code Capture register provides information on bus errors that occur according to the CAN standard. A bus error increments either the Interface Transmit Error Counter or the Interface Receive Error Counter. When communication starts on the interface, the first bus error is captured into the Error Code Capture register and retained until you get this property. After you get this property, the Error Code Capture register is again enabled to capture information for the next bus error.

The Arbitration Lost Capture register provides information on a loss of arbitration during transmit. Loss of arbitration is not considered an error. When communication starts on the interface, the first arbitration loss is captured into the Arbitration Lost Capture register and retained until you get this property. After you get this property, the Arbitration Lost Capture register is again enabled to capture information for the next arbitration loss.

For each of the capture registers, a single-bit New flag indicates whether a new error has occurred since the last Get. If the New flag of a register is set, the associated fields contain new information. If the New flag of a register is clear, the associated fields are the same as the previous Get.

This property is commonly used with the Interface Single Shot Transmit? property. When CAN Write.vi is used to transmit the single frame, you can get this property to determine if the transmit was successful. If the single shot transmit was not successful, this property provides detailed information for the failure.

This property is supported for Series 2 hardware only (not Series 1). Since the information and bit format is very specific to the Philips SJA1000 CAN controller on Series 2 hardware, National Instruments cannot guarantee compatibility for this property on future hardware series. When using this property in the application, it is best to get the Hardware Series to verify that the CAN hardware is Series 2.

For information regarding the format of the bits in this property, refer to Series 2 Error/Arb Capture attribute in the ncGetAttr.vi function of the Frame API.

Interface Series 2 Comparator

Returns the value of the Interface Series 2 Comparator property (refer to CAN Set Property.vi).

Interface Series 2 Filter Mode

Returns the value of the Interface Series 2 Filter Mode property (refer to CAN Set Property.vi).

Interface Series 2 Mask

Returns the value of the Interface Series 2 Mask property (refer to CAN Set Property.vi).

Interface Single Shot Transmit?

Returns the value of the Interface Single Shot Transmit property (refer to CAN Set Property.vi). The single-shot transmit feature is not available on the Intel 82527 CAN controller used by Series 1 CAN hardware (Get returns error).

Interface Transceiver External Inputs

Returns the transceiver external inputs for the interface that was initialized for the task.

Series 2 XS cards enable connection of an external transceiver. For an external transceiver, this property allows you to determine the input voltage on the STATUS pin of the CAN port.

For many models of CAN transceiver, an NERR pin is provided for detection of faults and other status. For such transceivers, you can wire the NERR pin to the STATUS pin of the CAN port.

This property is supported for Series 2 XS cards only.

This property uses a bit mask. When using the property, use bitwise AND operations to check for values, not equality checks (equal, greater than, and so on).

00000001 hex STATUS

This bit is set when 5 V exists on the STATUS pin.

This bit is clear when 0 V exists on the STATUS pin.

Interface Transceiver External Outputs

Returns the transceiver external outputs for the interface that was initialized for the task.

Series 2 XS cards enable connection of an external transceiver. For an external transceiver, this property allows you to determine the output voltage on the MODE0 and MODE1 pins of the CAN port, and it allows you to determine if the CAN controller chip is sleeping.

For more information on the format of the value returned in this property, refer to the description of Interface Transceiver External Outputs property in CAN Set Property.vi.

This property is supported for Series 2 XS cards only.

Interface Transceiver Mode

Returns the transceiver mode for the interface that was initialized for the task.

The transceiver mode changes when you set the mode within the application, or when a remote wakeup transitions the interface from Sleep to Normal mode. For more information, refer to CAN Set Property.vi.

This property uses the following values:

Normal

Transceiver is awake in normal communication mode.

Sleep

Transceiver and the CAN controller chip are both in sleep mode.

Single Wire Wakeup

Single Wire transceiver is in Wakeup Transmission mode.

Single Wire High-Speed

Single Wire transceiver is in High-Speed Transmission mode.

Interface Transceiver Type

Returns the type of transceiver for the interface that was initialized for the task. For hardware other than Series 2 XS cards, the transceiver type is fixed. For Series 2 XS cards, the transceiver type reflects the most recent value specified by MAX or CAN Set Property.vi.

This property is not supported on the PCMCIA form factor.

This property uses the following values:

High-Speed

Transceiver type is High-Speed (HS).

Low-Speed/Fault-Tolerant

Transceiver type is Low-Speed/Fault-Tolerant (LS).

Single Wire

Transceiver type is Single Wire (SW).

External

Transceiver type is External. This transceiver type is available on Series 2 XS cards only. For more information, refer to CAN Set Property.vi.

Disconnect

Transceiver type is Disconnect. This transceiver type is available on Series 2 XS cards only. For more information, refer to CAN Set Property.vi.

Interface Transmit Error Counter

Returns the Transmit Error Counter as described in the CAN specification.

Since the error counts require the Philips SJA1000 CAN controller, this property is supported on Series 2 NI CAN hardware only. If you are using Series 1 NI CAN hardware, this property returns an error.

Interface Virtual Bus Timing

Returns a Boolean value of True or False to indicate whether Virtual Bus Timing has been set or not for the specified virtual task. This property is applicable to all tasks opened on the virtual interface.

If this property is selected on real hardware, an error will be returned.

Message ID

Returns the arbitration ID of the channel message.

To determine whether the ID is standard (11-bit) or extended (29-bit), get the Message ID is Extended? property.

The value of this property cannot be changed using CAN Set Property.

Message ID is Extended?

Returns a Boolean value that indicates whether the arbitration ID of the channel message is standard 11-bit format (false) or extended 29-bit format (true).

The value of this property cannot be changed using CAN Set Property.

Message Name

Returns the name of the channel message. The string is no more than 80 characters in length.

The value of this property cannot be changed using CAN Set Property.

Message Number of Data Bytes

Returns the number of data bytes in the channel message. The range is 1 to 8.

The value of this property cannot be changed using CAN Set Property.

Mode

Returns the mode initialized for the task, such as with the CAN Init Start VI.

Message Multiple Frame Distribution

Returns the Message Multiple Frame Distribution property which is used to determine if the CAN frames associated to a group of mode dependent channels are sent even spaced or in burst mode.

Number of Channels

Returns the number of channels initialized in channel list. This is the number of array entries required when using CAN Read or CAN Write.

Channel Mode Dependency

Returns the number of mode dependent channels within a channel. So far a hierarchy of one mode dependent channel per channel is supported.

0Channel is not mode dependent
1 Channel is mode dependent

This property applies only to mode dependent channels.

Number of Samples Pending

Returns the number of samples available to be read using CAN Read. If you set the number of samples to read input of CAN Read to this value, CAN Read returns immediately without waiting.

This property applies only to tasks initialized with mode of Input and sample rate greater than zero. For all other configurations, it returns an error.

Sample Rate

Returns the SampleRate initialized for the task, such as with the CAN Init Start VI.

Timeout

Returns the Timeout property, which is used with some task configurations. For more information, refer to the Timeout property in CAN Set Property.

Value for invalid data

Returns the value that is returned on time stamped read for mode dependent channels that have not been received with the most recent CAN frame associated with the CAN message. This property applies only to mode dependent channels that are read with the time stamped read operation. For more information, refer to Mode Dependent Channels.

Version Build

Returns the build number of the NI-CAN software. This number applies to Development, Alpha, and Beta phase only, and should be ignored for Release phase.

Version Comment

Returns a comment string for the NI-CAN software. If you received a custom release of NI-CAN from National Instruments, this comment often describes special features of the release.

Version Major

Returns the major version of the NI-CAN software, such as the 2 in version 2.1.5.

Version Minor

Returns the minor version of the NI-CAN software, such as the 1 in version 2.1.5.

Version Phase

Returns the phase of the NI-CAN software.

The value of Version Phase is an enumeration:

0 Development
1 Alpha
2 Beta
3 Release

Versions of NI-CAN in hardware kits or on ni.com will always be Release.

Version Update

Returns the update version of the NI-CAN software, such as the 5 in version 2.1.5.