Reads data from a session as an array of CAN frames. The session must use a CAN interface and a mode of Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.
The session to read. This session is selected from the LabVIEW project or returned from XNET Create Session. The session mode must be Frame Input Stream, Frame Input Queued, or Frame Input Single-Point.
The number of frame values desired. If number to read is positive (or 0), the data array size is no greater than this number.
If number to read is negative (typically -1), all available frame values are returned. If number to read is negative, you must use a timeout of 0.
This input is optional. The default value is -1.
If the session mode is Frame Input Single-Point, set number to read to either -1 or the number of frames in the sessions list. This ensures that XNET Read (Frame CAN) can return the current value of all session frames.
The time to wait for number to read frame values to become available. The timeout is a LabVIEW relative time, represented as 64-bit floating-point in units of seconds.
If timeout is positive, XNET Read (Frame CAN) waits for number to read frame values, then returns that number. If the values do not arrive prior to the timeout, an error is returned.
If timeout is negative, XNET Read (Frame CAN) waits indefinitely for number to read frame values.
If timeout is zero, XNET Read (Frame CAN) does not wait and immediately returns all available frame values up to the limit number to read specifies.
This input is optional. The default value is 0.0.
If the session mode is Frame Input Single-Point, you must leave timeout unwired (0.0). Because this mode reads the most recent value of each frame, timeout does not apply.
Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.
Default: No error
An output that is the same as session in, provided for use with subsequent nodes.
This output returns an array of LabVIEW clusters. Each array element corresponds to a frame the session receives.
For a Frame Input Single-Point session mode, the order of frames in the array corresponds to the order in the session list.
The elements of each cluster are specific to the CAN protocol.
The CAN frame arbitration identifier. If extended? is false, the identifier uses standard format, so 11 bits of this identifier are valid.
If extended? is true, the identifier uses extended format, so 29 bits of this identifier are valid.
A Boolean value that determines whether the identifier uses extended format (true) or standard format (false).
A Boolean value that determines whether the frame was an echo of a successful transmit (true), or received from the network (false). This value is true only when you enable echo of transmitted frames by setting the XNET Session Interface:Echo Transmit? property to True.
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. In ISO CAN FD mode, the CAN data type is more specific and is one of the types listed below.|
|CAN 2.0 Data (8)||The frame contains payload data and has been transmitted in an ISO CAN FD session using the CAN 2.0 standard.|
|CAN FD Data (16)||The frame contains payload data and has been transmitted in an ISO CAN FD session using the ISO CAN FD standard.|
|CAN FD+BRS Data (24)||The frame contains payload data and has been transmitted in an ISO CAN FD session using the CAN FD+BRS standard.|
|CAN Remote (1)||A CAN remote frame. An ECU transmits a CAN remote frame to request data for the corresponding identifier. Your application can respond by writing a CAN data frame for the identifier.|
|Log Trigger (225)||A Log Trigger frame. This frame is generated when a trigger occurs on an external connection (for example, PXI_Trig0).|
|Start Trigger (226)||A Start Trigger frame is generated when the interface is started .|
|CAN Bus Error (2)||A CAN Bus Error frame is generated when a bus error is detected on the CAN bus.|
This parameter represents the absolute time when the XNET interface received the frame (end of frame), accurate to microseconds. The timestamp uses the LabVIEW absolute timestamp type.
The array of data bytes for the CAN data frame. The array size indicates the received frame value payload length. According to the CAN protocol, this payload length range is 0-8. For CAN FD, the range can be 0-8, 12, 16, 20, 24, 32, 48, or 64.
For a received remote frame (type of CAN Remote), the payload length in the frame value specifies the number of payload bytes requested. This payload length is provided to your application by filling payload with the requested number of bytes. Your application can use the payload array size, but you must ignore the actual values in the payload bytes.
This parameter is empty. No user input is needed.
Error information. The node produces this output according to standard error behavior.
The data represents an array of CAN frames. Each CAN frame uses a LabVIEW cluster with CAN-specific elements.
The CAN frames are associated to the session's list of frames as follows:
Where This Node Can Run:
Desktop OS: Windows