From OpenSCADAWiki
Jump to: navigation, search
Other languages:
English • ‎mRussian • ‎Українська
Module Name Version License Source Languages Platforms Type Author Description
SoundCard Sound card 0.8 GPL2 daq_SoundCard.so en,uk,ru,de x86,x86_64,ARM DAQ Roman Savochenko
Maxim Lysenko (2009) — the page translation
Provides an access to the sound card.

This module is designed to provide data from the inputs of sound cards of the system. The module is based on the multi-platform library of work with sound PortAudio (http://www.portaudio.com). The feature of this library is the unified API, which allows you to easily adapt this module to work on different platforms and even different audio subsystems on a single platform.

Structure of the module reflections of the object "Controller" of the subsystem "Data acquisition" on a separate audio input device available in the system. The object "Parameter" of the subsystem "Data acquisition" reflects a separate channel available from the sound input device to the attribute "val". The most functional is to use the attribute "val" in conjunction with the archive, or at least with its buffer. In the case of the archiving enabling the data of the channel of audio input are placed in the buffer of the archive by the packages with the frequency of the data acquisition of the input device that allows you to perform further operations on that data. In addition, the last package value is installed as the current value of the attribute. In the case of archive absence operation of the last package value placing as the current value of the attribute is performed only.

Also, the module implements the functions of the horizontal reservation, that is working in conjunction with the remote station of the same level.

1 Controller object of the data

To add an audio input device a controller object is created and configured in OpenSCADA. Example of the configuration tab of the controller object is shown in Figure 1.

Fig.1. Configuration tab of a controller object.

From this tab you can set:

  • State of the controller object, as follows: status, "Enabled", "Running" and the storage name containing the configuration.
  • Identifier, name and description of the controller.
  • The state "Enabled" and "Running", in which the controller object must be translated at start up.
  • Card device from the list of available ones.
  • Frequency of values acquisition of cards in Hertz.
  • Type of values of acquisition from the list: "Real 32", "Integer 32" and "Integer 16".

2 Parameters

The module provides only one the "Standard (std)" type of the parameters with the parameters table name "SoundCard_{CntrId}".

To add a channel of input sound device a parameter of the controller object is created and configured in OpenSCADA. Example of the configuration tab of the parameter is shown in Figure 2.

Fig.2. Configuration tab of a parameter.

From this tab you can set:

  • Type of the parameter and indicate the status "Enabled".
  • Id, name and description of the parameter.
  • State, in which the parameter must be translated at boot: "Enabled".
  • Channel of the audio input device from the list of available channels.

Tab of attributes of the parameter has the form presented in Figure 3, the tab of the values of the attribute's archive "val" is presented in Figure 4.

Fig.3. Tab of attributes of a parameter.
Fig.4. Tab of values of an archive of the attribute "val".