Frame CAN to Signal
- Updated2023-02-17
- 4 minute(s) read
Frame CAN to Signal
Converts between NI-XNET CAN frame data and signals.
Inputs/Outputs

session in
The session to read. This session is returned from XNET Create Session. The session mode must be Conversion.

frame data
An input that provides the array of LabVIEW clusters.
Each array element corresponds to a frame value to convert.
The data you write is converted to signal values in the order you provide them. Only the latest signal value is returned.
The elements of each cluster are specific to the CAN protocol.

identifier
The CAN frame arbitration identifier.

extended?
A Boolean value that determines whether the identifier uses extended format (true) or standard format (false).

echo?
An element not used for conversion. You must set this element to false.

type
The frame type (decimal value in parentheses).
| CAN Data (0) | The CAN data frame contains payload data. This is the most commonly used frame type for CAN. |
| CAN Remote (1) | A CAN remote frame. Your application transmits a CAN remote frame to request data for the corresponding identifier. A remote ECU should respond with a CAN data frame for the identifier, which you can obtain using XNET Read. This value is not meaningful, as a remote frame does not contain any data to convert. |

timestamp
An element that represents absolute time using the LabVIEW absolute timestamp type.

payload
The array of data bytes for the CAN data frame.
For more information, refer to the section for each mode.
For a transmitted remote frame (CAN Remote type), the payload length in the frame value specifies the number of payload bytes requested. Your application provides this payload length by filling payload with the requested number of bytes. This enables your application to specify the frame payload length, but the actual values in the payload bytes are ignored (not contained in the transmitted frame).

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

session out
An output that is the same as session in, provided for use with subsequent nodes.

signal data
An output that returns a one-dimensional array of signal values. Each signal value is scaled, 64-bit floating point.
The data returns the most recent converted value for each signal. If multiple frames for a signal are input, only signal data from the most recent frame is returned. Here, most recent is defined by the order of the frames in the frame data array, not the timestamp.
If no frame is input for the corresponding signals, the XNET Signal Default Value is returned.

error out
Error information.
The node produces this output according to standard error behavior.