Table Of Contents

XNET Write (Frame » Raw) (G Dataflow)

Version:
    Last Modified: February 22, 2017

    Writes data to a session as an array of raw bytes.

    connector_pane_image
    datatype_icon

    session in

    The session to write. This session is selected from the LabVIEW project or returned from XNET Create Session. The session mode must be Frame Output Stream, Frame Output Queued, or Frame Output Single-Point.

    datatype_icon

    data

    An input that provides the array of bytes, representing frames to transmit.The raw bytes encode one or more frames using the Raw Frame Format. This frame format is the same for read and write of raw data and also is used for log file examples.

    If needed, you can write data for a partial frame. For example, if a complete raw frame is 24 bytes, you can write 12 bytes, then write the next 12 bytes. You typically do this when you are reading raw frame data from a logfile and want to avoid iterating through the data to detect the start and end of each frame.

    For information about which elements of the raw frame are applicable, refer to the XNET Write node for the protocol in use (XNET Write (Frame CAN), XNET Write (Frame FlexRay), or XNET Write (Frame LIN)).

    The data you write is queued up for transmit on the network. Using

    the default queue configuration for this mode, you can safely write 1536 frames if you have a sufficiently long timeout. To write more data, refer to the XNET Session Number of Values Unused property to determine the actual amount of queue space available for writing.

    datatype_icon

    timeout

    The time to wait for the raw data to be queued up for transmit. The timeout is a LabVIEW relative time, represented as 64-bit floating-point in units of seconds.

    If timeout is positive, XNET Write (Frame Raw) waits up to that timeout for space to become available in queues. If the space is not available prior to the timeout, a timeout error is returned.

    If timeout is negative, XNET Write (Frame Raw) waits indefinitely for space to become available in queues.

    If timeout is 0, XNET Write (Frame Raw) does not wait and immediately returns with a timeout error if all data cannot be queued. Regardless of the timeout used, if a timeout error occurs, none of the data is queued, so you can attempt to call XNET Write (Frame Raw) again at a later time with the same data.

    This input is optional. The default value is 10.0 (10 seconds).

    If the session mode is Frame Output Single-Point, you must set timeout to 0.0. Because this mode writes the most recent value of each frame, timeout does not apply.

    datatype_icon

    error in

    Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

    Default: No error

    datatype_icon

    session out

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

    datatype_icon

    error out

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

    Description

    The raw bytes encode one or more frames using the Raw Frame Format. The session must use a mode of Frame Output Stream, Frame Output Queued, or Frame Output Single-Point. The raw frame format is protocol independent, so the session can use either a CAN, FlexRay, or LIN interface.

    The raw frame format matches the format of data transferred to/from the XNET hardware. Because it is not converted to/from LabVIEW clusters for ease of use, it is more efficient with regard to performance. This instance typically is used to read raw frame data from a log file and write the data to the interface for transmit (replay).

    The raw frames are associated to the session's list of frames as follows:

    • Frame Output Stream: Array of all frame values for transmit (list ignored). For LIN, if the payload element is an empty array, only the header part of the LIN frame is transmitted. If the payload element is not an empty array, the header and response parts of the LIN frame are transmitted.
    • Frame Output Queued: Array of frame values to transmit for the single frame specified in the list.
    • Frame Output Single-Point: Array of single frame values, one for each frame specified in the list.
    • PDU Output Queued: Array of frame (PDU payload) values to transmit for the single PDU specified in the list. This mode is similar to Frame Output Queued.
    • PDU Output Single-Point: Array of single frame (PDU payload) values, one for each PDU specified in the list. This mode is similar to Frame Output Single-Point.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Supported


    Recently Viewed Topics