Unofficial Content
  • This documentation is valid for:

Introduction


In general, when we think of a computer application we tend to envision a management system.

These systems are fed with data entered by a person in a terminal, and later on, this data is stored in a database, processed and displayed.

However, there is also a wide range of computer systems that obtain data directly from the real world, using devices that gather data from a physical event. This data is converted to digital format, sent to a computer and processed by a software solution. These systems are usually developed in low-level programming languages.

The systems that automatically capture data are called Data Acquisition Systems.

 

What is a Data Acquisition System (DAQ)?

 

Basic Data Acquisition System

Data Acquisition (DAQ) is the process that involves receiving signals from events that occur in the real world. This includes analog values such as temperature, vibrations, pressure and other physical measurements, as well as digital signals such as push-buttons or switches.

The next step is to condition signals and convert them into digital signals, that is to say, convert them to binary format so that the computer can understand them.

Lastly, we will analyze, view and save this data on a computer.

In addition, from data stored on a computer, we can activate a mechanism that causes an action in the real world, such as operating a valve, starting an engine or turning on a machine.

Industrial systems known as SCADA (Supervisory Control and Data Acquisition) combine data acquisition with process control and supervision.

 

How is a DAQ built?

 

Constructing a DAQ - English

A physical event is measured with sensors (also called transducers), which convert a physical property into an electric signal, typically a voltage or current.

Usually, this signal is distorted by a lot of noise, so it has to be accommodated in an appropriate circuit.

In addition, we need a special interface in order to read these signals. The data acquisition hardware generally has multiple inputs and outputs, such as analog inputs, digital inputs, analog outputs and digital outputs. Many devices are commercially available on the market, some of them for general use and others for highly specialized purposes with prices that range from US$ 100 to tens of thousands of dollars.

In order to convert analog signals into digital signals, this interface includes one or more analog to digital converters. Likewise, it includes digital to analog converters to generate a voltage from a digital signal. It also includes counters and timers, for instance to control an engine using the pulse-width modulation technique.

Once the data can be accessed from the computer, we can buy a commercial software product or develop our own to analyze, display and store this information.

Note that we can not only capture information, but we can also perform an action, such as causing a movement, closing a circuit, turning on a device, etc. from a command sent from our program.

DAQ hardware can be connected to a computer in several ways, including a PCI or PCMCIA card, or communicate through USB, WiFi, Ethernet, RS232, or even through specific products such as PLCs or PXI modules.

As for the software, there are well-known DAQ software products commercially available such as LabView (by National Instruments) and even MatLab has a data acquisition module. However, we can also develop our own software because most DAQ interfaces provide several mechanisms to do so.

Manufacturers usually provide an API (Application Program Interface) to access these devices from our programming language. This API can be a DLL, a Java class or wrapper for other languages such as Python, Visual Basic, etc.


In addition, others also provide visual control libraries that include various ways to display the acquired data (for example, charts, lamps, devices, etc.) or controls to enter data, such as buttons, knobs, scroll bars, etc.

 

How do we build a DAQ with GeneXus?

 

As from version X Evolution 1, GeneXus can be used as programming language for this type of applications, and leverage the advantages provided by GeneXus compared to conventional languages.

The technical resource provided by External Objects, allows us to interact with the API included by the data acquisition interface manufacturer and use GeneXus to read information from physical events or to control processes.

Because most of these DAQ hardware manufacturers provide a dll or a Java class, we can import these functions and use the external object to access the commands that control the input and output ports, whether analog or digital, plus other resources usually included in these multi-purpose interfaces, for example, timers and internal counters.

The final conclusion is that in the context of a system for a company, we can use GeneXus for everything from developing management use cases, to connecting to the physical devices that generate information or generating it ourselves using sensors.

 

Using GeneXus as a language to develop this type of applications allows us to leverage the advantages provided by GeneXus compared to other conventional languages.

 

In addition, with GeneXus X Evolution 2 we can generate applications that natively run on Android, Blackberry and Apple (iPhone and iPad) smart devices.

This increases its potential because we can remotely control physical devices in home automation systems, for instance, to turn on a lamp or air conditioning equipment, but also to control industrial processes, among other uses.

 

At the XXI GeneXus Meeting we showed that GeneXus can be easily used to develop a data acquisition system in real time and control devices such as engines or other devices that run on alternating current from a computer.

You can read more about this presentation, including the necessary information to make the same demo that was used in this session, at The chronicles of Smart Devices: The thermometer, the lamp... and GeneXus!

The KB used in this demo is available for download here.

Spanish version

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant