Table of Contents > QUARC > Blocks > Blocks - By Category > Block Categories
Communications Blocks
The communications blocks provide a generic set of blocks which may be used with any of the QUARC communications protocols. The communication protocol and protocol parameters are specified with a Universal Resource Identifier or URI. Refer to QUARC Communications Protocols for a discussion of the different communications protocols available.
For using the QUARC communications protocols and other features in external applications, such as C/C++, .NET, or Java refer to the QUARC External Interfaces documentation.
For performing communications from a MATLAB script, refer to the QUARC MATLAB functions for communications.
Basic Communications Blocks
The basic communication blocks are the easiest to use but do not provide the full flexibility of the QUARC communications architecture. However, for most applications they are more than adequate and greatly simplify communications.
Connects to a remote host and sends and/or receives data from that host. |
|
Listens for and accepts a connection from a remote host and sends and/or receives data from that host. |
|
Outputs the value of a persistent stream state. |
|
Compares a signal to a persistent stream state. |
Intermediate Communications Blocks
The intermediate communication blocks are more advanced than the basic blocks and provide more flexibility. They are intended to be used in the main diagram. Therefore, they only support non-blocking mode for communications where the blocks always return immediately.
Connects to a remote host. |
|
Listens for and accepts a connection from a remote host. |
|
Sends data over a stream. |
|
Receives data over a stream. |
|
Sends formatted text over a stream. |
|
Scans formatted data received over a stream. |
|
Sends and receives data atomically over a stream. This block is intended for use in the main diagram. |
|
Outputs the value of a particular Stream Answer block connection state. |
|
Compares the connection state of a Stream Answer block to a particular state. |
|
Outputs the value of a particular Stream Call block connection state. |
|
Compares the connection state of a Stream Call block to a particular state. |
Advanced Communications Blocks
The advanced communication blocks provide the full flexibility of the QUARC communications framework but are lower-level blocks that require a more sophisticated knowledge of communications to be used. The advanced blocks support two modes: blocking and non-blocking.
In blocking mode, the blocks do not return until the operation requested is complete. As such, blocking mode is typically used in an asynchronous thread running at a lower priority so that the blocking I/O does not interfere with the sample time performance of the main diagram.
In non-blocking mode, the blocks always return immediately and may therefore be used in the main diagram without compromising sample time performance. However, a simple state machine is generally required to keep track of when a connection is established and data may be transmitted or received.
Outputs an invalid stream. |
|
Accepts a connection from a remote host. |
|
Closes a stream. |
|
Connects to a remote host. |
|
Flushes data from the stream buffer to the underlying communication channel. |
|
Creates a stream that listens for connections from remote hosts. |
|
Polls for events associated with the stream. |
|
Prints formatted data over a stream. |
|
Receives data over a stream. |
|
Scans formatted data received over a stream. |
|
Sends data over a stream. |
|
Gets the values of stream properties. |
|
Sets the values of stream properties. |
Mavlink Communication Blocks
The Mavlink block set is designed to enable QUARC Simulink models to communicate with auto-pilots using the Mavlink protocol.
Outputs the value of a Mavlink enumeration constant. |
|
Establishes connections to Mavlink-based flight controllers. |
|
Receives data over a Mavlink connection. |
|
Sends data over a Mavlink connection. |
Multiwii Communication Blocks
The Multiwii block set is designed to enable QUARC Simulink models to communicate with auto-pilots using the Multiwii Serial protocol (MSP).
Reads the altitude of the aircraft. |
|
Reads the analog sensors, such as voltages and currents. |
|
Reads the attitude of the aircraft. |
|
Binds to satellites. |
|
Gets the box identifiers used by the auto-pilot. |
|
Calibrates auto-pilot sensors. |
|
Gets the GPS coordinates relative to the home location. |
|
Connects to an auto-pilot. This block is intended for use in the main diagram. |
|
Gets debug values from the auto-pilot. |
|
Writes the settings to the auto-pilot EEPROM. |
|
Sets a new heading lock reference. |
|
Gets information about the auto-pilot. |
|
Gets raw IMU sensor data from the auto-pilot. |
|
Gets the motor pin indications from the auto-pilot. |
|
Gets the names of the boxes or PID items from the auto-pilot. |
|
Reads the commands for the servos or motors from the auto-pilot. |
|
Reads the box items. Each word in the output array is a bitmask of activation switches. |
|
Reads the raw GPS data. |
|
Reads miscellaneous information from the auto-pilot, such as thresholds, triggers and counters. |
|
Reads PID gains from the auto-pilot. |
|
Reads RC values from the auto-pilot. |
|
Reads RC tuning parameters from the auto-pilot. |
|
Reads the servo configuration from the auto-pilot. |
|
Reads the current waypoint from the auto-pilot. |
|
Resets all parameters to defaults in the auto-pilot. |
|
Select the setting configuration for the auto-pilot. |
|
Gets the status of the auto-pilot. |
|
Writes the commands for the motors to the auto-pilot. |
|
Writes box items to the auto-pilot. Each word in the input array is a bitmask of activation switches. |
|
Writes raw GPS data to the auto-pilot. The data is injected into the GPS stream. |
|
Writes miscellaneous information from the auto-pilot, such as thresholds, triggers and counters. |
|
Writes PID gains to the auto-pilot. |
|
Writes raw RC values to the auto-pilot. |
|
Writes RC tuning parameters to the auto-pilot. |
|
Writes the servo configuration to the auto-pilot. |
|
Writes a new waypoint to the auto-pilot. |
NEES Communication Blocks
The NEES communication blocks have been deprecated.
The NEES block set is designed to enable QUARC Simulink models to communicate with Quanser NEES Daemon. This set consists of blocks to connect to the daemon, and send/receive signals to/from it.
Receives signals from the Quanser NEES Daemon. |
|
Initializes a connection between the Simulink model and the Quanser NEES Daemon. |
|
Sends signals to Quanser NEES Daemon. |
S.BUS Communication Blocks
The S.BUS block set is designed to enable QUARC Simulink models to communicate with and emulate S.BUS receivers.
Reads an S.BUS frame and outputs its constituent parts. |
|
Writes an S.BUS frame to the given stream. |
Serial Receiver Communication Blocks
The Serial Receiver block set is designed to enable QUARC Simulink models to communicate with and emulate serial receivers.
Receives RC commands from a serial receiver. |
|
Emulates RC commands sent from a serial receiver. |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.