Main Content

模拟输出

输出数据到数据采集设备的多个模拟通道

  • 图书馆:
  • Data Acquisition Toolbox

  • Alalog_Output块

Description

模拟输出块打开,初始化,配置和控制模拟数据采集设备。设备的开放,初始化和配置在模型执行开始时一次发生。在模型运行时间内,该块同步输出数据(输出数据块)。在每个时间步骤中,块都会执行阻止同步写入硬件,从而输出整个输入数据。

下图显示了同步模拟输出的时间。

同步模拟输出的时机

在第一个时间步长(T1),启动数据输出,并且数据的相应块(B1)输出到硬件。在B1完全输出之前,该模拟不会继续。

The block has one or more input ports, depending on the option you choose in its parameters dialog box. It has no output ports.

The Analog Output block inherits the sample time from the driving block connected to the input port. The valid data types of the signal at the input port are double or native data types supported by the hardware.

笔记

要使用此块,您需要数据采集工具箱™和Simulink万博1manbetx®软件。

您只能将模拟输出块与支持时钟生成的设备一起使用。万博1manbetx要使用不支持时钟的设备生成数据,请使用万博1manbetx模拟输出(单个样本)堵塞。

Some devices are not supported by the Simulink blocks in Data Acquisition Toolbox. To see if your device supports Simulink, refer to万博1manbetx支持的硬件

Other Supported Features

  • 此块支持使用万博1manbetx万博1manbetxSimulink Accelerator™模式,但不是快速加速器或代码生成。

  • The block supports the use of model referencing, so that your model can include other Simulink models as modular components.

有关这些功能的更多信息,请参阅万博1manbetxdocumentation.

Ports

Input

展开全部

模拟输出生成,指定为双打。如果仅对所有通道使用一个输入端口,请指定n通道上M扫描的M-N矩阵。每个扫描都是跨N通道的一行。每个通道都输出一列M扫描。

如果为每个通道使用端口,请指定每个端口上每个通道的数据列。多个端口由通道名称或设备指定的通道ID命名。

数据类型:double

参数

展开全部

The device from which you want to generate data. The items in the list vary, depending on which devices you have connected to your system. Devices in the list are specified by adaptor/vendor name and unique device ID, followed by the model name of the device, for example,ni Dev1 (USB-6255)。默认情况下选择第一个可用的设备。CompactDAQ底盘显示为单个设备;供应商名称,底盘ID和机箱模型将显示在列表中,例如ni cDAQ2 (cDAQ-9172)

设备通道选择和配置表。频道配置表列出了设备的硬件通道,并让您选择和配置它们。指定从哪些频道中获取数据(默认情况下,所有通道都选择)。为每个选定的通道指定以下参数:

通道ID- 设备指定的硬件通道ID。通道ID列仅读取,并且选择设备时定义参数。

姓名— Channel name. By default the table displays any names provided by the hardware, but you can edit the names. For example, if the device is a sound card with two channels, you can name them剩下andRight

Module- 设备ID通道属于。模块列仅读取。如果选择了compactdaq底盘,它显示了通道所属于的compactdaq模块的ID;否则设备的ID。

测量类型- 通道的测量类型。该块仅支持电压测量类型万博1manbetx。(对于其他测量类型,请在MATLAB中使用DataAcquisition对象®。)

输出范围- 在选择设备时定义的每个通道可用的输出范围。万博1manbetx

输入数据端口的数量,指定为:

1 for all channels(default) — One input port on the block for all channels. Provide data as a matrix, with a size of scan blocksize by number of channels, M-by-N.

1 per channel- 块上的n输入端口,其中n等于所选通道的数量。将每个端口数据作为一个列向量,大小为blocksize-by-1。对于命名,每个输出端口如果指定了通道名,则使用通道名称,否则,频道ID,例如ao1

The rate at which samples are output from Simulink to the device, in samples per second. This is the sampling rate for the hardware. The default is defined when a device is selected. The sample rate must be a positive real number within the range allowed for the selected hardware.

版本历史记录

在R2016b中引入