<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Application of serial communication in industrial automation processes</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Wilver Auccahuasi</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kitty Urbano</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Ovalle</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Felippe</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Orlando Pacheco</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manuel Bejar</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Ledezmag</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amaury Farfanh</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Edwin Felixi</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mario Ruizj</string-name>
        </contrib>
      </contrib-group>
      <fpage>155</fpage>
      <lpage>160</lpage>
      <abstract>
        <p>In the field of engineering, the most required mechanisms are those in charge of the transfer of information, between the different components of the equipment or system, as well as the exchange of information between the equipment and the different control or management systems is required, that it is required to know the status of the equipment. These requirements are important to be able to measure the performance of the equipment and we need to have the information, one of the protocols that we have available is the serial communication port, through the RS-232 protocol and with the DB9 serial connector and now the USB, in The present work presents a method to exploit this data that we can export through this port as well as the description of an application made in Labview to connect to the equipment by configuring a virtual port "COM3", from which we can receive the information and its subsequent storage and exploitation, the results show that it can be connected with all the equipment that has the serial communication port and by the labView development tool it allows us to connect with different hardware architectures and with greater compatibility with serial communication.</p>
      </abstract>
      <kwd-group>
        <kwd>1 RS-232</kwd>
        <kwd>communication</kwd>
        <kwd>protocol</kwd>
        <kwd>connection</kwd>
        <kwd>transmission</kwd>
        <kwd>reception</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In the development of software dedicated to industrial automation, the communications port
assumes the responsibility to be able to export and import data, in this task we find different jobs
dedicated to the study and application of the protocol, we have jobs where we try to connect
equipment with more than 20 years of manufacture, for which it is important to know the equipment
design protocol and mainly the compatibility with current protocols, one of these important
considerations in the transmission speed presented by the first designs, such as 50 baud and being able
to update to the 9600 baud rate that the equipment currently works with [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Due to the diversity of
equipment that we find in companies, most of them have to perform signal conditioning to try to make
it compatible between the RS-232 protocol and the GPIB [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We can also find low-cost solutions to
ensure the compatibility of the RS-232 protocol with its different variants that use the DB-9 and
DB25 connectors where the transmission and reception pins are mainly used [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Many of the current
solutions are dedicated to working in operating systems such as Linux, where conditioning,
transmission and reception devices are developed, using microcontrollers that take advantage of the
serial communication characteristics presented in their architecture [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        From the point of view of application development, we can find that most programming languages
have their own libraries for serial communication integrated as well as the availability of open source
libraries that can be used without problems [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In the market we find many communication protocols,
each one dedicated to the specific tasks of each equipment, where they use TCP as an alternative
protocol, achieving compatibility with the MODBUS protocol, in this sense it is recommended to
know the technical details of the equipment's communications module [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The RS-232 protocol
continues to be used today for its practicality in its implementation and is being used as the main
communication medium coupled to real-time transmission systems based on the use of FPGAs [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
The use of PLC is commonly used in the industrial field as a standard, most of these equipments have
the serial communication protocol, managing to integrate with other equipments both for transmission
and reception as well as to form industrial communication networks [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Currently, the equipment is
configured in such a way that it can be controlled remotely and can see its operation, for this reason
serial communication is used to export information from the equipment and that these can be
presented through various solutions to be able to observe them at distance [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Materials and Methods</title>
      <p>In order to develop the methodology, the following three stages were designed, which are
presented in figure 1, where each of the stages corresponds to an essential process in the fulfillment of
the objective, the results of each stage serve as input for the next stage, that is It is necessary to have
the necessary equipment and the necessary wireless connection, in order to demonstrate the use and
application of the methodology. Each of the stages is developed below, describing the elements
necessary for its application, as well as the application and the results we hope to obtain.</p>
    </sec>
    <sec id="sec-3">
      <title>2.1. Study of the problema and alternative solutions</title>
      <p>For the application of the methodology, it is required as a first measure to be able to know the
problem and with it to be able to analyze the possible solutions, in this sense the first thing that we
must take into account to know at a level of detail the causes that are making the failure possible.
equipment connection.</p>
      <p>It is recommended that a checklist be made to have an overview of the problem and the
mechanisms that we can provide to solve the problem. For our case, and for the purpose of being able
to check the methodology, the example problem is described: there is a team related to the
measurement of energy consumption where it is required that this consumption information can be
observed in another environment in order to be able to monitor how the team is behaving.</p>
      <sec id="sec-3-1">
        <title>Analyzing the problem and the team, the following data is obtained:</title>
        <p>
</p>
        <p>The equipment monitors energy consumption, in its architecture a DB-9 connector can be
displayed.</p>
        <p>Need to export information on energy consumption to an administrative environment.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>2.2. Proposal Design</title>
      <p>In the second process of the methodology, what is available is evaluated, making a visual
recognition of the components and connectors and a review of the technical specifications of the
equipment, in this analysis in figure 2, where the control module of a piece of equipment known as an
electrical substation, it can be noted that the equipment has a DB-9 connector, reviewing the technical
specifications of the equipment, the communication module allows the export of information based on
the behavior of the equipment with two indicators of consumption, first we have the output voltage
and current consumption, these two values can be obtained by reading from the DB-9 connector.</p>
      <p>As the equipment presents two values that can be exported, a second step is to be able to determine
how the transmission frame will be so that it can be interpreted by the application to be developed, in
this sense we proceed to have a design of the transmission frame and it is made up of the following
data:
 Time and date: provided by the control system itself.
 Voltage that the equipment is sending.</p>
      <p> Current that is being produced with the load that is feeding the equipment</p>
      <sec id="sec-4-1">
        <title>With these values the plot of the equipment is defined as follows:</title>
        <p>In image 3, it is presented how the frame that will be sent through the serial port through the DB-9
connector is constituted, you can also see an example of the value that is sent, for its subsequent
interpretation, a recommendation that must be taken It is to be able to know how the plot is
constituted, it is very important because when the plot is recovered the next process is to be able to
interpret the plot, if we do not know the order and that each value corresponds, it is very difficult to be
able to solve the problem that it gave origin to the design of the solution.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>2.3. Application Development</title>
      <p>In order to solve the proposal, the next step is to implement an application where you can have the
following processes so that you can view the operating variables of the equipment, the tasks that were
designed are the following:


</p>
      <sec id="sec-5-1">
        <title>Connection with equipment</title>
        <p>Frame reception</p>
        <p>Storage in a file of the plot for later analysis.</p>
        <p>In the description of the necessary tasks and processes, it is required to connect with the
equipment, to retrieve the information and to be able to store it for later exploitation. The sogtware for
the development of applications for engineering called LabView was used, where it will be used to
solve these three tasks and to be able to present in a single application the evidence of the connection,
transition and storage of the data.</p>
        <p>In figure 4, the user view of the developed application is presented where you can view the
different configurations that can be made as well as the parameters to save the information based on
being able to store it in a file with a CSV extension.</p>
        <p>In figure 4, you can see the application developed in Labview, where for our particular case, the
recording of the voltage and current values was considered, each of the values is separated and shown
in each graph, it is also presented the parameters to save the data, the parameters of the
communication port, and finally a table where the data can be presented as it is being received and
stored.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>3. Results</title>
      <p>The results presented are related to the design of an application developed in labView to be able to
solve the problem related to the connectivity of the equipment to a workstation, from where you can
view the consumption values as well as the time stamp. and registration date, it is important to
indicate as a result that the information that can be sent through the serial port will depend on the
specifications of the equipment manufacturer, because it is not totally sure that all equipment
dedicated to the industry can have the serial port enabled , It would be advisable as a purchasing
strategy to define in the specifications when looking to acquire equipment that can be exported as
much information as consumption, performance and failures in such a way that they can be exported
and their subsequent analysis, having the information can be perform many solutions and perform
predictive mechanisms and this is achieved with info historical confirmation, hence the importance of
exporting data.</p>
      <p>In figure 5, the developed application is described, where an explanation of what each of the fields
consists of is made in order to know and that this application can be scalable towards solving other
problems.</p>
      <p>In figure 5, we can observe the execution of our developed application, according to our needs,
below we describe the main characteristics of the application:



</p>
      <p>From the point of view of the communications port parameters, depending on the equipment
we are connecting, we must obtain these parameters, to have a reading without loss of
information we must know the name of the virtual port, known as "COM1", the The number
of bits is important because it will allow obtaining the value of the information without being
distorted in the reception, the speed is important because it allows synchronizing and
balancing the data reading when they are synchronized at the same speed, the stop bit is
important as well as the parity bits for the control stage.</p>
      <p>From the visualization point of view, two graphs of the acquired values are presented, one is
the voltage that is presented as an alternating wave with average values of 220 volts, as well
as the current with a constant value of 3.8 amps.</p>
      <p>From the point of view of the parameters to store the information, we present the location
where the information is stored by means of a CSV file, presenting an alarm-type visual
signal that indicates that the information is stored and finally provides us with the name of the
file.</p>
      <p>From the point of view of the values that are being stored, the information in a table is
presented as an evaluation mechanism, as the data is being stored, a characteristic to evaluate
is the information of the data where it is stored at a frequency of 60 Hz, since the information
presented contains 1 set of voltage and current values for every second of record.</p>
    </sec>
    <sec id="sec-7">
      <title>4. Conclusions</title>
      <p>The conclusions that are reached at the end of the research, where we can indicate that in the
matter of industrial automation, connectivity is very important and modular in the integration of
systems and with it the possibility of scaling, making a review of the activities carried out in the
process of checking the methodology, we can define and conclude on the following points:
</p>
      <p>Hardware: we find a number of computers that have many communication protocols, among
them the serial protocol based on RS-232 is the most used and easy to implement, in most
cases it can be considered a standard for ease and compatibility with most of the current
equipment and those that have been on the market for a while.</p>
      <p>Software: we can mention that there are a number of computational tools on the market that
allow us to implement the protocol, among which we can mention are those that are installed
in most computers, most programming languages have communication libraries Among them,
serial communication, the one we recommend for its practicality and easy implementation is
LabView because it allows us to connect with a large amount of hardware through its
different communication protocols.</p>
      <p>We can indicate that in the market for equipment related to the industry, most equipment is based
on PLC, to be able to integrate these equipment into an industrial network where we can share
resources as well as monitor the operating parameters, intracion through the RS-232 protocol is
necessary and as a contribution we can indicate that most PLC equipments allow an alternative
communication based on RS-232.</p>
      <p>In order to test our methodology, a device that provides energy was chosen, known as substations,
where the control unit has a serial connection, the study was carried out, communicating with the
equipment and exporting its data, thanks to the application developed in LabView which also allows
storage.</p>
      <p>We finally conclude that the methodology can be used and scalable, applicable to any equipment
that has a serial connection, and with the hardware that can be connected as well as a variety of
software that is available, with which we can export information for later exploitation.</p>
    </sec>
    <sec id="sec-8">
      <title>5. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Saboya</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          (
          <year>2012</year>
          ). Normas de Comunicación en Serie: RS-232, RS-422
          <source>y RS-485. Revista Ingenio Libre</source>
          ,
          <volume>9</volume>
          (
          <issue>1</issue>
          ),
          <fpage>86</fpage>
          -
          <lpage>94</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Neer</surname>
            ,
            <given-names>G. F.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>GENESIS</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <article-title>Aplicaciones del software LabView en electromedicina</article-title>
          .
          <source>Universidad Tecnóloga Nacional de Argentina2003.</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Caicedo</given-names>
            <surname>Mejillones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. K.</given-names>
            ,
            <surname>Paredes</surname>
          </string-name>
          <string-name>
            <surname>Cedeno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            , &amp;
            <surname>Ponguillo</surname>
          </string-name>
          <string-name>
            <surname>Intriago</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          (
          <year>2014</year>
          ). Analizador de protocolo rs-
          <volume>232</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Gómez</surname>
            ,
            <given-names>J. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torres</surname>
            ,
            <given-names>A. P. M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Tecnologías</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>Herramientas hardware y software para el desarrollo de aplicaciones con Microcontroladores PIC bajo plataformas GNU/Linux.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>González</given-names>
            <surname>Martínez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Castillo</surname>
          </string-name>
          <string-name>
            <surname>García</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>&amp; Silva</given-names>
            <surname>Quevedo</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Componente para la lectura de datos por alas-HIS desde máquinas de anestesia</article-title>
          .
          <source>Revista Cubana de Informática Médica</source>
          ,
          <volume>6</volume>
          (
          <issue>1</issue>
          ),
          <fpage>110</fpage>
          -
          <lpage>117</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Olaya</surname>
            ,
            <given-names>A. F. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>López</surname>
            ,
            <given-names>A. B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Moreno</surname>
            ,
            <given-names>F. G. G.</given-names>
          </string-name>
          (
          <year>2004</year>
          ). Implementación de una Red MODBUS/TCP. Ingeniería y Competitividad,
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <fpage>35</fpage>
          -
          <lpage>44</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Miguel</surname>
            ,
            <given-names>E. E. C.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Reséndiz</surname>
            ,
            <given-names>J. R.</given-names>
          </string-name>
          (
          <year>2018</year>
          ). SISTEMA
          <string-name>
            <surname>DE MONITOREO EN TIEMPO REAL BASADO EN FPGA PARA LÍNEAS DE TRANSMISIÓN. Pistas Educativas</surname>
          </string-name>
          ,
          <volume>38</volume>
          (
          <issue>119</issue>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Nieto</surname>
            ,
            <given-names>L. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huavel</surname>
            ,
            <given-names>E. Z.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Laya</surname>
            ,
            <given-names>Y. A.</given-names>
          </string-name>
          <string-name>
            <surname>Automatización de la Gestión del Almacén del Laboratorio de la FIEE</surname>
          </string-name>
          .
          <string-name>
            <surname>Electrónica-</surname>
            <given-names>UNMSM</given-names>
          </string-name>
          , (
          <volume>25</volume>
          ),
          <fpage>47</fpage>
          -
          <lpage>54</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Filgueira</surname>
            ,
            <given-names>G. G.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Domínguez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          R. Sistema de Monitorización y Asistencia de Fondeo para Embarcaciones.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Bernal</given-names>
            <surname>Bermúdez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Gutiérrez</surname>
          </string-name>
          <string-name>
            <surname>Rodríguez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Bobadilla</surname>
          </string-name>
          <string-name>
            <surname>Sancho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Tejedor</surname>
          </string-name>
          <string-name>
            <surname>Cerbel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            , &amp;
            <surname>Sánchez Sánchez</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. L.</surname>
          </string-name>
          (
          <year>2005</year>
          ).
          <article-title>Laboratorio Remoto mediante JSP para el acceso a hardware específico</article-title>
          . In XI Congreso Argentino de Ciencias de la Computación.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>