ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III....

313
ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports System.Xml '//Importa el dominio System.Drawing.Color necesario para cambiar el color de los flags Imports System.Drawing.Color '//Importa el módulo con las declaraciones de los objetos a usar para la manipulacion de la base de datos Imports proyecto9.ADONETUtil '//Importa el módulo con las funciones para la carga y almacenamiento de la configuración de la ventana Imports proyecto9.AppSettingsUtils '//Importa el módulo con las funciones para la actualización de tools en función del estado del programa Imports proyecto9.ActToolsUtils '//Importa el módulo con las funciones para modificar la tabla Imports proyecto9.TablaUtils '//Importa el módulo con las funciones para el tratamiento de la trama recibida Imports proyecto9.RxUtils '//Importa el módulo con las funciones para el tratamiento de la trama recibida Imports proyecto9.TxUtils '//Importa el módulo con las funciones para la configuración de la conexión Imports proyecto9.Rs232Utils Public Class Form1 Inherits System.Windows.Forms.Form '//Miembros privados para appsettings Private ficConfig As String

Transcript of ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III....

Page 1: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

ANEXO III. Código del programa

III.1 Módulo Form1

'//Importa el dominio System.Xml

Imports System.Xml

'//Importa el dominio System.Drawing.Color necesario para cambiar el color de los flags

Imports System.Drawing.Color

'//Importa el módulo con las declaraciones de los objetos a usar para la manipulacion de la base de datos

Imports proyecto9.ADONETUtil

'//Importa el módulo con las funciones para la carga y almacenamiento de la configuración de la ventana

Imports proyecto9.AppSettingsUtils

'//Importa el módulo con las funciones para la actualización de tools en función del estado del programa

Imports proyecto9.ActToolsUtils

'//Importa el módulo con las funciones para modificar la tabla

Imports proyecto9.TablaUtils

'//Importa el módulo con las funciones para el tratamiento de la trama recibida

Imports proyecto9.RxUtils

'//Importa el módulo con las funciones para el tratamiento de la trama recibida

Imports proyecto9.TxUtils

'//Importa el módulo con las funciones para la configuración de la conexión

Imports proyecto9.Rs232Utils

Public Class Form1

Inherits System.Windows.Forms.Form

'//Miembros privados para appsettings

Private ficConfig As String

Page 2: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'//Miembros de la seccion de comunicacion

Public WithEvents moRs232 As Rs232

'//Miembros de la seccion de tratamiento de bases de datos

Friend nomtablas() As String

Friend datasource As String

Friend commandstring As String

Public s_base_mensajes As String = "mensajes"

Public s_tabla_mensajes As String = "Tabla1"

'//Miembros para la recepción de la trama

Private trama(512) As Byte

Private trama_aux() As Byte

Private indice_trama As Integer = 0

Private flag_recepcion As Boolean = True

'//Miembros para la presentación y almacenamiento de datos

Public columna As Integer

'//Miembros para la generación y envio de tramas

Public tamaño_trama As Integer

Public n_tramas_cola As Integer = 0

'Public flag_enviando As Boolean = False

Public stipo As String

#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

ficConfig = Application.ExecutablePath & ".config"

'

' comprobar si exite el fichero de configuración

If System.IO.File.Exists(ficConfig) = False Then

Dim sXml As New System.Text.StringBuilder

'

' crear la cadena a asignar al objeto XmlDocument

sXml.Append("<configuration>")

Page 3: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

sXml.Append("<appSettings>")

sXml.Append("<add key=""Tbintervalo.Text"" value=""5"" />")

sXml.Append("<add key=""Tbbase.Text"" value="""" />")

sXml.Append("<add key=""cbautomatico.Checked"" value=""False"" />")

'sXml.Append("<add key=""cbdato.Text"" value=""Seleccionar..."" />")

sXml.Append("<!-- Valores para el menu -->")

sXml.Append("<add key=""Rb_com_1.Checked"" value=""True"" />")

sXml.Append("<add key=""Rb_com_2.Checked"" value=""False"" />")

'sXml.Append("<add key=""Rb_600.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_115200.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_57600.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_4800.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_9600.Checked"" value=""True"" />")

sXml.Append("<add key=""Rb_38400.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_sinparidad.Checked"" value=""True"" />")

sXml.Append("<add key=""Rb_par.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_impar.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_1.Checked"" value=""True"" />")

sXml.Append("<add key=""Rb_2.Checked"" value=""False"" />")

sXml.Append("<add key=""Rb_3.Checked"" value=""False"" />")

sXml.Append("<add key=""Tb_tiempo_ranura.Text"" value=""20"" />")

sXml.Append("<add key=""cbrepresentacion_datos.Checked"" value=""True"" />")

sXml.Append("<add key=""rb10ultimos.Checked"" value=""True"" />")

sXml.Append("<add key=""rbtodos.Checked"" value=""False"" />")

sXml.Append("<!-- Valores personalizados -->")

sXml.Append("<add key=""Form1.Left"" value=""0"" />")

sXml.Append("<add key=""Form1.Top"" value=""0"" />")

sXml.Append("</appSettings>")

sXml.Append("</configuration>")

'

' asignamos la cadena al objeto

Page 4: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

configXml.LoadXml(sXml.ToString)

'

' Guardamos el contenido de configXml y creamos el fichero

configXml.Save(ficConfig)

Else

' solo es necesario leerlo si no lo hemos creado

configXml.Load(ficConfig)

End If

'

'

'El Diseñador de Windows Forms requiere esta llamada.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing Then

If Not (components Is Nothing) Then

components.Dispose()

End If

End If

MyBase.Dispose(disposing)

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

Friend WithEvents TabControl1 As System.Windows.Forms.TabControl

Friend WithEvents TabPage2 As System.Windows.Forms.TabPage

Friend WithEvents TabPage1 As System.Windows.Forms.TabPage

Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox

Friend WithEvents Tbib As System.Windows.Forms.TextBox

Page 5: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents tbic As System.Windows.Forms.TextBox

Friend WithEvents LabelIa As System.Windows.Forms.Label

Friend WithEvents LabelIb As System.Windows.Forms.Label

Friend WithEvents LabelIc As System.Windows.Forms.Label

Friend WithEvents tbva As System.Windows.Forms.TextBox

Friend WithEvents tbvb As System.Windows.Forms.TextBox

Friend WithEvents tbvc As System.Windows.Forms.TextBox

Friend WithEvents LabelVa As System.Windows.Forms.Label

Friend WithEvents LabelVb As System.Windows.Forms.Label

Friend WithEvents LabelVc As System.Windows.Forms.Label

Friend WithEvents LabelVc1 As System.Windows.Forms.Label

Friend WithEvents LabelVc2 As System.Windows.Forms.Label

Friend WithEvents LabelVC3 As System.Windows.Forms.Label

Friend WithEvents LabelVc4 As System.Windows.Forms.Label

Friend WithEvents tbvc1 As System.Windows.Forms.TextBox

Friend WithEvents tbvc2 As System.Windows.Forms.TextBox

Friend WithEvents tbvc3 As System.Windows.Forms.TextBox

Friend WithEvents tbvc4 As System.Windows.Forms.TextBox

Friend WithEvents LabelP As System.Windows.Forms.Label

Friend WithEvents Label2 As System.Windows.Forms.Label

Friend WithEvents tbp As System.Windows.Forms.TextBox

Friend WithEvents tbq As System.Windows.Forms.TextBox

Friend WithEvents Label4 As System.Windows.Forms.Label

Friend WithEvents tbfactor As System.Windows.Forms.TextBox

Friend WithEvents Bexaminar As System.Windows.Forms.Button

Friend WithEvents Bmostrartablas As System.Windows.Forms.Button

Friend WithEvents tbbase As System.Windows.Forms.TextBox

Friend WithEvents Label5 As System.Windows.Forms.Label

Friend WithEvents Label6 As System.Windows.Forms.Label

Friend WithEvents Label7 As System.Windows.Forms.Label

Friend WithEvents Label8 As System.Windows.Forms.Label

Friend WithEvents Bguardarbase As System.Windows.Forms.Button

Friend WithEvents Beliminaritem As System.Windows.Forms.Button

Friend WithEvents Basignar As System.Windows.Forms.Button

Friend WithEvents tbvalor As System.Windows.Forms.TextBox

Friend WithEvents cbcampo As System.Windows.Forms.ComboBox

Friend WithEvents Bsalir As System.Windows.Forms.Button

Friend WithEvents cbtablas As System.Windows.Forms.ComboBox

Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog

Friend WithEvents Babrirtabla As System.Windows.Forms.Button

Friend WithEvents breleertabla As System.Windows.Forms.Button

Page 6: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Public WithEvents Tbia As System.Windows.Forms.TextBox

Public WithEvents StatusBar2 As System.Windows.Forms.StatusBar

Public WithEvents Bnuevoitem As System.Windows.Forms.Button

Public WithEvents Lvtabla As System.Windows.Forms.ListView

Public WithEvents StatusBar1 As System.Windows.Forms.StatusBar

Friend WithEvents TabPage4 As System.Windows.Forms.TabPage

Friend WithEvents WaveformPlot1 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot2 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot3 As NationalInstruments.UI.WaveformPlot

Friend WithEvents XAxis2 As NationalInstruments.UI.XAxis

Friend WithEvents YAxis2 As NationalInstruments.UI.YAxis

Friend WithEvents WaveformPlot4 As NationalInstruments.UI.WaveformPlot

Friend WithEvents XAxis3 As NationalInstruments.UI.XAxis

Friend WithEvents YAxis3 As NationalInstruments.UI.YAxis

Friend WithEvents WaveformPlot5 As NationalInstruments.UI.WaveformPlot

Friend WithEvents XAxis4 As NationalInstruments.UI.XAxis

Friend WithEvents YAxis4 As NationalInstruments.UI.YAxis

Friend WithEvents WaveformPlot6 As NationalInstruments.UI.WaveformPlot

Friend WithEvents Legend1 As NationalInstruments.UI.WindowsForms.Legend

Public WithEvents LegendItem1 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem2 As NationalInstruments.UI.LegendItem

Public WithEvents LegendItem3 As NationalInstruments.UI.LegendItem

Friend WithEvents Legend2 As NationalInstruments.UI.WindowsForms.Legend

Friend WithEvents LegendItem4 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem5 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem6 As NationalInstruments.UI.LegendItem

Friend WithEvents Legend3 As NationalInstruments.UI.WindowsForms.Legend

Friend WithEvents LegendItem7 As NationalInstruments.UI.LegendItem

Friend WithEvents Legend4 As NationalInstruments.UI.WindowsForms.Legend

Friend WithEvents LegendItem8 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem9 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem10 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem12 As NationalInstruments.UI.LegendItem

Friend WithEvents WaveformPlot7 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot8 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot9 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot10 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot12 As NationalInstruments.UI.WaveformPlot

Friend WithEvents TabPage5 As System.Windows.Forms.TabPage

Friend WithEvents lflag16 As System.Windows.Forms.Label

Friend WithEvents lflag15 As System.Windows.Forms.Label

Page 7: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents lflag13 As System.Windows.Forms.Label

Friend WithEvents lflag14 As System.Windows.Forms.Label

Friend WithEvents lflag9 As System.Windows.Forms.Label

Friend WithEvents lflag10 As System.Windows.Forms.Label

Friend WithEvents lflag11 As System.Windows.Forms.Label

Friend WithEvents lflag12 As System.Windows.Forms.Label

Friend WithEvents Lflag1 As System.Windows.Forms.Label

Friend WithEvents lflag2 As System.Windows.Forms.Label

Friend WithEvents lflag3 As System.Windows.Forms.Label

Friend WithEvents lflag4 As System.Windows.Forms.Label

Friend WithEvents lflag5 As System.Windows.Forms.Label

Friend WithEvents lflag6 As System.Windows.Forms.Label

Friend WithEvents lflag7 As System.Windows.Forms.Label

Friend WithEvents lflag8 As System.Windows.Forms.Label

Friend WithEvents XAxis5 As NationalInstruments.UI.XAxis

Friend WithEvents YAxis5 As NationalInstruments.UI.YAxis

Friend WithEvents Label10 As System.Windows.Forms.Label

Friend WithEvents Label11 As System.Windows.Forms.Label

Friend WithEvents Label20 As System.Windows.Forms.Label

Friend WithEvents Label21 As System.Windows.Forms.Label

Friend WithEvents Label26 As System.Windows.Forms.Label

Friend WithEvents Label27 As System.Windows.Forms.Label

Friend WithEvents Label32 As System.Windows.Forms.Label

Friend WithEvents Label33 As System.Windows.Forms.Label

Friend WithEvents Bconexion As System.Windows.Forms.Button

Friend WithEvents Timer1 As System.Windows.Forms.Timer

Friend WithEvents TabPage3 As System.Windows.Forms.TabPage

Friend WithEvents WaveformPlot11 As NationalInstruments.UI.WaveformPlot

Friend WithEvents LegendItem11 As NationalInstruments.UI.LegendItem

Friend WithEvents Cb11 As System.Windows.Forms.ComboBox

Friend WithEvents cb12 As System.Windows.Forms.ComboBox

Friend WithEvents Cb13 As System.Windows.Forms.ComboBox

Friend WithEvents Cb14 As System.Windows.Forms.ComboBox

Friend WithEvents Cb22 As System.Windows.Forms.ComboBox

Friend WithEvents Cb21 As System.Windows.Forms.ComboBox

Friend WithEvents cb24 As System.Windows.Forms.ComboBox

Friend WithEvents Cb23 As System.Windows.Forms.ComboBox

Friend WithEvents Cb34 As System.Windows.Forms.ComboBox

Friend WithEvents Cb33 As System.Windows.Forms.ComboBox

Friend WithEvents Cb32 As System.Windows.Forms.ComboBox

Friend WithEvents Cb31 As System.Windows.Forms.ComboBox

Page 8: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Cb44 As System.Windows.Forms.ComboBox

Friend WithEvents Cb43 As System.Windows.Forms.ComboBox

Friend WithEvents cb42 As System.Windows.Forms.ComboBox

Friend WithEvents Cb41 As System.Windows.Forms.ComboBox

Friend WithEvents TabPage7 As System.Windows.Forms.TabPage

Friend WithEvents XAxis1 As NationalInstruments.UI.XAxis

Friend WithEvents YAxis1 As NationalInstruments.UI.YAxis

Friend WithEvents WaveformPlot13 As NationalInstruments.UI.WaveformPlot

Public WithEvents LegendItem13 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem14 As NationalInstruments.UI.LegendItem

Public WithEvents LegendItem15 As NationalInstruments.UI.LegendItem

Friend WithEvents Legend5 As NationalInstruments.UI.WindowsForms.Legend

Public WithEvents LegendItem16 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem17 As NationalInstruments.UI.LegendItem

Public WithEvents LegendItem18 As NationalInstruments.UI.LegendItem

Friend WithEvents Label3 As System.Windows.Forms.Label

Friend WithEvents Label9 As System.Windows.Forms.Label

Friend WithEvents WaveformPlot14 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot15 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot16 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot17 As NationalInstruments.UI.WaveformPlot

Friend WithEvents WaveformPlot18 As NationalInstruments.UI.WaveformPlot

Friend WithEvents LegendItem19 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem20 As NationalInstruments.UI.LegendItem

Friend WithEvents LegendItem21 As NationalInstruments.UI.LegendItem

Friend WithEvents TabPage8 As System.Windows.Forms.TabPage

Friend WithEvents GroupBox9 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox10 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox11 As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox12 As System.Windows.Forms.GroupBox

Friend WithEvents Rb_38400 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_4800 As System.Windows.Forms.RadioButton

Friend WithEvents Tb_tiempo_ranura As System.Windows.Forms.TextBox

Friend WithEvents Label12 As System.Windows.Forms.Label

Friend WithEvents Rb_com_1 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_com_2 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_par As System.Windows.Forms.RadioButton

Friend WithEvents Rb_impar As System.Windows.Forms.RadioButton

Friend WithEvents Rb_sinparidad As System.Windows.Forms.RadioButton

Friend WithEvents Rb_2 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_1 As System.Windows.Forms.RadioButton

Page 9: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Rb_3 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_9600 As System.Windows.Forms.RadioButton

Friend WithEvents XyCursor_graf_3_1 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_3_2 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_2_1 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_2_2 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_1_1 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_1_2 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_graf_4_2 As NationalInstruments.UI.XYCursor

Friend WithEvents cbcursor_graf_1 As System.Windows.Forms.CheckBox

Friend WithEvents cbcursor_graf_3 As System.Windows.Forms.CheckBox

Friend WithEvents cbcursor_graf_2 As System.Windows.Forms.CheckBox

Friend WithEvents cbcursor_graf_4 As System.Windows.Forms.CheckBox

Friend WithEvents tbcursors_graf_1_x As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_1_y As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_3_y As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_3_x As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_2_x As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_2_y As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_4_x As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_graf_4_y As System.Windows.Forms.TextBox

Friend WithEvents XyCursor_graf_4_1 As NationalInstruments.UI.XYCursor

Friend WithEvents Cb_osciloscopio_var_6 As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_5 As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_4 As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_t As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_3 As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_2 As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_var_1 As System.Windows.Forms.ComboBox

Friend WithEvents Osciloscopio As NationalInstruments.UI.WindowsForms.WaveformGraph

Friend WithEvents B_envio_128 As System.Windows.Forms.Button

Friend WithEvents B_osc_exportar As System.Windows.Forms.Button

Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog

Friend WithEvents Label13 As System.Windows.Forms.Label

Friend WithEvents Label14 As System.Windows.Forms.Label

Friend WithEvents Label15 As System.Windows.Forms.Label

Friend WithEvents Tb_osciloscopio_nivel As System.Windows.Forms.TextBox

Friend WithEvents Cb_osciloscopio_flanco As System.Windows.Forms.ComboBox

Friend WithEvents Cb_osciloscopio_canal As System.Windows.Forms.ComboBox

Friend WithEvents Label16 As System.Windows.Forms.Label

Friend WithEvents Label17 As System.Windows.Forms.Label

Page 10: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Label18 As System.Windows.Forms.Label

Friend WithEvents Label19 As System.Windows.Forms.Label

Friend WithEvents Label22 As System.Windows.Forms.Label

Friend WithEvents Idc As System.Windows.Forms.GroupBox

Friend WithEvents GroupBox13 As System.Windows.Forms.GroupBox

Friend WithEvents Tbidc5 As System.Windows.Forms.TextBox

Friend WithEvents Tbidc4 As System.Windows.Forms.TextBox

Friend WithEvents Tbidc3 As System.Windows.Forms.TextBox

Friend WithEvents Tbidc2 As System.Windows.Forms.TextBox

Friend WithEvents Tbidc1 As System.Windows.Forms.TextBox

Friend WithEvents cbcursor_osc As System.Windows.Forms.CheckBox

Friend WithEvents tbcursors_osc_x As System.Windows.Forms.TextBox

Friend WithEvents tbcursors_osc_y As System.Windows.Forms.TextBox

Friend WithEvents XyCursor_osc_1 As NationalInstruments.UI.XYCursor

Friend WithEvents XyCursor_osc_2 As NationalInstruments.UI.XYCursor

Friend WithEvents Timer2 As System.Windows.Forms.Timer

Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox

Friend WithEvents B_rearme As System.Windows.Forms.Button

Friend WithEvents B_parada As System.Windows.Forms.Button

Friend WithEvents B_marcha As System.Windows.Forms.Button

Friend WithEvents Label23 As System.Windows.Forms.Label

Friend WithEvents Label24 As System.Windows.Forms.Label

Friend WithEvents Label25 As System.Windows.Forms.Label

Friend WithEvents Label28 As System.Windows.Forms.Label

Friend WithEvents Label29 As System.Windows.Forms.Label

Friend WithEvents Label30 As System.Windows.Forms.Label

Friend WithEvents Label31 As System.Windows.Forms.Label

Friend WithEvents Label34 As System.Windows.Forms.Label

Friend WithEvents GroupBox14 As System.Windows.Forms.GroupBox

Friend WithEvents Tbmr1 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr2 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr3 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr4 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr5 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr6 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr7 As System.Windows.Forms.TextBox

Friend WithEvents Tbmr8 As System.Windows.Forms.TextBox

Friend WithEvents GroupBox15 As System.Windows.Forms.GroupBox

Friend WithEvents Tbml5 As System.Windows.Forms.TextBox

Friend WithEvents Tbml4 As System.Windows.Forms.TextBox

Friend WithEvents Tbml3 As System.Windows.Forms.TextBox

Page 11: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Tbml2 As System.Windows.Forms.TextBox

Friend WithEvents Tbml1 As System.Windows.Forms.TextBox

Friend WithEvents Label35 As System.Windows.Forms.Label

Friend WithEvents Tbml6 As System.Windows.Forms.TextBox

Friend WithEvents Tbml7 As System.Windows.Forms.TextBox

Friend WithEvents Tbml8 As System.Windows.Forms.TextBox

Friend WithEvents Label36 As System.Windows.Forms.Label

Friend WithEvents Label37 As System.Windows.Forms.Label

Friend WithEvents Label38 As System.Windows.Forms.Label

Friend WithEvents Label39 As System.Windows.Forms.Label

Friend WithEvents Label40 As System.Windows.Forms.Label

Friend WithEvents Label41 As System.Windows.Forms.Label

Friend WithEvents Label42 As System.Windows.Forms.Label

Friend WithEvents TabPage9 As System.Windows.Forms.TabPage

Friend WithEvents GroupBox16 As System.Windows.Forms.GroupBox

Friend WithEvents Label43 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_1 As System.Windows.Forms.TextBox

Friend WithEvents Tb_cal_2 As System.Windows.Forms.TextBox

Friend WithEvents Label44 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_4 As System.Windows.Forms.TextBox

Friend WithEvents Label45 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_3 As System.Windows.Forms.TextBox

Friend WithEvents Label46 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_8 As System.Windows.Forms.TextBox

Friend WithEvents Label47 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_7 As System.Windows.Forms.TextBox

Friend WithEvents Label48 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_6 As System.Windows.Forms.TextBox

Friend WithEvents Label49 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_5 As System.Windows.Forms.TextBox

Friend WithEvents Label50 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_10 As System.Windows.Forms.TextBox

Friend WithEvents Label51 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_9 As System.Windows.Forms.TextBox

Friend WithEvents Label52 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_24 As System.Windows.Forms.TextBox

Friend WithEvents Label53 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_23 As System.Windows.Forms.TextBox

Friend WithEvents Label54 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_22 As System.Windows.Forms.TextBox

Friend WithEvents Label55 As System.Windows.Forms.Label

Page 12: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Tb_cal_21 As System.Windows.Forms.TextBox

Friend WithEvents Label56 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_20 As System.Windows.Forms.TextBox

Friend WithEvents Label57 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_19 As System.Windows.Forms.TextBox

Friend WithEvents Label58 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_18 As System.Windows.Forms.TextBox

Friend WithEvents Label59 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_17 As System.Windows.Forms.TextBox

Friend WithEvents Label60 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_16 As System.Windows.Forms.TextBox

Friend WithEvents Label61 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_15 As System.Windows.Forms.TextBox

Friend WithEvents Label62 As System.Windows.Forms.Label

Friend WithEvents GroupBox17 As System.Windows.Forms.GroupBox

Friend WithEvents Label63 As System.Windows.Forms.Label

Friend WithEvents Label64 As System.Windows.Forms.Label

Friend WithEvents Label65 As System.Windows.Forms.Label

Friend WithEvents Label66 As System.Windows.Forms.Label

Friend WithEvents Label67 As System.Windows.Forms.Label

Friend WithEvents Label68 As System.Windows.Forms.Label

Friend WithEvents Label69 As System.Windows.Forms.Label

Friend WithEvents Label70 As System.Windows.Forms.Label

Friend WithEvents Label71 As System.Windows.Forms.Label

Friend WithEvents Label72 As System.Windows.Forms.Label

Friend WithEvents Label73 As System.Windows.Forms.Label

Friend WithEvents Label74 As System.Windows.Forms.Label

Friend WithEvents Label75 As System.Windows.Forms.Label

Friend WithEvents Label76 As System.Windows.Forms.Label

Friend WithEvents Label77 As System.Windows.Forms.Label

Friend WithEvents Label78 As System.Windows.Forms.Label

Friend WithEvents Label79 As System.Windows.Forms.Label

Friend WithEvents Label80 As System.Windows.Forms.Label

Friend WithEvents Label81 As System.Windows.Forms.Label

Friend WithEvents Label82 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_28 As System.Windows.Forms.TextBox

Friend WithEvents Label83 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_27 As System.Windows.Forms.TextBox

Friend WithEvents Label84 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_26 As System.Windows.Forms.TextBox

Friend WithEvents Label85 As System.Windows.Forms.Label

Page 13: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Tb_cal_25 As System.Windows.Forms.TextBox

Friend WithEvents Label86 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_14 As System.Windows.Forms.TextBox

Friend WithEvents Label87 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_13 As System.Windows.Forms.TextBox

Friend WithEvents Label88 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_12 As System.Windows.Forms.TextBox

Friend WithEvents Label89 As System.Windows.Forms.Label

Friend WithEvents Tb_cal_11 As System.Windows.Forms.TextBox

Friend WithEvents Label90 As System.Windows.Forms.Label

Friend WithEvents Tb_par_20 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_19 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_18 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_17 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_16 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_15 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_14 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_13 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_12 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_11 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_10 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_9 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_8 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_7 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_6 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_5 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_4 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_3 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_2 As System.Windows.Forms.TextBox

Friend WithEvents Tb_par_1 As System.Windows.Forms.TextBox

Friend WithEvents B_envio_67 As System.Windows.Forms.Button

Friend WithEvents B_envio_66 As System.Windows.Forms.Button

Friend WithEvents B_envio_68_2 As System.Windows.Forms.Button

Friend WithEvents B_envio_68_1 As System.Windows.Forms.Button

Friend WithEvents grafica_3 As NationalInstruments.UI.WindowsForms.WaveformGraph

Friend WithEvents grafica_2 As NationalInstruments.UI.WindowsForms.WaveformGraph

Friend WithEvents grafica_4 As NationalInstruments.UI.WindowsForms.WaveformGraph

Friend WithEvents grafica_1 As NationalInstruments.UI.WindowsForms.WaveformGraph

Friend WithEvents Timer3 As System.Windows.Forms.Timer

Friend WithEvents Label91 As System.Windows.Forms.Label

Friend WithEvents Tb_ranura_tx As System.Windows.Forms.TextBox

Page 14: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents B_osc_importar As System.Windows.Forms.Button

Friend WithEvents Label92 As System.Windows.Forms.Label

Friend WithEvents Label93 As System.Windows.Forms.Label

Friend WithEvents Label94 As System.Windows.Forms.Label

Friend WithEvents Label95 As System.Windows.Forms.Label

Friend WithEvents GroupBox18 As System.Windows.Forms.GroupBox

Friend WithEvents Cb_grafica_1 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_grafica_3 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_grafica_2 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_grafica_4 As System.Windows.Forms.CheckBox

Friend WithEvents B_exp_hist As System.Windows.Forms.Button

Friend WithEvents B_imp_hist As System.Windows.Forms.Button

Friend WithEvents Label96 As System.Windows.Forms.Label

Friend WithEvents L_reposo As System.Windows.Forms.Label

Friend WithEvents L_precarga As System.Windows.Forms.Label

Friend WithEvents L_error As System.Windows.Forms.Label

Friend WithEvents L_control As System.Windows.Forms.Label

Friend WithEvents Lb_comunicacion As System.Windows.Forms.Label

Friend WithEvents Cb_rep_1 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rep_2 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rep_3 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rep_4 As System.Windows.Forms.CheckBox

Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox

Friend WithEvents Tbintervalo As System.Windows.Forms.TextBox

Friend WithEvents Label1 As System.Windows.Forms.Label

Friend WithEvents cbautomatico As System.Windows.Forms.CheckBox

Friend WithEvents B_borrar_mensajes As System.Windows.Forms.Button

Friend WithEvents B_guardar_mensajes As System.Windows.Forms.Button

Friend WithEvents Lvmensajes As System.Windows.Forms.ListView

Friend WithEvents B_exp_par As System.Windows.Forms.Button

Friend WithEvents B_imp_par As System.Windows.Forms.Button

Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox

Friend WithEvents Label97 As System.Windows.Forms.Label

Friend WithEvents Label98 As System.Windows.Forms.Label

Friend WithEvents Label99 As System.Windows.Forms.Label

Friend WithEvents Label100 As System.Windows.Forms.Label

Friend WithEvents Label101 As System.Windows.Forms.Label

Friend WithEvents Label102 As System.Windows.Forms.Label

Friend WithEvents Label103 As System.Windows.Forms.Label

Friend WithEvents Label104 As System.Windows.Forms.Label

Friend WithEvents Label105 As System.Windows.Forms.Label

Page 15: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Friend WithEvents Label106 As System.Windows.Forms.Label

Friend WithEvents Label107 As System.Windows.Forms.Label

Friend WithEvents Label108 As System.Windows.Forms.Label

Friend WithEvents Label109 As System.Windows.Forms.Label

Friend WithEvents Label110 As System.Windows.Forms.Label

Friend WithEvents Label111 As System.Windows.Forms.Label

Friend WithEvents Label112 As System.Windows.Forms.Label

Friend WithEvents Label113 As System.Windows.Forms.Label

Friend WithEvents b_rango_y_1 As System.Windows.Forms.Button

Friend WithEvents B_rango_y_2 As System.Windows.Forms.Button

Friend WithEvents B_rango_y_3 As System.Windows.Forms.Button

Friend WithEvents B_rango_y_4 As System.Windows.Forms.Button

Friend WithEvents B_rango_y_osc As System.Windows.Forms.Button

Friend WithEvents Cb_rango_1 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rango_2 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rango_3 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rango_4 As System.Windows.Forms.CheckBox

Friend WithEvents Cb_rango_osc As System.Windows.Forms.CheckBox

Friend WithEvents Rb_57600 As System.Windows.Forms.RadioButton

Friend WithEvents Rb_115200 As System.Windows.Forms.RadioButton

Friend WithEvents YAxis6 As NationalInstruments.UI.YAxis

Friend WithEvents YAxis7 As NationalInstruments.UI.YAxis

Friend WithEvents YAxis8 As NationalInstruments.UI.YAxis

Friend WithEvents YAxis9 As NationalInstruments.UI.YAxis

Friend WithEvents YAxis10 As NationalInstruments.UI.YAxis

Friend WithEvents Label114 As System.Windows.Forms.Label

Friend WithEvents cb_rejilla_x As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_1 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_2 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_3 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_4 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_5 As System.Windows.Forms.CheckBox

Friend WithEvents cb_rejilla_y_6 As System.Windows.Forms.CheckBox

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

Me.components = New System.ComponentModel.Container

Dim configurationAppSettings As System.Configuration.AppSettingsReader = New System.Configuration.AppSettingsReader

Me.TabControl1 = New System.Windows.Forms.TabControl

Me.TabPage5 = New System.Windows.Forms.TabPage

Me.L_control = New System.Windows.Forms.Label

Me.L_error = New System.Windows.Forms.Label

Me.L_precarga = New System.Windows.Forms.Label

Page 16: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.L_reposo = New System.Windows.Forms.Label

Me.Label96 = New System.Windows.Forms.Label

Me.Lflag1 = New System.Windows.Forms.Label

Me.lflag2 = New System.Windows.Forms.Label

Me.lflag3 = New System.Windows.Forms.Label

Me.lflag4 = New System.Windows.Forms.Label

Me.lflag5 = New System.Windows.Forms.Label

Me.lflag6 = New System.Windows.Forms.Label

Me.lflag7 = New System.Windows.Forms.Label

Me.lflag8 = New System.Windows.Forms.Label

Me.lflag9 = New System.Windows.Forms.Label

Me.lflag10 = New System.Windows.Forms.Label

Me.lflag11 = New System.Windows.Forms.Label

Me.lflag12 = New System.Windows.Forms.Label

Me.lflag13 = New System.Windows.Forms.Label

Me.lflag14 = New System.Windows.Forms.Label

Me.lflag15 = New System.Windows.Forms.Label

Me.lflag16 = New System.Windows.Forms.Label

Me.TabPage1 = New System.Windows.Forms.TabPage

Me.GroupBox15 = New System.Windows.Forms.GroupBox

Me.Tbml5 = New System.Windows.Forms.TextBox

Me.Tbml4 = New System.Windows.Forms.TextBox

Me.Tbml3 = New System.Windows.Forms.TextBox

Me.Tbml2 = New System.Windows.Forms.TextBox

Me.Tbml1 = New System.Windows.Forms.TextBox

Me.Label35 = New System.Windows.Forms.Label

Me.Tbml6 = New System.Windows.Forms.TextBox

Me.Tbml7 = New System.Windows.Forms.TextBox

Me.Tbml8 = New System.Windows.Forms.TextBox

Me.Label36 = New System.Windows.Forms.Label

Me.Label37 = New System.Windows.Forms.Label

Me.Label38 = New System.Windows.Forms.Label

Me.Label39 = New System.Windows.Forms.Label

Me.Label40 = New System.Windows.Forms.Label

Me.Label41 = New System.Windows.Forms.Label

Me.Label42 = New System.Windows.Forms.Label

Me.GroupBox14 = New System.Windows.Forms.GroupBox

Me.Tbmr5 = New System.Windows.Forms.TextBox

Me.Tbmr4 = New System.Windows.Forms.TextBox

Me.Tbmr3 = New System.Windows.Forms.TextBox

Me.Tbmr2 = New System.Windows.Forms.TextBox

Page 17: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbmr1 = New System.Windows.Forms.TextBox

Me.Label23 = New System.Windows.Forms.Label

Me.Tbmr6 = New System.Windows.Forms.TextBox

Me.Tbmr7 = New System.Windows.Forms.TextBox

Me.Tbmr8 = New System.Windows.Forms.TextBox

Me.Label24 = New System.Windows.Forms.Label

Me.Label25 = New System.Windows.Forms.Label

Me.Label28 = New System.Windows.Forms.Label

Me.Label29 = New System.Windows.Forms.Label

Me.Label30 = New System.Windows.Forms.Label

Me.Label31 = New System.Windows.Forms.Label

Me.Label34 = New System.Windows.Forms.Label

Me.Idc = New System.Windows.Forms.GroupBox

Me.Label16 = New System.Windows.Forms.Label

Me.Label17 = New System.Windows.Forms.Label

Me.Label18 = New System.Windows.Forms.Label

Me.Label22 = New System.Windows.Forms.Label

Me.Label19 = New System.Windows.Forms.Label

Me.Tbidc1 = New System.Windows.Forms.TextBox

Me.Tbidc2 = New System.Windows.Forms.TextBox

Me.Tbidc3 = New System.Windows.Forms.TextBox

Me.Tbidc4 = New System.Windows.Forms.TextBox

Me.Tbidc5 = New System.Windows.Forms.TextBox

Me.Label103 = New System.Windows.Forms.Label

Me.Label98 = New System.Windows.Forms.Label

Me.Label104 = New System.Windows.Forms.Label

Me.Label101 = New System.Windows.Forms.Label

Me.Label102 = New System.Windows.Forms.Label

Me.GroupBox4 = New System.Windows.Forms.GroupBox

Me.tbq = New System.Windows.Forms.TextBox

Me.tbp = New System.Windows.Forms.TextBox

Me.Label2 = New System.Windows.Forms.Label

Me.LabelP = New System.Windows.Forms.Label

Me.Label4 = New System.Windows.Forms.Label

Me.tbfactor = New System.Windows.Forms.TextBox

Me.Label113 = New System.Windows.Forms.Label

Me.Label105 = New System.Windows.Forms.Label

Me.GroupBox3 = New System.Windows.Forms.GroupBox

Me.tbvc4 = New System.Windows.Forms.TextBox

Me.tbvc3 = New System.Windows.Forms.TextBox

Me.tbvc2 = New System.Windows.Forms.TextBox

Page 18: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbvc1 = New System.Windows.Forms.TextBox

Me.LabelVc4 = New System.Windows.Forms.Label

Me.LabelVC3 = New System.Windows.Forms.Label

Me.LabelVc2 = New System.Windows.Forms.Label

Me.LabelVc1 = New System.Windows.Forms.Label

Me.Label112 = New System.Windows.Forms.Label

Me.Label111 = New System.Windows.Forms.Label

Me.Label110 = New System.Windows.Forms.Label

Me.Label109 = New System.Windows.Forms.Label

Me.GroupBox2 = New System.Windows.Forms.GroupBox

Me.tbvc = New System.Windows.Forms.TextBox

Me.tbvb = New System.Windows.Forms.TextBox

Me.tbva = New System.Windows.Forms.TextBox

Me.LabelVc = New System.Windows.Forms.Label

Me.LabelVb = New System.Windows.Forms.Label

Me.LabelVa = New System.Windows.Forms.Label

Me.Label108 = New System.Windows.Forms.Label

Me.Label107 = New System.Windows.Forms.Label

Me.Label106 = New System.Windows.Forms.Label

Me.GroupBox1 = New System.Windows.Forms.GroupBox

Me.LabelIc = New System.Windows.Forms.Label

Me.LabelIb = New System.Windows.Forms.Label

Me.LabelIa = New System.Windows.Forms.Label

Me.tbic = New System.Windows.Forms.TextBox

Me.Tbib = New System.Windows.Forms.TextBox

Me.Tbia = New System.Windows.Forms.TextBox

Me.Label97 = New System.Windows.Forms.Label

Me.Label100 = New System.Windows.Forms.Label

Me.Label99 = New System.Windows.Forms.Label

Me.TabPage4 = New System.Windows.Forms.TabPage

Me.Cb_rango_4 = New System.Windows.Forms.CheckBox

Me.Cb_rango_3 = New System.Windows.Forms.CheckBox

Me.Cb_rango_2 = New System.Windows.Forms.CheckBox

Me.Cb_rango_1 = New System.Windows.Forms.CheckBox

Me.B_rango_y_4 = New System.Windows.Forms.Button

Me.B_rango_y_3 = New System.Windows.Forms.Button

Me.B_rango_y_2 = New System.Windows.Forms.Button

Me.b_rango_y_1 = New System.Windows.Forms.Button

Me.Cb_rep_4 = New System.Windows.Forms.CheckBox

Me.cb_rep_3 = New System.Windows.Forms.CheckBox

Me.Cb_rep_2 = New System.Windows.Forms.CheckBox

Page 19: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb_rep_1 = New System.Windows.Forms.CheckBox

Me.GroupBox18 = New System.Windows.Forms.GroupBox

Me.B_imp_hist = New System.Windows.Forms.Button

Me.B_exp_hist = New System.Windows.Forms.Button

Me.Cb_grafica_4 = New System.Windows.Forms.CheckBox

Me.Cb_grafica_2 = New System.Windows.Forms.CheckBox

Me.Cb_grafica_3 = New System.Windows.Forms.CheckBox

Me.Cb_grafica_1 = New System.Windows.Forms.CheckBox

Me.Label95 = New System.Windows.Forms.Label

Me.Label94 = New System.Windows.Forms.Label

Me.Label93 = New System.Windows.Forms.Label

Me.Label92 = New System.Windows.Forms.Label

Me.Cb44 = New System.Windows.Forms.ComboBox

Me.Cb43 = New System.Windows.Forms.ComboBox

Me.cb42 = New System.Windows.Forms.ComboBox

Me.Cb41 = New System.Windows.Forms.ComboBox

Me.Cb34 = New System.Windows.Forms.ComboBox

Me.Cb33 = New System.Windows.Forms.ComboBox

Me.Cb32 = New System.Windows.Forms.ComboBox

Me.Cb31 = New System.Windows.Forms.ComboBox

Me.cb24 = New System.Windows.Forms.ComboBox

Me.Cb23 = New System.Windows.Forms.ComboBox

Me.Cb22 = New System.Windows.Forms.ComboBox

Me.Cb21 = New System.Windows.Forms.ComboBox

Me.Cb14 = New System.Windows.Forms.ComboBox

Me.Cb13 = New System.Windows.Forms.ComboBox

Me.cb12 = New System.Windows.Forms.ComboBox

Me.Cb11 = New System.Windows.Forms.ComboBox

Me.Legend4 = New NationalInstruments.UI.WindowsForms.Legend

Me.LegendItem8 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot4 = New NationalInstruments.UI.WaveformPlot

Me.XAxis2 = New NationalInstruments.UI.XAxis

Me.YAxis2 = New NationalInstruments.UI.YAxis

Me.LegendItem12 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot12 = New NationalInstruments.UI.WaveformPlot

Me.LegendItem11 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot11 = New NationalInstruments.UI.WaveformPlot

Me.Legend3 = New NationalInstruments.UI.WindowsForms.Legend

Me.LegendItem7 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot5 = New NationalInstruments.UI.WaveformPlot

Me.XAxis3 = New NationalInstruments.UI.XAxis

Page 20: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.YAxis3 = New NationalInstruments.UI.YAxis

Me.LegendItem9 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot7 = New NationalInstruments.UI.WaveformPlot

Me.LegendItem10 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot8 = New NationalInstruments.UI.WaveformPlot

Me.Legend2 = New NationalInstruments.UI.WindowsForms.Legend

Me.LegendItem4 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot6 = New NationalInstruments.UI.WaveformPlot

Me.XAxis4 = New NationalInstruments.UI.XAxis

Me.YAxis4 = New NationalInstruments.UI.YAxis

Me.LegendItem5 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot9 = New NationalInstruments.UI.WaveformPlot

Me.LegendItem6 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot10 = New NationalInstruments.UI.WaveformPlot

Me.Legend1 = New NationalInstruments.UI.WindowsForms.Legend

Me.LegendItem1 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot1 = New NationalInstruments.UI.WaveformPlot

Me.XAxis5 = New NationalInstruments.UI.XAxis

Me.YAxis5 = New NationalInstruments.UI.YAxis

Me.LegendItem2 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot2 = New NationalInstruments.UI.WaveformPlot

Me.LegendItem3 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot3 = New NationalInstruments.UI.WaveformPlot

Me.grafica_3 = New NationalInstruments.UI.WindowsForms.WaveformGraph

Me.XyCursor_graf_3_1 = New NationalInstruments.UI.XYCursor

Me.XyCursor_graf_3_2 = New NationalInstruments.UI.XYCursor

Me.grafica_2 = New NationalInstruments.UI.WindowsForms.WaveformGraph

Me.XyCursor_graf_2_1 = New NationalInstruments.UI.XYCursor

Me.XyCursor_graf_2_2 = New NationalInstruments.UI.XYCursor

Me.grafica_4 = New NationalInstruments.UI.WindowsForms.WaveformGraph

Me.XyCursor_graf_4_1 = New NationalInstruments.UI.XYCursor

Me.XyCursor_graf_4_2 = New NationalInstruments.UI.XYCursor

Me.grafica_1 = New NationalInstruments.UI.WindowsForms.WaveformGraph

Me.XyCursor_graf_1_1 = New NationalInstruments.UI.XYCursor

Me.XyCursor_graf_1_2 = New NationalInstruments.UI.XYCursor

Me.cbcursor_graf_1 = New System.Windows.Forms.CheckBox

Me.tbcursors_graf_1_x = New System.Windows.Forms.TextBox

Me.Label10 = New System.Windows.Forms.Label

Me.Label11 = New System.Windows.Forms.Label

Me.tbcursors_graf_1_y = New System.Windows.Forms.TextBox

Me.cbcursor_graf_3 = New System.Windows.Forms.CheckBox

Page 21: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbcursors_graf_3_y = New System.Windows.Forms.TextBox

Me.Label20 = New System.Windows.Forms.Label

Me.Label21 = New System.Windows.Forms.Label

Me.tbcursors_graf_3_x = New System.Windows.Forms.TextBox

Me.cbcursor_graf_2 = New System.Windows.Forms.CheckBox

Me.Label27 = New System.Windows.Forms.Label

Me.tbcursors_graf_2_x = New System.Windows.Forms.TextBox

Me.tbcursors_graf_2_y = New System.Windows.Forms.TextBox

Me.Label26 = New System.Windows.Forms.Label

Me.cbcursor_graf_4 = New System.Windows.Forms.CheckBox

Me.Label32 = New System.Windows.Forms.Label

Me.Label33 = New System.Windows.Forms.Label

Me.tbcursors_graf_4_x = New System.Windows.Forms.TextBox

Me.tbcursors_graf_4_y = New System.Windows.Forms.TextBox

Me.TabPage7 = New System.Windows.Forms.TabPage

Me.cb_rejilla_y_6 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_y_5 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_y_4 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_y_3 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_y_2 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_y_1 = New System.Windows.Forms.CheckBox

Me.cb_rejilla_x = New System.Windows.Forms.CheckBox

Me.Label114 = New System.Windows.Forms.Label

Me.Cb_rango_osc = New System.Windows.Forms.CheckBox

Me.B_rango_y_osc = New System.Windows.Forms.Button

Me.Tb_osciloscopio_nivel = New System.Windows.Forms.TextBox

Me.Label15 = New System.Windows.Forms.Label

Me.Cb_osciloscopio_flanco = New System.Windows.Forms.ComboBox

Me.Label14 = New System.Windows.Forms.Label

Me.Cb_osciloscopio_canal = New System.Windows.Forms.ComboBox

Me.Label13 = New System.Windows.Forms.Label

Me.Cb_osciloscopio_var_6 = New System.Windows.Forms.ComboBox

Me.Cb_osciloscopio_var_5 = New System.Windows.Forms.ComboBox

Me.Cb_osciloscopio_var_4 = New System.Windows.Forms.ComboBox

Me.B_osc_importar = New System.Windows.Forms.Button

Me.B_osc_exportar = New System.Windows.Forms.Button

Me.B_envio_128 = New System.Windows.Forms.Button

Me.Cb_osciloscopio_var_t = New System.Windows.Forms.ComboBox

Me.Cb_osciloscopio_var_3 = New System.Windows.Forms.ComboBox

Me.Cb_osciloscopio_var_2 = New System.Windows.Forms.ComboBox

Me.Cb_osciloscopio_var_1 = New System.Windows.Forms.ComboBox

Page 22: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Legend5 = New NationalInstruments.UI.WindowsForms.Legend

Me.LegendItem16 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot13 = New NationalInstruments.UI.WaveformPlot

Me.XAxis1 = New NationalInstruments.UI.XAxis

Me.YAxis1 = New NationalInstruments.UI.YAxis

Me.LegendItem17 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot14 = New NationalInstruments.UI.WaveformPlot

Me.YAxis6 = New NationalInstruments.UI.YAxis

Me.LegendItem18 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot15 = New NationalInstruments.UI.WaveformPlot

Me.YAxis7 = New NationalInstruments.UI.YAxis

Me.LegendItem19 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot16 = New NationalInstruments.UI.WaveformPlot

Me.YAxis8 = New NationalInstruments.UI.YAxis

Me.LegendItem20 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot17 = New NationalInstruments.UI.WaveformPlot

Me.YAxis9 = New NationalInstruments.UI.YAxis

Me.LegendItem21 = New NationalInstruments.UI.LegendItem

Me.WaveformPlot18 = New NationalInstruments.UI.WaveformPlot

Me.YAxis10 = New NationalInstruments.UI.YAxis

Me.cbcursor_osc = New System.Windows.Forms.CheckBox

Me.tbcursors_osc_x = New System.Windows.Forms.TextBox

Me.Label3 = New System.Windows.Forms.Label

Me.Label9 = New System.Windows.Forms.Label

Me.tbcursors_osc_y = New System.Windows.Forms.TextBox

Me.Osciloscopio = New NationalInstruments.UI.WindowsForms.WaveformGraph

Me.XyCursor_osc_1 = New NationalInstruments.UI.XYCursor

Me.XyCursor_osc_2 = New NationalInstruments.UI.XYCursor

Me.TabPage2 = New System.Windows.Forms.TabPage

Me.GroupBox5 = New System.Windows.Forms.GroupBox

Me.Tbintervalo = New System.Windows.Forms.TextBox

Me.Label1 = New System.Windows.Forms.Label

Me.cbautomatico = New System.Windows.Forms.CheckBox

Me.Label8 = New System.Windows.Forms.Label

Me.Label7 = New System.Windows.Forms.Label

Me.Label6 = New System.Windows.Forms.Label

Me.Label5 = New System.Windows.Forms.Label

Me.Lvtabla = New System.Windows.Forms.ListView

Me.cbcampo = New System.Windows.Forms.ComboBox

Me.cbtablas = New System.Windows.Forms.ComboBox

Me.tbvalor = New System.Windows.Forms.TextBox

Page 23: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbbase = New System.Windows.Forms.TextBox

Me.Bnuevoitem = New System.Windows.Forms.Button

Me.Basignar = New System.Windows.Forms.Button

Me.Beliminaritem = New System.Windows.Forms.Button

Me.Bguardarbase = New System.Windows.Forms.Button

Me.breleertabla = New System.Windows.Forms.Button

Me.Babrirtabla = New System.Windows.Forms.Button

Me.Bmostrartablas = New System.Windows.Forms.Button

Me.Bexaminar = New System.Windows.Forms.Button

Me.TabPage9 = New System.Windows.Forms.TabPage

Me.B_imp_par = New System.Windows.Forms.Button

Me.B_exp_par = New System.Windows.Forms.Button

Me.GroupBox17 = New System.Windows.Forms.GroupBox

Me.Tb_par_20 = New System.Windows.Forms.TextBox

Me.Label63 = New System.Windows.Forms.Label

Me.Tb_par_19 = New System.Windows.Forms.TextBox

Me.Label64 = New System.Windows.Forms.Label

Me.Tb_par_18 = New System.Windows.Forms.TextBox

Me.Label65 = New System.Windows.Forms.Label

Me.Tb_par_17 = New System.Windows.Forms.TextBox

Me.Label66 = New System.Windows.Forms.Label

Me.Tb_par_16 = New System.Windows.Forms.TextBox

Me.Label67 = New System.Windows.Forms.Label

Me.Tb_par_15 = New System.Windows.Forms.TextBox

Me.Label68 = New System.Windows.Forms.Label

Me.Tb_par_14 = New System.Windows.Forms.TextBox

Me.Label69 = New System.Windows.Forms.Label

Me.Tb_par_13 = New System.Windows.Forms.TextBox

Me.Label70 = New System.Windows.Forms.Label

Me.Tb_par_12 = New System.Windows.Forms.TextBox

Me.Label71 = New System.Windows.Forms.Label

Me.Tb_par_11 = New System.Windows.Forms.TextBox

Me.Label72 = New System.Windows.Forms.Label

Me.Tb_par_10 = New System.Windows.Forms.TextBox

Me.Label73 = New System.Windows.Forms.Label

Me.Tb_par_9 = New System.Windows.Forms.TextBox

Me.Label74 = New System.Windows.Forms.Label

Me.Tb_par_8 = New System.Windows.Forms.TextBox

Me.Label75 = New System.Windows.Forms.Label

Me.Tb_par_7 = New System.Windows.Forms.TextBox

Me.Label76 = New System.Windows.Forms.Label

Page 24: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_par_6 = New System.Windows.Forms.TextBox

Me.Label77 = New System.Windows.Forms.Label

Me.Tb_par_5 = New System.Windows.Forms.TextBox

Me.Label78 = New System.Windows.Forms.Label

Me.Tb_par_4 = New System.Windows.Forms.TextBox

Me.Label79 = New System.Windows.Forms.Label

Me.Tb_par_3 = New System.Windows.Forms.TextBox

Me.Label80 = New System.Windows.Forms.Label

Me.Tb_par_2 = New System.Windows.Forms.TextBox

Me.Label81 = New System.Windows.Forms.Label

Me.Tb_par_1 = New System.Windows.Forms.TextBox

Me.Label82 = New System.Windows.Forms.Label

Me.B_envio_67 = New System.Windows.Forms.Button

Me.B_envio_68_2 = New System.Windows.Forms.Button

Me.GroupBox16 = New System.Windows.Forms.GroupBox

Me.Tb_cal_28 = New System.Windows.Forms.TextBox

Me.Label83 = New System.Windows.Forms.Label

Me.Tb_cal_27 = New System.Windows.Forms.TextBox

Me.Label84 = New System.Windows.Forms.Label

Me.Tb_cal_26 = New System.Windows.Forms.TextBox

Me.Label85 = New System.Windows.Forms.Label

Me.Tb_cal_25 = New System.Windows.Forms.TextBox

Me.Label86 = New System.Windows.Forms.Label

Me.Tb_cal_14 = New System.Windows.Forms.TextBox

Me.Label87 = New System.Windows.Forms.Label

Me.Tb_cal_13 = New System.Windows.Forms.TextBox

Me.Label88 = New System.Windows.Forms.Label

Me.Tb_cal_12 = New System.Windows.Forms.TextBox

Me.Label89 = New System.Windows.Forms.Label

Me.Tb_cal_11 = New System.Windows.Forms.TextBox

Me.Label90 = New System.Windows.Forms.Label

Me.Tb_cal_24 = New System.Windows.Forms.TextBox

Me.Label53 = New System.Windows.Forms.Label

Me.Tb_cal_23 = New System.Windows.Forms.TextBox

Me.Label54 = New System.Windows.Forms.Label

Me.Tb_cal_22 = New System.Windows.Forms.TextBox

Me.Label55 = New System.Windows.Forms.Label

Me.Tb_cal_21 = New System.Windows.Forms.TextBox

Me.Label56 = New System.Windows.Forms.Label

Me.Tb_cal_20 = New System.Windows.Forms.TextBox

Me.Label57 = New System.Windows.Forms.Label

Page 25: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_cal_19 = New System.Windows.Forms.TextBox

Me.Label58 = New System.Windows.Forms.Label

Me.Tb_cal_18 = New System.Windows.Forms.TextBox

Me.Label59 = New System.Windows.Forms.Label

Me.Tb_cal_17 = New System.Windows.Forms.TextBox

Me.Label60 = New System.Windows.Forms.Label

Me.Tb_cal_16 = New System.Windows.Forms.TextBox

Me.Label61 = New System.Windows.Forms.Label

Me.Tb_cal_15 = New System.Windows.Forms.TextBox

Me.Label62 = New System.Windows.Forms.Label

Me.Tb_cal_10 = New System.Windows.Forms.TextBox

Me.Label51 = New System.Windows.Forms.Label

Me.Tb_cal_9 = New System.Windows.Forms.TextBox

Me.Label52 = New System.Windows.Forms.Label

Me.Tb_cal_8 = New System.Windows.Forms.TextBox

Me.Label47 = New System.Windows.Forms.Label

Me.Tb_cal_7 = New System.Windows.Forms.TextBox

Me.Label48 = New System.Windows.Forms.Label

Me.Tb_cal_6 = New System.Windows.Forms.TextBox

Me.Label49 = New System.Windows.Forms.Label

Me.Tb_cal_5 = New System.Windows.Forms.TextBox

Me.Label50 = New System.Windows.Forms.Label

Me.Tb_cal_4 = New System.Windows.Forms.TextBox

Me.Label45 = New System.Windows.Forms.Label

Me.Tb_cal_3 = New System.Windows.Forms.TextBox

Me.Label46 = New System.Windows.Forms.Label

Me.Tb_cal_2 = New System.Windows.Forms.TextBox

Me.Label44 = New System.Windows.Forms.Label

Me.Tb_cal_1 = New System.Windows.Forms.TextBox

Me.Label43 = New System.Windows.Forms.Label

Me.B_envio_68_1 = New System.Windows.Forms.Button

Me.B_envio_66 = New System.Windows.Forms.Button

Me.TabPage3 = New System.Windows.Forms.TabPage

Me.Lvmensajes = New System.Windows.Forms.ListView

Me.B_guardar_mensajes = New System.Windows.Forms.Button

Me.B_borrar_mensajes = New System.Windows.Forms.Button

Me.TabPage8 = New System.Windows.Forms.TabPage

Me.GroupBox6 = New System.Windows.Forms.GroupBox

Me.Label12 = New System.Windows.Forms.Label

Me.Tb_tiempo_ranura = New System.Windows.Forms.TextBox

Me.Label91 = New System.Windows.Forms.Label

Page 26: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_ranura_tx = New System.Windows.Forms.TextBox

Me.GroupBox12 = New System.Windows.Forms.GroupBox

Me.Rb_par = New System.Windows.Forms.RadioButton

Me.Rb_impar = New System.Windows.Forms.RadioButton

Me.Rb_sinparidad = New System.Windows.Forms.RadioButton

Me.GroupBox11 = New System.Windows.Forms.GroupBox

Me.Rb_2 = New System.Windows.Forms.RadioButton

Me.Rb_1 = New System.Windows.Forms.RadioButton

Me.Rb_3 = New System.Windows.Forms.RadioButton

Me.GroupBox10 = New System.Windows.Forms.GroupBox

Me.Rb_com_2 = New System.Windows.Forms.RadioButton

Me.Rb_com_1 = New System.Windows.Forms.RadioButton

Me.GroupBox9 = New System.Windows.Forms.GroupBox

Me.Rb_4800 = New System.Windows.Forms.RadioButton

Me.Rb_38400 = New System.Windows.Forms.RadioButton

Me.Rb_9600 = New System.Windows.Forms.RadioButton

Me.Rb_57600 = New System.Windows.Forms.RadioButton

Me.Rb_115200 = New System.Windows.Forms.RadioButton

Me.Bsalir = New System.Windows.Forms.Button

Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog

Me.StatusBar2 = New System.Windows.Forms.StatusBar

Me.StatusBar1 = New System.Windows.Forms.StatusBar

Me.Bconexion = New System.Windows.Forms.Button

Me.Timer1 = New System.Windows.Forms.Timer(Me.components)

Me.LegendItem13 = New NationalInstruments.UI.LegendItem

Me.LegendItem14 = New NationalInstruments.UI.LegendItem

Me.LegendItem15 = New NationalInstruments.UI.LegendItem

Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog

Me.GroupBox13 = New System.Windows.Forms.GroupBox

Me.Timer2 = New System.Windows.Forms.Timer(Me.components)

Me.GroupBox7 = New System.Windows.Forms.GroupBox

Me.B_rearme = New System.Windows.Forms.Button

Me.B_parada = New System.Windows.Forms.Button

Me.B_marcha = New System.Windows.Forms.Button

Me.Timer3 = New System.Windows.Forms.Timer(Me.components)

Me.Lb_comunicacion = New System.Windows.Forms.Label

Me.TabControl1.SuspendLayout()

Me.TabPage5.SuspendLayout()

Me.TabPage1.SuspendLayout()

Me.GroupBox15.SuspendLayout()

Me.GroupBox14.SuspendLayout()

Page 27: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Idc.SuspendLayout()

Me.GroupBox4.SuspendLayout()

Me.GroupBox3.SuspendLayout()

Me.GroupBox2.SuspendLayout()

Me.GroupBox1.SuspendLayout()

Me.TabPage4.SuspendLayout()

Me.GroupBox18.SuspendLayout()

CType(Me.Legend4, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.Legend3, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.Legend2, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.Legend1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.grafica_3, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_3_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_3_2, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.grafica_2, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_2_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_2_2, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.grafica_4, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_4_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_4_2, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.grafica_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_1_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_graf_1_2, System.ComponentModel.ISupportInitialize).BeginInit()

Me.TabPage7.SuspendLayout()

CType(Me.Legend5, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.Osciloscopio, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_osc_1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.XyCursor_osc_2, System.ComponentModel.ISupportInitialize).BeginInit()

Me.TabPage2.SuspendLayout()

Me.GroupBox5.SuspendLayout()

Me.TabPage9.SuspendLayout()

Me.GroupBox17.SuspendLayout()

Me.GroupBox16.SuspendLayout()

Me.TabPage3.SuspendLayout()

Me.TabPage8.SuspendLayout()

Me.GroupBox6.SuspendLayout()

Me.GroupBox12.SuspendLayout()

Me.GroupBox11.SuspendLayout()

Me.GroupBox10.SuspendLayout()

Me.GroupBox9.SuspendLayout()

Me.GroupBox7.SuspendLayout()

Page 28: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.SuspendLayout()

'

'TabControl1

'

Me.TabControl1.Controls.Add(Me.TabPage5)

Me.TabControl1.Controls.Add(Me.TabPage1)

Me.TabControl1.Controls.Add(Me.TabPage4)

Me.TabControl1.Controls.Add(Me.TabPage7)

Me.TabControl1.Controls.Add(Me.TabPage2)

Me.TabControl1.Controls.Add(Me.TabPage9)

Me.TabControl1.Controls.Add(Me.TabPage3)

Me.TabControl1.Controls.Add(Me.TabPage8)

Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Top

Me.TabControl1.Location = New System.Drawing.Point(0, 0)

Me.TabControl1.Name = "TabControl1"

Me.TabControl1.SelectedIndex = 0

Me.TabControl1.Size = New System.Drawing.Size(1018, 544)

Me.TabControl1.TabIndex = 2

'

'TabPage5

'

Me.TabPage5.BackColor = System.Drawing.Color.Gainsboro

Me.TabPage5.Controls.Add(Me.L_control)

Me.TabPage5.Controls.Add(Me.L_error)

Me.TabPage5.Controls.Add(Me.L_precarga)

Me.TabPage5.Controls.Add(Me.L_reposo)

Me.TabPage5.Controls.Add(Me.Label96)

Me.TabPage5.Controls.Add(Me.Lflag1)

Me.TabPage5.Controls.Add(Me.lflag2)

Me.TabPage5.Controls.Add(Me.lflag3)

Me.TabPage5.Controls.Add(Me.lflag4)

Me.TabPage5.Controls.Add(Me.lflag5)

Me.TabPage5.Controls.Add(Me.lflag6)

Me.TabPage5.Controls.Add(Me.lflag7)

Me.TabPage5.Controls.Add(Me.lflag8)

Me.TabPage5.Controls.Add(Me.lflag9)

Me.TabPage5.Controls.Add(Me.lflag10)

Me.TabPage5.Controls.Add(Me.lflag11)

Me.TabPage5.Controls.Add(Me.lflag12)

Me.TabPage5.Controls.Add(Me.lflag13)

Me.TabPage5.Controls.Add(Me.lflag14)

Page 29: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.TabPage5.Controls.Add(Me.lflag15)

Me.TabPage5.Controls.Add(Me.lflag16)

Me.TabPage5.ForeColor = System.Drawing.Color.Green

Me.TabPage5.Location = New System.Drawing.Point(4, 22)

Me.TabPage5.Name = "TabPage5"

Me.TabPage5.Size = New System.Drawing.Size(1010, 518)

Me.TabPage5.TabIndex = 0

Me.TabPage5.Text = "Estado y Alarmas"

'

'L_control

'

Me.L_control.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.L_control.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.L_control.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.L_control.ForeColor = System.Drawing.Color.Black

Me.L_control.Location = New System.Drawing.Point(32, 184)

Me.L_control.Name = "L_control"

Me.L_control.Size = New System.Drawing.Size(152, 56)

Me.L_control.TabIndex = 86

Me.L_control.Text = "Control activo"

Me.L_control.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'L_error

'

Me.L_error.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.L_error.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.L_error.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.L_error.ForeColor = System.Drawing.Color.Black

Me.L_error.Location = New System.Drawing.Point(32, 248)

Me.L_error.Name = "L_error"

Me.L_error.Size = New System.Drawing.Size(152, 56)

Me.L_error.TabIndex = 85

Me.L_error.Text = "Error"

Me.L_error.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'L_precarga

'

Me.L_precarga.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.L_precarga.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.L_precarga.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Regular,

Page 30: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.L_precarga.ForeColor = System.Drawing.Color.Black

Me.L_precarga.Location = New System.Drawing.Point(32, 120)

Me.L_precarga.Name = "L_precarga"

Me.L_precarga.Size = New System.Drawing.Size(152, 56)

Me.L_precarga.TabIndex = 84

Me.L_precarga.Text = "Precarga"

Me.L_precarga.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'L_reposo

'

Me.L_reposo.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.L_reposo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.L_reposo.Font = New System.Drawing.Font("Arial", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.L_reposo.ForeColor = System.Drawing.Color.Black

Me.L_reposo.Location = New System.Drawing.Point(32, 56)

Me.L_reposo.Name = "L_reposo"

Me.L_reposo.Size = New System.Drawing.Size(152, 56)

Me.L_reposo.TabIndex = 82

Me.L_reposo.Text = "Reposo"

Me.L_reposo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'Label96

'

Me.Label96.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label96.ForeColor = System.Drawing.Color.Black

Me.Label96.Location = New System.Drawing.Point(40, 32)

Me.Label96.Name = "Label96"

Me.Label96.Size = New System.Drawing.Size(136, 16)

Me.Label96.TabIndex = 81

Me.Label96.Text = "Estado del convertidor"

'

'Lflag1

'

Me.Lflag1.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.Lflag1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.Lflag1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Lflag1.ForeColor = System.Drawing.Color.Black

Me.Lflag1.Location = New System.Drawing.Point(384, 64)

Page 31: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Lflag1.Name = "Lflag1"

Me.Lflag1.Size = New System.Drawing.Size(48, 16)

Me.Lflag1.TabIndex = 80

Me.Lflag1.Text = "Flag 1"

Me.Lflag1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag2

'

Me.lflag2.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag2.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag2.ForeColor = System.Drawing.Color.Black

Me.lflag2.Location = New System.Drawing.Point(384, 96)

Me.lflag2.Name = "lflag2"

Me.lflag2.Size = New System.Drawing.Size(48, 16)

Me.lflag2.TabIndex = 79

Me.lflag2.Text = "Flag 2"

Me.lflag2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag3

'

Me.lflag3.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag3.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag3.ForeColor = System.Drawing.Color.Black

Me.lflag3.Location = New System.Drawing.Point(384, 128)

Me.lflag3.Name = "lflag3"

Me.lflag3.Size = New System.Drawing.Size(48, 16)

Me.lflag3.TabIndex = 78

Me.lflag3.Text = "Flag 3"

Me.lflag3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag4

'

Me.lflag4.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag4.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag4.ForeColor = System.Drawing.Color.Black

Me.lflag4.Location = New System.Drawing.Point(384, 160)

Page 32: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.lflag4.Name = "lflag4"

Me.lflag4.Size = New System.Drawing.Size(48, 16)

Me.lflag4.TabIndex = 77

Me.lflag4.Text = "Flag 4"

Me.lflag4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag5

'

Me.lflag5.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag5.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag5.ForeColor = System.Drawing.Color.Black

Me.lflag5.Location = New System.Drawing.Point(384, 192)

Me.lflag5.Name = "lflag5"

Me.lflag5.Size = New System.Drawing.Size(48, 16)

Me.lflag5.TabIndex = 76

Me.lflag5.Text = "Flag 5"

Me.lflag5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag6

'

Me.lflag6.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag6.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag6.ForeColor = System.Drawing.Color.Black

Me.lflag6.Location = New System.Drawing.Point(384, 224)

Me.lflag6.Name = "lflag6"

Me.lflag6.Size = New System.Drawing.Size(48, 16)

Me.lflag6.TabIndex = 75

Me.lflag6.Text = "Flag 6"

Me.lflag6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag7

'

Me.lflag7.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag7.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag7.ForeColor = System.Drawing.Color.Black

Me.lflag7.Location = New System.Drawing.Point(384, 256)

Page 33: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.lflag7.Name = "lflag7"

Me.lflag7.Size = New System.Drawing.Size(48, 16)

Me.lflag7.TabIndex = 74

Me.lflag7.Text = "Flag 7"

Me.lflag7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag8

'

Me.lflag8.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag8.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag8.ForeColor = System.Drawing.Color.Black

Me.lflag8.Location = New System.Drawing.Point(384, 288)

Me.lflag8.Name = "lflag8"

Me.lflag8.Size = New System.Drawing.Size(48, 16)

Me.lflag8.TabIndex = 73

Me.lflag8.Text = "Flag 8"

Me.lflag8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag9

'

Me.lflag9.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag9.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag9.ForeColor = System.Drawing.Color.Black

Me.lflag9.Location = New System.Drawing.Point(568, 64)

Me.lflag9.Name = "lflag9"

Me.lflag9.Size = New System.Drawing.Size(48, 16)

Me.lflag9.TabIndex = 72

Me.lflag9.Text = "Flag 9"

Me.lflag9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag10

'

Me.lflag10.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag10.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag10.ForeColor = System.Drawing.Color.Black

Me.lflag10.Location = New System.Drawing.Point(568, 96)

Page 34: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.lflag10.Name = "lflag10"

Me.lflag10.Size = New System.Drawing.Size(48, 16)

Me.lflag10.TabIndex = 71

Me.lflag10.Text = "Flag 10"

Me.lflag10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag11

'

Me.lflag11.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag11.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag11.ForeColor = System.Drawing.Color.Black

Me.lflag11.Location = New System.Drawing.Point(568, 128)

Me.lflag11.Name = "lflag11"

Me.lflag11.Size = New System.Drawing.Size(48, 16)

Me.lflag11.TabIndex = 70

Me.lflag11.Text = "Flag 11"

Me.lflag11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag12

'

Me.lflag12.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag12.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag12.ForeColor = System.Drawing.Color.Black

Me.lflag12.Location = New System.Drawing.Point(568, 160)

Me.lflag12.Name = "lflag12"

Me.lflag12.Size = New System.Drawing.Size(48, 16)

Me.lflag12.TabIndex = 69

Me.lflag12.Text = "Flag 12"

Me.lflag12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag13

'

Me.lflag13.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag13.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag13.ForeColor = System.Drawing.Color.Black

Me.lflag13.Location = New System.Drawing.Point(568, 192)

Page 35: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.lflag13.Name = "lflag13"

Me.lflag13.Size = New System.Drawing.Size(48, 16)

Me.lflag13.TabIndex = 68

Me.lflag13.Text = "Flag 13"

Me.lflag13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag14

'

Me.lflag14.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag14.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag14.ForeColor = System.Drawing.Color.Black

Me.lflag14.Location = New System.Drawing.Point(568, 224)

Me.lflag14.Name = "lflag14"

Me.lflag14.Size = New System.Drawing.Size(48, 16)

Me.lflag14.TabIndex = 67

Me.lflag14.Text = "Flag 14"

Me.lflag14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag15

'

Me.lflag15.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag15.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag15.ForeColor = System.Drawing.Color.Black

Me.lflag15.Location = New System.Drawing.Point(568, 256)

Me.lflag15.Name = "lflag15"

Me.lflag15.Size = New System.Drawing.Size(48, 16)

Me.lflag15.TabIndex = 65

Me.lflag15.Text = "Flag 15"

Me.lflag15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'lflag16

'

Me.lflag16.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))

Me.lflag16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D

Me.lflag16.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.lflag16.ForeColor = System.Drawing.Color.Black

Me.lflag16.Location = New System.Drawing.Point(568, 288)

Page 36: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.lflag16.Name = "lflag16"

Me.lflag16.Size = New System.Drawing.Size(48, 16)

Me.lflag16.TabIndex = 64

Me.lflag16.Text = "Flag 16"

Me.lflag16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

'

'TabPage1

'

Me.TabPage1.Controls.Add(Me.GroupBox15)

Me.TabPage1.Controls.Add(Me.GroupBox14)

Me.TabPage1.Controls.Add(Me.Idc)

Me.TabPage1.Controls.Add(Me.GroupBox4)

Me.TabPage1.Controls.Add(Me.GroupBox3)

Me.TabPage1.Controls.Add(Me.GroupBox2)

Me.TabPage1.Controls.Add(Me.GroupBox1)

Me.TabPage1.Location = New System.Drawing.Point(4, 22)

Me.TabPage1.Name = "TabPage1"

Me.TabPage1.Size = New System.Drawing.Size(1010, 518)

Me.TabPage1.TabIndex = 1

Me.TabPage1.Text = "Medidas"

'

'GroupBox15

'

Me.GroupBox15.Controls.Add(Me.Tbml5)

Me.GroupBox15.Controls.Add(Me.Tbml4)

Me.GroupBox15.Controls.Add(Me.Tbml3)

Me.GroupBox15.Controls.Add(Me.Tbml2)

Me.GroupBox15.Controls.Add(Me.Tbml1)

Me.GroupBox15.Controls.Add(Me.Label35)

Me.GroupBox15.Controls.Add(Me.Tbml6)

Me.GroupBox15.Controls.Add(Me.Tbml7)

Me.GroupBox15.Controls.Add(Me.Tbml8)

Me.GroupBox15.Controls.Add(Me.Label36)

Me.GroupBox15.Controls.Add(Me.Label37)

Me.GroupBox15.Controls.Add(Me.Label38)

Me.GroupBox15.Controls.Add(Me.Label39)

Me.GroupBox15.Controls.Add(Me.Label40)

Me.GroupBox15.Controls.Add(Me.Label41)

Me.GroupBox15.Controls.Add(Me.Label42)

Me.GroupBox15.ForeColor = System.Drawing.Color.Black

Me.GroupBox15.Location = New System.Drawing.Point(624, 16)

Page 37: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox15.Name = "GroupBox15"

Me.GroupBox15.Size = New System.Drawing.Size(128, 280)

Me.GroupBox15.TabIndex = 27

Me.GroupBox15.TabStop = False

Me.GroupBox15.Text = "Medidas lentas"

'

'Tbml5

'

Me.Tbml5.ForeColor = System.Drawing.Color.Black

Me.Tbml5.Location = New System.Drawing.Point(40, 152)

Me.Tbml5.Name = "Tbml5"

Me.Tbml5.Size = New System.Drawing.Size(64, 20)

Me.Tbml5.TabIndex = 23

Me.Tbml5.Text = "0"

Me.Tbml5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml4

'

Me.Tbml4.ForeColor = System.Drawing.Color.Black

Me.Tbml4.Location = New System.Drawing.Point(40, 120)

Me.Tbml4.Name = "Tbml4"

Me.Tbml4.Size = New System.Drawing.Size(64, 20)

Me.Tbml4.TabIndex = 22

Me.Tbml4.Text = "0"

Me.Tbml4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml3

'

Me.Tbml3.ForeColor = System.Drawing.Color.Black

Me.Tbml3.Location = New System.Drawing.Point(40, 88)

Me.Tbml3.Name = "Tbml3"

Me.Tbml3.Size = New System.Drawing.Size(64, 20)

Me.Tbml3.TabIndex = 21

Me.Tbml3.Text = "0"

Me.Tbml3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml2

'

Me.Tbml2.ForeColor = System.Drawing.Color.Black

Me.Tbml2.Location = New System.Drawing.Point(40, 56)

Me.Tbml2.Name = "Tbml2"

Page 38: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbml2.Size = New System.Drawing.Size(64, 20)

Me.Tbml2.TabIndex = 20

Me.Tbml2.Text = "0"

Me.Tbml2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml1

'

Me.Tbml1.ForeColor = System.Drawing.Color.Black

Me.Tbml1.Location = New System.Drawing.Point(40, 24)

Me.Tbml1.Name = "Tbml1"

Me.Tbml1.Size = New System.Drawing.Size(64, 20)

Me.Tbml1.TabIndex = 19

Me.Tbml1.Text = "0"

Me.Tbml1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label35

'

Me.Label35.ForeColor = System.Drawing.Color.Black

Me.Label35.Location = New System.Drawing.Point(8, 24)

Me.Label35.Name = "Label35"

Me.Label35.Size = New System.Drawing.Size(32, 16)

Me.Label35.TabIndex = 18

Me.Label35.Text = "ML1"

'

'Tbml6

'

Me.Tbml6.ForeColor = System.Drawing.Color.Black

Me.Tbml6.Location = New System.Drawing.Point(40, 184)

Me.Tbml6.Name = "Tbml6"

Me.Tbml6.Size = New System.Drawing.Size(64, 20)

Me.Tbml6.TabIndex = 27

Me.Tbml6.Text = "0"

Me.Tbml6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml7

'

Me.Tbml7.ForeColor = System.Drawing.Color.Black

Me.Tbml7.Location = New System.Drawing.Point(40, 216)

Me.Tbml7.Name = "Tbml7"

Me.Tbml7.Size = New System.Drawing.Size(64, 20)

Me.Tbml7.TabIndex = 28

Page 39: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbml7.Text = "0"

Me.Tbml7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbml8

'

Me.Tbml8.ForeColor = System.Drawing.Color.Black

Me.Tbml8.Location = New System.Drawing.Point(40, 248)

Me.Tbml8.Name = "Tbml8"

Me.Tbml8.Size = New System.Drawing.Size(64, 20)

Me.Tbml8.TabIndex = 29

Me.Tbml8.Text = "0"

Me.Tbml8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label36

'

Me.Label36.ForeColor = System.Drawing.Color.Black

Me.Label36.Location = New System.Drawing.Point(8, 56)

Me.Label36.Name = "Label36"

Me.Label36.Size = New System.Drawing.Size(32, 16)

Me.Label36.TabIndex = 19

Me.Label36.Text = "ML2"

'

'Label37

'

Me.Label37.ForeColor = System.Drawing.Color.Black

Me.Label37.Location = New System.Drawing.Point(8, 88)

Me.Label37.Name = "Label37"

Me.Label37.Size = New System.Drawing.Size(32, 16)

Me.Label37.TabIndex = 20

Me.Label37.Text = "ML3"

'

'Label38

'

Me.Label38.ForeColor = System.Drawing.Color.Black

Me.Label38.Location = New System.Drawing.Point(8, 120)

Me.Label38.Name = "Label38"

Me.Label38.Size = New System.Drawing.Size(32, 16)

Me.Label38.TabIndex = 21

Me.Label38.Text = "ML4"

'

'Label39

Page 40: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Label39.ForeColor = System.Drawing.Color.Black

Me.Label39.Location = New System.Drawing.Point(8, 152)

Me.Label39.Name = "Label39"

Me.Label39.Size = New System.Drawing.Size(32, 16)

Me.Label39.TabIndex = 22

Me.Label39.Text = "ML5"

'

'Label40

'

Me.Label40.ForeColor = System.Drawing.Color.Black

Me.Label40.Location = New System.Drawing.Point(8, 184)

Me.Label40.Name = "Label40"

Me.Label40.Size = New System.Drawing.Size(32, 16)

Me.Label40.TabIndex = 23

Me.Label40.Text = "ML6"

'

'Label41

'

Me.Label41.ForeColor = System.Drawing.Color.Black

Me.Label41.Location = New System.Drawing.Point(8, 216)

Me.Label41.Name = "Label41"

Me.Label41.Size = New System.Drawing.Size(32, 16)

Me.Label41.TabIndex = 24

Me.Label41.Text = "ML7"

'

'Label42

'

Me.Label42.ForeColor = System.Drawing.Color.Black

Me.Label42.Location = New System.Drawing.Point(8, 248)

Me.Label42.Name = "Label42"

Me.Label42.Size = New System.Drawing.Size(32, 16)

Me.Label42.TabIndex = 25

Me.Label42.Text = "ML8"

'

'GroupBox14

'

Me.GroupBox14.Controls.Add(Me.Tbmr5)

Me.GroupBox14.Controls.Add(Me.Tbmr4)

Me.GroupBox14.Controls.Add(Me.Tbmr3)

Me.GroupBox14.Controls.Add(Me.Tbmr2)

Page 41: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox14.Controls.Add(Me.Tbmr1)

Me.GroupBox14.Controls.Add(Me.Label23)

Me.GroupBox14.Controls.Add(Me.Tbmr6)

Me.GroupBox14.Controls.Add(Me.Tbmr7)

Me.GroupBox14.Controls.Add(Me.Tbmr8)

Me.GroupBox14.Controls.Add(Me.Label24)

Me.GroupBox14.Controls.Add(Me.Label25)

Me.GroupBox14.Controls.Add(Me.Label28)

Me.GroupBox14.Controls.Add(Me.Label29)

Me.GroupBox14.Controls.Add(Me.Label30)

Me.GroupBox14.Controls.Add(Me.Label31)

Me.GroupBox14.Controls.Add(Me.Label34)

Me.GroupBox14.ForeColor = System.Drawing.Color.Black

Me.GroupBox14.Location = New System.Drawing.Point(480, 16)

Me.GroupBox14.Name = "GroupBox14"

Me.GroupBox14.Size = New System.Drawing.Size(128, 280)

Me.GroupBox14.TabIndex = 26

Me.GroupBox14.TabStop = False

Me.GroupBox14.Text = "Medidas rápidas"

'

'Tbmr5

'

Me.Tbmr5.ForeColor = System.Drawing.Color.Black

Me.Tbmr5.Location = New System.Drawing.Point(40, 152)

Me.Tbmr5.Name = "Tbmr5"

Me.Tbmr5.Size = New System.Drawing.Size(64, 20)

Me.Tbmr5.TabIndex = 23

Me.Tbmr5.Text = "0"

Me.Tbmr5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr4

'

Me.Tbmr4.ForeColor = System.Drawing.Color.Black

Me.Tbmr4.Location = New System.Drawing.Point(40, 120)

Me.Tbmr4.Name = "Tbmr4"

Me.Tbmr4.Size = New System.Drawing.Size(64, 20)

Me.Tbmr4.TabIndex = 22

Me.Tbmr4.Text = "0"

Me.Tbmr4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr3

Page 42: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Tbmr3.ForeColor = System.Drawing.Color.Black

Me.Tbmr3.Location = New System.Drawing.Point(40, 88)

Me.Tbmr3.Name = "Tbmr3"

Me.Tbmr3.Size = New System.Drawing.Size(64, 20)

Me.Tbmr3.TabIndex = 21

Me.Tbmr3.Text = "0"

Me.Tbmr3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr2

'

Me.Tbmr2.ForeColor = System.Drawing.Color.Black

Me.Tbmr2.Location = New System.Drawing.Point(40, 56)

Me.Tbmr2.Name = "Tbmr2"

Me.Tbmr2.Size = New System.Drawing.Size(64, 20)

Me.Tbmr2.TabIndex = 20

Me.Tbmr2.Text = "0"

Me.Tbmr2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr1

'

Me.Tbmr1.ForeColor = System.Drawing.Color.Black

Me.Tbmr1.Location = New System.Drawing.Point(40, 24)

Me.Tbmr1.Name = "Tbmr1"

Me.Tbmr1.Size = New System.Drawing.Size(64, 20)

Me.Tbmr1.TabIndex = 19

Me.Tbmr1.Text = "0"

Me.Tbmr1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label23

'

Me.Label23.ForeColor = System.Drawing.Color.Black

Me.Label23.Location = New System.Drawing.Point(8, 24)

Me.Label23.Name = "Label23"

Me.Label23.Size = New System.Drawing.Size(32, 16)

Me.Label23.TabIndex = 18

Me.Label23.Text = "MR1"

'

'Tbmr6

'

Me.Tbmr6.ForeColor = System.Drawing.Color.Black

Page 43: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbmr6.Location = New System.Drawing.Point(40, 184)

Me.Tbmr6.Name = "Tbmr6"

Me.Tbmr6.Size = New System.Drawing.Size(64, 20)

Me.Tbmr6.TabIndex = 27

Me.Tbmr6.Text = "0"

Me.Tbmr6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr7

'

Me.Tbmr7.ForeColor = System.Drawing.Color.Black

Me.Tbmr7.Location = New System.Drawing.Point(40, 216)

Me.Tbmr7.Name = "Tbmr7"

Me.Tbmr7.Size = New System.Drawing.Size(64, 20)

Me.Tbmr7.TabIndex = 28

Me.Tbmr7.Text = "0"

Me.Tbmr7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbmr8

'

Me.Tbmr8.ForeColor = System.Drawing.Color.Black

Me.Tbmr8.Location = New System.Drawing.Point(40, 248)

Me.Tbmr8.Name = "Tbmr8"

Me.Tbmr8.Size = New System.Drawing.Size(64, 20)

Me.Tbmr8.TabIndex = 29

Me.Tbmr8.Text = "0"

Me.Tbmr8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label24

'

Me.Label24.ForeColor = System.Drawing.Color.Black

Me.Label24.Location = New System.Drawing.Point(8, 56)

Me.Label24.Name = "Label24"

Me.Label24.Size = New System.Drawing.Size(32, 16)

Me.Label24.TabIndex = 19

Me.Label24.Text = "MR2"

'

'Label25

'

Me.Label25.ForeColor = System.Drawing.Color.Black

Me.Label25.Location = New System.Drawing.Point(8, 88)

Me.Label25.Name = "Label25"

Page 44: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label25.Size = New System.Drawing.Size(32, 16)

Me.Label25.TabIndex = 20

Me.Label25.Text = "MR3"

'

'Label28

'

Me.Label28.ForeColor = System.Drawing.Color.Black

Me.Label28.Location = New System.Drawing.Point(8, 120)

Me.Label28.Name = "Label28"

Me.Label28.Size = New System.Drawing.Size(32, 16)

Me.Label28.TabIndex = 21

Me.Label28.Text = "MR4"

'

'Label29

'

Me.Label29.ForeColor = System.Drawing.Color.Black

Me.Label29.Location = New System.Drawing.Point(8, 152)

Me.Label29.Name = "Label29"

Me.Label29.Size = New System.Drawing.Size(32, 16)

Me.Label29.TabIndex = 22

Me.Label29.Text = "MR5"

'

'Label30

'

Me.Label30.ForeColor = System.Drawing.Color.Black

Me.Label30.Location = New System.Drawing.Point(8, 184)

Me.Label30.Name = "Label30"

Me.Label30.Size = New System.Drawing.Size(32, 16)

Me.Label30.TabIndex = 23

Me.Label30.Text = "MR6"

'

'Label31

'

Me.Label31.ForeColor = System.Drawing.Color.Black

Me.Label31.Location = New System.Drawing.Point(8, 216)

Me.Label31.Name = "Label31"

Me.Label31.Size = New System.Drawing.Size(32, 16)

Me.Label31.TabIndex = 24

Me.Label31.Text = "MR7"

'

'Label34

Page 45: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Label34.ForeColor = System.Drawing.Color.Black

Me.Label34.Location = New System.Drawing.Point(8, 248)

Me.Label34.Name = "Label34"

Me.Label34.Size = New System.Drawing.Size(32, 16)

Me.Label34.TabIndex = 25

Me.Label34.Text = "MR8"

'

'Idc

'

Me.Idc.Controls.Add(Me.Label16)

Me.Idc.Controls.Add(Me.Label17)

Me.Idc.Controls.Add(Me.Label18)

Me.Idc.Controls.Add(Me.Label22)

Me.Idc.Controls.Add(Me.Label19)

Me.Idc.Controls.Add(Me.Tbidc1)

Me.Idc.Controls.Add(Me.Tbidc2)

Me.Idc.Controls.Add(Me.Tbidc3)

Me.Idc.Controls.Add(Me.Tbidc4)

Me.Idc.Controls.Add(Me.Tbidc5)

Me.Idc.Controls.Add(Me.Label103)

Me.Idc.Controls.Add(Me.Label98)

Me.Idc.Controls.Add(Me.Label104)

Me.Idc.Controls.Add(Me.Label101)

Me.Idc.Controls.Add(Me.Label102)

Me.Idc.ForeColor = System.Drawing.Color.Black

Me.Idc.Location = New System.Drawing.Point(8, 272)

Me.Idc.Name = "Idc"

Me.Idc.Size = New System.Drawing.Size(160, 152)

Me.Idc.TabIndex = 17

Me.Idc.TabStop = False

Me.Idc.Text = "Idc"

'

'Label16

'

Me.Label16.ForeColor = System.Drawing.Color.Black

Me.Label16.Location = New System.Drawing.Point(16, 24)

Me.Label16.Name = "Label16"

Me.Label16.Size = New System.Drawing.Size(32, 16)

Me.Label16.TabIndex = 7

Me.Label16.Text = "Idc1"

Page 46: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label17

'

Me.Label17.ForeColor = System.Drawing.Color.Black

Me.Label17.Location = New System.Drawing.Point(16, 48)

Me.Label17.Name = "Label17"

Me.Label17.Size = New System.Drawing.Size(32, 16)

Me.Label17.TabIndex = 8

Me.Label17.Text = "Idc2"

'

'Label18

'

Me.Label18.ForeColor = System.Drawing.Color.Black

Me.Label18.Location = New System.Drawing.Point(16, 72)

Me.Label18.Name = "Label18"

Me.Label18.Size = New System.Drawing.Size(32, 16)

Me.Label18.TabIndex = 9

Me.Label18.Text = "Idc3"

'

'Label22

'

Me.Label22.ForeColor = System.Drawing.Color.Black

Me.Label22.Location = New System.Drawing.Point(16, 96)

Me.Label22.Name = "Label22"

Me.Label22.Size = New System.Drawing.Size(32, 16)

Me.Label22.TabIndex = 11

Me.Label22.Text = "Idc4"

'

'Label19

'

Me.Label19.ForeColor = System.Drawing.Color.Black

Me.Label19.Location = New System.Drawing.Point(16, 120)

Me.Label19.Name = "Label19"

Me.Label19.Size = New System.Drawing.Size(32, 16)

Me.Label19.TabIndex = 10

Me.Label19.Text = "Idc5"

'

'Tbidc1

'

Me.Tbidc1.ForeColor = System.Drawing.Color.Black

Me.Tbidc1.Location = New System.Drawing.Point(48, 24)

Page 47: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbidc1.Name = "Tbidc1"

Me.Tbidc1.Size = New System.Drawing.Size(64, 20)

Me.Tbidc1.TabIndex = 12

Me.Tbidc1.Text = ""

Me.Tbidc1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbidc2

'

Me.Tbidc2.ForeColor = System.Drawing.Color.Black

Me.Tbidc2.Location = New System.Drawing.Point(48, 48)

Me.Tbidc2.Name = "Tbidc2"

Me.Tbidc2.Size = New System.Drawing.Size(64, 20)

Me.Tbidc2.TabIndex = 13

Me.Tbidc2.Text = ""

Me.Tbidc2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbidc3

'

Me.Tbidc3.ForeColor = System.Drawing.Color.Black

Me.Tbidc3.Location = New System.Drawing.Point(48, 72)

Me.Tbidc3.Name = "Tbidc3"

Me.Tbidc3.Size = New System.Drawing.Size(64, 20)

Me.Tbidc3.TabIndex = 14

Me.Tbidc3.Text = ""

Me.Tbidc3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbidc4

'

Me.Tbidc4.ForeColor = System.Drawing.Color.Black

Me.Tbidc4.Location = New System.Drawing.Point(48, 96)

Me.Tbidc4.Name = "Tbidc4"

Me.Tbidc4.Size = New System.Drawing.Size(64, 20)

Me.Tbidc4.TabIndex = 15

Me.Tbidc4.Text = ""

Me.Tbidc4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbidc5

'

Me.Tbidc5.ForeColor = System.Drawing.Color.Black

Me.Tbidc5.Location = New System.Drawing.Point(48, 120)

Me.Tbidc5.Name = "Tbidc5"

Page 48: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tbidc5.Size = New System.Drawing.Size(64, 20)

Me.Tbidc5.TabIndex = 16

Me.Tbidc5.Text = ""

Me.Tbidc5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label103

'

Me.Label103.Location = New System.Drawing.Point(120, 24)

Me.Label103.Name = "Label103"

Me.Label103.Size = New System.Drawing.Size(16, 16)

Me.Label103.TabIndex = 33

Me.Label103.Text = "A"

'

'Label98

'

Me.Label98.Location = New System.Drawing.Point(120, 48)

Me.Label98.Name = "Label98"

Me.Label98.Size = New System.Drawing.Size(16, 16)

Me.Label98.TabIndex = 29

Me.Label98.Text = "A"

'

'Label104

'

Me.Label104.Location = New System.Drawing.Point(120, 72)

Me.Label104.Name = "Label104"

Me.Label104.Size = New System.Drawing.Size(16, 16)

Me.Label104.TabIndex = 32

Me.Label104.Text = "A"

'

'Label101

'

Me.Label101.Location = New System.Drawing.Point(120, 96)

Me.Label101.Name = "Label101"

Me.Label101.Size = New System.Drawing.Size(16, 16)

Me.Label101.TabIndex = 35

Me.Label101.Text = "A"

'

'Label102

'

Me.Label102.Location = New System.Drawing.Point(120, 120)

Me.Label102.Name = "Label102"

Page 49: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label102.Size = New System.Drawing.Size(16, 16)

Me.Label102.TabIndex = 34

Me.Label102.Text = "A"

'

'GroupBox4

'

Me.GroupBox4.Controls.Add(Me.tbq)

Me.GroupBox4.Controls.Add(Me.tbp)

Me.GroupBox4.Controls.Add(Me.Label2)

Me.GroupBox4.Controls.Add(Me.LabelP)

Me.GroupBox4.Controls.Add(Me.Label4)

Me.GroupBox4.Controls.Add(Me.tbfactor)

Me.GroupBox4.Controls.Add(Me.Label113)

Me.GroupBox4.Controls.Add(Me.Label105)

Me.GroupBox4.ForeColor = System.Drawing.Color.Black

Me.GroupBox4.Location = New System.Drawing.Point(192, 144)

Me.GroupBox4.Name = "GroupBox4"

Me.GroupBox4.Size = New System.Drawing.Size(224, 144)

Me.GroupBox4.TabIndex = 3

Me.GroupBox4.TabStop = False

Me.GroupBox4.Text = "Potencia proporcionada por el inversor"

'

'tbq

'

Me.tbq.ForeColor = System.Drawing.Color.Black

Me.tbq.Location = New System.Drawing.Point(152, 64)

Me.tbq.Name = "tbq"

Me.tbq.Size = New System.Drawing.Size(40, 20)

Me.tbq.TabIndex = 3

Me.tbq.Text = ""

Me.tbq.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbp

'

Me.tbp.ForeColor = System.Drawing.Color.Black

Me.tbp.Location = New System.Drawing.Point(152, 24)

Me.tbp.Name = "tbp"

Me.tbp.Size = New System.Drawing.Size(40, 20)

Me.tbp.TabIndex = 2

Me.tbp.Text = ""

Me.tbp.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

Page 50: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label2

'

Me.Label2.ForeColor = System.Drawing.Color.Black

Me.Label2.Location = New System.Drawing.Point(8, 64)

Me.Label2.Name = "Label2"

Me.Label2.Size = New System.Drawing.Size(136, 24)

Me.Label2.TabIndex = 1

Me.Label2.Text = "Potencia Reactiva Q (W)"

'

'LabelP

'

Me.LabelP.Location = New System.Drawing.Point(8, 24)

Me.LabelP.Name = "LabelP"

Me.LabelP.Size = New System.Drawing.Size(120, 24)

Me.LabelP.TabIndex = 0

Me.LabelP.Text = "Potencia Activa P (W)"

'

'Label4

'

Me.Label4.ForeColor = System.Drawing.Color.Black

Me.Label4.Location = New System.Drawing.Point(8, 104)

Me.Label4.Name = "Label4"

Me.Label4.Size = New System.Drawing.Size(100, 16)

Me.Label4.TabIndex = 5

Me.Label4.Text = "Factor de Potencia"

'

'tbfactor

'

Me.tbfactor.ForeColor = System.Drawing.Color.Black

Me.tbfactor.Location = New System.Drawing.Point(152, 104)

Me.tbfactor.Name = "tbfactor"

Me.tbfactor.Size = New System.Drawing.Size(40, 20)

Me.tbfactor.TabIndex = 6

Me.tbfactor.Text = ""

Me.tbfactor.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label113

'

Me.Label113.Location = New System.Drawing.Point(200, 24)

Me.Label113.Name = "Label113"

Page 51: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label113.Size = New System.Drawing.Size(16, 16)

Me.Label113.TabIndex = 44

Me.Label113.Text = "W"

'

'Label105

'

Me.Label105.Location = New System.Drawing.Point(200, 64)

Me.Label105.Name = "Label105"

Me.Label105.Size = New System.Drawing.Size(16, 16)

Me.Label105.TabIndex = 43

Me.Label105.Text = "W"

'

'GroupBox3

'

Me.GroupBox3.Controls.Add(Me.tbvc4)

Me.GroupBox3.Controls.Add(Me.tbvc3)

Me.GroupBox3.Controls.Add(Me.tbvc2)

Me.GroupBox3.Controls.Add(Me.tbvc1)

Me.GroupBox3.Controls.Add(Me.LabelVc4)

Me.GroupBox3.Controls.Add(Me.LabelVC3)

Me.GroupBox3.Controls.Add(Me.LabelVc2)

Me.GroupBox3.Controls.Add(Me.LabelVc1)

Me.GroupBox3.Controls.Add(Me.Label112)

Me.GroupBox3.Controls.Add(Me.Label111)

Me.GroupBox3.Controls.Add(Me.Label110)

Me.GroupBox3.Controls.Add(Me.Label109)

Me.GroupBox3.ForeColor = System.Drawing.Color.Black

Me.GroupBox3.Location = New System.Drawing.Point(192, 16)

Me.GroupBox3.Name = "GroupBox3"

Me.GroupBox3.Size = New System.Drawing.Size(264, 112)

Me.GroupBox3.TabIndex = 2

Me.GroupBox3.TabStop = False

Me.GroupBox3.Text = "Tensiones en los condensadores del bus CC"

'

'tbvc4

'

Me.tbvc4.ForeColor = System.Drawing.Color.Black

Me.tbvc4.Location = New System.Drawing.Point(192, 64)

Me.tbvc4.Name = "tbvc4"

Me.tbvc4.Size = New System.Drawing.Size(40, 20)

Me.tbvc4.TabIndex = 7

Page 52: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbvc4.Text = ""

Me.tbvc4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbvc3

'

Me.tbvc3.ForeColor = System.Drawing.Color.Black

Me.tbvc3.Location = New System.Drawing.Point(192, 32)

Me.tbvc3.Name = "tbvc3"

Me.tbvc3.Size = New System.Drawing.Size(40, 20)

Me.tbvc3.TabIndex = 6

Me.tbvc3.Text = ""

Me.tbvc3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbvc2

'

Me.tbvc2.ForeColor = System.Drawing.Color.Black

Me.tbvc2.Location = New System.Drawing.Point(64, 64)

Me.tbvc2.Name = "tbvc2"

Me.tbvc2.Size = New System.Drawing.Size(40, 20)

Me.tbvc2.TabIndex = 5

Me.tbvc2.Text = ""

Me.tbvc2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbvc1

'

Me.tbvc1.ForeColor = System.Drawing.Color.Black

Me.tbvc1.Location = New System.Drawing.Point(64, 32)

Me.tbvc1.Name = "tbvc1"

Me.tbvc1.Size = New System.Drawing.Size(40, 20)

Me.tbvc1.TabIndex = 4

Me.tbvc1.Text = ""

Me.tbvc1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'LabelVc4

'

Me.LabelVc4.ForeColor = System.Drawing.Color.Black

Me.LabelVc4.Location = New System.Drawing.Point(136, 64)

Me.LabelVc4.Name = "LabelVc4"

Me.LabelVc4.Size = New System.Drawing.Size(48, 16)

Me.LabelVc4.TabIndex = 3

Me.LabelVc4.Text = "Vc4 (V)"

Page 53: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'LabelVC3

'

Me.LabelVC3.ForeColor = System.Drawing.Color.Black

Me.LabelVC3.Location = New System.Drawing.Point(136, 32)

Me.LabelVC3.Name = "LabelVC3"

Me.LabelVC3.Size = New System.Drawing.Size(48, 16)

Me.LabelVC3.TabIndex = 2

Me.LabelVC3.Text = "Vc3 (V)"

'

'LabelVc2

'

Me.LabelVc2.Location = New System.Drawing.Point(8, 64)

Me.LabelVc2.Name = "LabelVc2"

Me.LabelVc2.Size = New System.Drawing.Size(48, 16)

Me.LabelVc2.TabIndex = 1

Me.LabelVc2.Text = "Vc2 (V)"

'

'LabelVc1

'

Me.LabelVc1.Location = New System.Drawing.Point(8, 32)

Me.LabelVc1.Name = "LabelVc1"

Me.LabelVc1.Size = New System.Drawing.Size(48, 16)

Me.LabelVc1.TabIndex = 0

Me.LabelVc1.Text = "Vc1 (V)"

'

'Label112

'

Me.Label112.Location = New System.Drawing.Point(112, 32)

Me.Label112.Name = "Label112"

Me.Label112.Size = New System.Drawing.Size(16, 23)

Me.Label112.TabIndex = 36

Me.Label112.Text = "V"

'

'Label111

'

Me.Label111.Location = New System.Drawing.Point(112, 64)

Me.Label111.Name = "Label111"

Me.Label111.Size = New System.Drawing.Size(16, 16)

Me.Label111.TabIndex = 37

Me.Label111.Text = "V"

Page 54: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label110

'

Me.Label110.Location = New System.Drawing.Point(240, 32)

Me.Label110.Name = "Label110"

Me.Label110.Size = New System.Drawing.Size(16, 16)

Me.Label110.TabIndex = 38

Me.Label110.Text = "V"

'

'Label109

'

Me.Label109.Location = New System.Drawing.Point(240, 64)

Me.Label109.Name = "Label109"

Me.Label109.Size = New System.Drawing.Size(16, 16)

Me.Label109.TabIndex = 39

Me.Label109.Text = "V"

'

'GroupBox2

'

Me.GroupBox2.Controls.Add(Me.tbvc)

Me.GroupBox2.Controls.Add(Me.tbvb)

Me.GroupBox2.Controls.Add(Me.tbva)

Me.GroupBox2.Controls.Add(Me.LabelVc)

Me.GroupBox2.Controls.Add(Me.LabelVb)

Me.GroupBox2.Controls.Add(Me.LabelVa)

Me.GroupBox2.Controls.Add(Me.Label108)

Me.GroupBox2.Controls.Add(Me.Label107)

Me.GroupBox2.Controls.Add(Me.Label106)

Me.GroupBox2.ForeColor = System.Drawing.Color.Black

Me.GroupBox2.Location = New System.Drawing.Point(8, 144)

Me.GroupBox2.Name = "GroupBox2"

Me.GroupBox2.Size = New System.Drawing.Size(160, 112)

Me.GroupBox2.TabIndex = 1

Me.GroupBox2.TabStop = False

Me.GroupBox2.Text = "Tensiones de Fase"

'

'tbvc

'

Me.tbvc.ForeColor = System.Drawing.Color.Black

Me.tbvc.Location = New System.Drawing.Point(64, 80)

Me.tbvc.Name = "tbvc"

Page 55: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbvc.Size = New System.Drawing.Size(56, 20)

Me.tbvc.TabIndex = 5

Me.tbvc.Text = ""

Me.tbvc.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbvb

'

Me.tbvb.ForeColor = System.Drawing.Color.Black

Me.tbvb.Location = New System.Drawing.Point(64, 56)

Me.tbvb.Name = "tbvb"

Me.tbvb.Size = New System.Drawing.Size(56, 20)

Me.tbvb.TabIndex = 4

Me.tbvb.Text = ""

Me.tbvb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbva

'

Me.tbva.ForeColor = System.Drawing.Color.Black

Me.tbva.Location = New System.Drawing.Point(64, 32)

Me.tbva.Name = "tbva"

Me.tbva.Size = New System.Drawing.Size(56, 20)

Me.tbva.TabIndex = 3

Me.tbva.Text = ""

Me.tbva.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'LabelVc

'

Me.LabelVc.Location = New System.Drawing.Point(16, 80)

Me.LabelVc.Name = "LabelVc"

Me.LabelVc.Size = New System.Drawing.Size(40, 16)

Me.LabelVc.TabIndex = 2

Me.LabelVc.Text = "Vc (V)"

'

'LabelVb

'

Me.LabelVb.Location = New System.Drawing.Point(16, 56)

Me.LabelVb.Name = "LabelVb"

Me.LabelVb.Size = New System.Drawing.Size(40, 16)

Me.LabelVb.TabIndex = 1

Me.LabelVb.Text = "Vb (V)"

'

Page 56: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'LabelVa

'

Me.LabelVa.Location = New System.Drawing.Point(16, 32)

Me.LabelVa.Name = "LabelVa"

Me.LabelVa.Size = New System.Drawing.Size(40, 16)

Me.LabelVa.TabIndex = 0

Me.LabelVa.Text = "Va (V)"

'

'Label108

'

Me.Label108.Location = New System.Drawing.Point(128, 32)

Me.Label108.Name = "Label108"

Me.Label108.Size = New System.Drawing.Size(16, 16)

Me.Label108.TabIndex = 40

Me.Label108.Text = "V"

'

'Label107

'

Me.Label107.Location = New System.Drawing.Point(128, 56)

Me.Label107.Name = "Label107"

Me.Label107.Size = New System.Drawing.Size(16, 16)

Me.Label107.TabIndex = 41

Me.Label107.Text = "V"

'

'Label106

'

Me.Label106.Location = New System.Drawing.Point(128, 80)

Me.Label106.Name = "Label106"

Me.Label106.Size = New System.Drawing.Size(16, 16)

Me.Label106.TabIndex = 42

Me.Label106.Text = "V"

'

'GroupBox1

'

Me.GroupBox1.Controls.Add(Me.LabelIc)

Me.GroupBox1.Controls.Add(Me.LabelIb)

Me.GroupBox1.Controls.Add(Me.LabelIa)

Me.GroupBox1.Controls.Add(Me.tbic)

Me.GroupBox1.Controls.Add(Me.Tbib)

Me.GroupBox1.Controls.Add(Me.Tbia)

Me.GroupBox1.Controls.Add(Me.Label97)

Page 57: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox1.Controls.Add(Me.Label100)

Me.GroupBox1.Controls.Add(Me.Label99)

Me.GroupBox1.ForeColor = System.Drawing.Color.Black

Me.GroupBox1.Location = New System.Drawing.Point(8, 16)

Me.GroupBox1.Name = "GroupBox1"

Me.GroupBox1.Size = New System.Drawing.Size(160, 112)

Me.GroupBox1.TabIndex = 4

Me.GroupBox1.TabStop = False

Me.GroupBox1.Text = "Corrientes de Fase o Carga"

'

'LabelIc

'

Me.LabelIc.Location = New System.Drawing.Point(16, 80)

Me.LabelIc.Name = "LabelIc"

Me.LabelIc.Size = New System.Drawing.Size(32, 16)

Me.LabelIc.TabIndex = 5

Me.LabelIc.Text = "Ic (A)"

'

'LabelIb

'

Me.LabelIb.Location = New System.Drawing.Point(16, 56)

Me.LabelIb.Name = "LabelIb"

Me.LabelIb.Size = New System.Drawing.Size(32, 16)

Me.LabelIb.TabIndex = 4

Me.LabelIb.Text = "Ib (A)"

'

'LabelIa

'

Me.LabelIa.Location = New System.Drawing.Point(16, 32)

Me.LabelIa.Name = "LabelIa"

Me.LabelIa.Size = New System.Drawing.Size(32, 16)

Me.LabelIa.TabIndex = 2

Me.LabelIa.Text = "Ia (A)"

'

'tbic

'

Me.tbic.ForeColor = System.Drawing.Color.Black

Me.tbic.Location = New System.Drawing.Point(64, 80)

Me.tbic.Name = "tbic"

Me.tbic.Size = New System.Drawing.Size(64, 20)

Me.tbic.TabIndex = 2

Page 58: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbic.Text = ""

Me.tbic.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbib

'

Me.Tbib.ForeColor = System.Drawing.Color.Black

Me.Tbib.Location = New System.Drawing.Point(64, 56)

Me.Tbib.Name = "Tbib"

Me.Tbib.Size = New System.Drawing.Size(64, 20)

Me.Tbib.TabIndex = 1

Me.Tbib.Text = ""

Me.Tbib.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Tbia

'

Me.Tbia.ForeColor = System.Drawing.Color.Black

Me.Tbia.Location = New System.Drawing.Point(64, 32)

Me.Tbia.Name = "Tbia"

Me.Tbia.Size = New System.Drawing.Size(64, 20)

Me.Tbia.TabIndex = 0

Me.Tbia.Text = ""

Me.Tbia.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label97

'

Me.Label97.Location = New System.Drawing.Point(136, 32)

Me.Label97.Name = "Label97"

Me.Label97.Size = New System.Drawing.Size(16, 16)

Me.Label97.TabIndex = 28

Me.Label97.Text = "A"

'

'Label100

'

Me.Label100.Location = New System.Drawing.Point(136, 56)

Me.Label100.Name = "Label100"

Me.Label100.Size = New System.Drawing.Size(16, 16)

Me.Label100.TabIndex = 30

Me.Label100.Text = "A"

'

'Label99

'

Page 59: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label99.Location = New System.Drawing.Point(136, 80)

Me.Label99.Name = "Label99"

Me.Label99.Size = New System.Drawing.Size(16, 16)

Me.Label99.TabIndex = 31

Me.Label99.Text = "A"

'

'TabPage4

'

Me.TabPage4.Controls.Add(Me.Cb_rango_4)

Me.TabPage4.Controls.Add(Me.Cb_rango_3)

Me.TabPage4.Controls.Add(Me.Cb_rango_2)

Me.TabPage4.Controls.Add(Me.Cb_rango_1)

Me.TabPage4.Controls.Add(Me.B_rango_y_4)

Me.TabPage4.Controls.Add(Me.B_rango_y_3)

Me.TabPage4.Controls.Add(Me.B_rango_y_2)

Me.TabPage4.Controls.Add(Me.b_rango_y_1)

Me.TabPage4.Controls.Add(Me.Cb_rep_4)

Me.TabPage4.Controls.Add(Me.cb_rep_3)

Me.TabPage4.Controls.Add(Me.Cb_rep_2)

Me.TabPage4.Controls.Add(Me.Cb_rep_1)

Me.TabPage4.Controls.Add(Me.GroupBox18)

Me.TabPage4.Controls.Add(Me.Label95)

Me.TabPage4.Controls.Add(Me.Label94)

Me.TabPage4.Controls.Add(Me.Label93)

Me.TabPage4.Controls.Add(Me.Label92)

Me.TabPage4.Controls.Add(Me.Cb44)

Me.TabPage4.Controls.Add(Me.Cb43)

Me.TabPage4.Controls.Add(Me.cb42)

Me.TabPage4.Controls.Add(Me.Cb41)

Me.TabPage4.Controls.Add(Me.Cb34)

Me.TabPage4.Controls.Add(Me.Cb33)

Me.TabPage4.Controls.Add(Me.Cb32)

Me.TabPage4.Controls.Add(Me.Cb31)

Me.TabPage4.Controls.Add(Me.cb24)

Me.TabPage4.Controls.Add(Me.Cb23)

Me.TabPage4.Controls.Add(Me.Cb22)

Me.TabPage4.Controls.Add(Me.Cb21)

Me.TabPage4.Controls.Add(Me.Cb14)

Me.TabPage4.Controls.Add(Me.Cb13)

Me.TabPage4.Controls.Add(Me.cb12)

Me.TabPage4.Controls.Add(Me.Cb11)

Page 60: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.TabPage4.Controls.Add(Me.Legend4)

Me.TabPage4.Controls.Add(Me.Legend3)

Me.TabPage4.Controls.Add(Me.Legend2)

Me.TabPage4.Controls.Add(Me.Legend1)

Me.TabPage4.Controls.Add(Me.grafica_3)

Me.TabPage4.Controls.Add(Me.grafica_2)

Me.TabPage4.Controls.Add(Me.grafica_4)

Me.TabPage4.Controls.Add(Me.grafica_1)

Me.TabPage4.Controls.Add(Me.cbcursor_graf_1)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_1_x)

Me.TabPage4.Controls.Add(Me.Label10)

Me.TabPage4.Controls.Add(Me.Label11)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_1_y)

Me.TabPage4.Controls.Add(Me.cbcursor_graf_3)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_3_y)

Me.TabPage4.Controls.Add(Me.Label20)

Me.TabPage4.Controls.Add(Me.Label21)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_3_x)

Me.TabPage4.Controls.Add(Me.cbcursor_graf_2)

Me.TabPage4.Controls.Add(Me.Label27)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_2_x)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_2_y)

Me.TabPage4.Controls.Add(Me.Label26)

Me.TabPage4.Controls.Add(Me.cbcursor_graf_4)

Me.TabPage4.Controls.Add(Me.Label32)

Me.TabPage4.Controls.Add(Me.Label33)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_4_x)

Me.TabPage4.Controls.Add(Me.tbcursors_graf_4_y)

Me.TabPage4.ForeColor = System.Drawing.Color.Green

Me.TabPage4.Location = New System.Drawing.Point(4, 22)

Me.TabPage4.Name = "TabPage4"

Me.TabPage4.Size = New System.Drawing.Size(1010, 518)

Me.TabPage4.TabIndex = 4

Me.TabPage4.Text = "Histórico de medidas"

'

'Cb_rango_4

'

Me.Cb_rango_4.Location = New System.Drawing.Point(496, 352)

Me.Cb_rango_4.Name = "Cb_rango_4"

Me.Cb_rango_4.Size = New System.Drawing.Size(48, 24)

Me.Cb_rango_4.TabIndex = 83

Page 61: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb_rango_4.Text = "R. A."

'

'Cb_rango_3

'

Me.Cb_rango_3.Location = New System.Drawing.Point(480, 264)

Me.Cb_rango_3.Name = "Cb_rango_3"

Me.Cb_rango_3.Size = New System.Drawing.Size(48, 16)

Me.Cb_rango_3.TabIndex = 82

Me.Cb_rango_3.Text = "R. A."

'

'Cb_rango_2

'

Me.Cb_rango_2.Location = New System.Drawing.Point(496, 136)

Me.Cb_rango_2.Name = "Cb_rango_2"

Me.Cb_rango_2.Size = New System.Drawing.Size(48, 16)

Me.Cb_rango_2.TabIndex = 81

Me.Cb_rango_2.Text = "R. A."

'

'Cb_rango_1

'

Me.Cb_rango_1.Location = New System.Drawing.Point(480, 40)

Me.Cb_rango_1.Name = "Cb_rango_1"

Me.Cb_rango_1.Size = New System.Drawing.Size(48, 24)

Me.Cb_rango_1.TabIndex = 80

Me.Cb_rango_1.Text = "R. A."

'

'B_rango_y_4

'

Me.B_rango_y_4.Location = New System.Drawing.Point(488, 376)

Me.B_rango_y_4.Name = "B_rango_y_4"

Me.B_rango_y_4.Size = New System.Drawing.Size(56, 23)

Me.B_rango_y_4.TabIndex = 79

Me.B_rango_y_4.Text = "Rango Y"

'

'B_rango_y_3

'

Me.B_rango_y_3.Location = New System.Drawing.Point(472, 232)

Me.B_rango_y_3.Name = "B_rango_y_3"

Me.B_rango_y_3.Size = New System.Drawing.Size(56, 23)

Me.B_rango_y_3.TabIndex = 78

Me.B_rango_y_3.Text = "Rango Y"

Page 62: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'B_rango_y_2

'

Me.B_rango_y_2.Location = New System.Drawing.Point(488, 152)

Me.B_rango_y_2.Name = "B_rango_y_2"

Me.B_rango_y_2.Size = New System.Drawing.Size(56, 23)

Me.B_rango_y_2.TabIndex = 77

Me.B_rango_y_2.Text = "Rango Y"

'

'b_rango_y_1

'

Me.b_rango_y_1.Location = New System.Drawing.Point(472, 8)

Me.b_rango_y_1.Name = "b_rango_y_1"

Me.b_rango_y_1.Size = New System.Drawing.Size(56, 24)

Me.b_rango_y_1.TabIndex = 76

Me.b_rango_y_1.Text = "Rango Y"

'

'Cb_rep_4

'

Me.Cb_rep_4.ForeColor = System.Drawing.Color.Maroon

Me.Cb_rep_4.Location = New System.Drawing.Point(536, 432)

Me.Cb_rep_4.Name = "Cb_rep_4"

Me.Cb_rep_4.Size = New System.Drawing.Size(88, 16)

Me.Cb_rep_4.TabIndex = 75

Me.Cb_rep_4.Text = "Stop captura"

'

'cb_rep_3

'

Me.cb_rep_3.ForeColor = System.Drawing.Color.Maroon

Me.cb_rep_3.Location = New System.Drawing.Point(392, 432)

Me.cb_rep_3.Name = "cb_rep_3"

Me.cb_rep_3.Size = New System.Drawing.Size(88, 16)

Me.cb_rep_3.TabIndex = 74

Me.cb_rep_3.Text = "Stop captura"

'

'Cb_rep_2

'

Me.Cb_rep_2.ForeColor = System.Drawing.Color.Maroon

Me.Cb_rep_2.Location = New System.Drawing.Point(536, 208)

Me.Cb_rep_2.Name = "Cb_rep_2"

Me.Cb_rep_2.Size = New System.Drawing.Size(88, 16)

Page 63: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb_rep_2.TabIndex = 73

Me.Cb_rep_2.Text = "Stop captura"

'

'Cb_rep_1

'

Me.Cb_rep_1.ForeColor = System.Drawing.Color.Maroon

Me.Cb_rep_1.Location = New System.Drawing.Point(392, 208)

Me.Cb_rep_1.Name = "Cb_rep_1"

Me.Cb_rep_1.Size = New System.Drawing.Size(88, 16)

Me.Cb_rep_1.TabIndex = 72

Me.Cb_rep_1.Text = "Stop captura"

'

'GroupBox18

'

Me.GroupBox18.Controls.Add(Me.B_imp_hist)

Me.GroupBox18.Controls.Add(Me.B_exp_hist)

Me.GroupBox18.Controls.Add(Me.Cb_grafica_4)

Me.GroupBox18.Controls.Add(Me.Cb_grafica_2)

Me.GroupBox18.Controls.Add(Me.Cb_grafica_3)

Me.GroupBox18.Controls.Add(Me.Cb_grafica_1)

Me.GroupBox18.Location = New System.Drawing.Point(344, 448)

Me.GroupBox18.Name = "GroupBox18"

Me.GroupBox18.Size = New System.Drawing.Size(328, 64)

Me.GroupBox18.TabIndex = 71

Me.GroupBox18.TabStop = False

Me.GroupBox18.Text = "Excel"

'

'B_imp_hist

'

Me.B_imp_hist.Location = New System.Drawing.Point(248, 16)

Me.B_imp_hist.Name = "B_imp_hist"

Me.B_imp_hist.Size = New System.Drawing.Size(64, 32)

Me.B_imp_hist.TabIndex = 5

Me.B_imp_hist.Text = "Importar"

'

'B_exp_hist

'

Me.B_exp_hist.Location = New System.Drawing.Point(176, 16)

Me.B_exp_hist.Name = "B_exp_hist"

Me.B_exp_hist.Size = New System.Drawing.Size(64, 32)

Me.B_exp_hist.TabIndex = 4

Page 64: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.B_exp_hist.Text = "Exportar"

'

'Cb_grafica_4

'

Me.Cb_grafica_4.Location = New System.Drawing.Point(96, 40)

Me.Cb_grafica_4.Name = "Cb_grafica_4"

Me.Cb_grafica_4.Size = New System.Drawing.Size(72, 16)

Me.Cb_grafica_4.TabIndex = 3

Me.Cb_grafica_4.Text = "Gráfica 4"

'

'Cb_grafica_2

'

Me.Cb_grafica_2.Location = New System.Drawing.Point(96, 16)

Me.Cb_grafica_2.Name = "Cb_grafica_2"

Me.Cb_grafica_2.Size = New System.Drawing.Size(72, 16)

Me.Cb_grafica_2.TabIndex = 2

Me.Cb_grafica_2.Text = "Gráfica 2"

'

'Cb_grafica_3

'

Me.Cb_grafica_3.Location = New System.Drawing.Point(16, 40)

Me.Cb_grafica_3.Name = "Cb_grafica_3"

Me.Cb_grafica_3.Size = New System.Drawing.Size(72, 16)

Me.Cb_grafica_3.TabIndex = 1

Me.Cb_grafica_3.Text = "Gráfica 3"

'

'Cb_grafica_1

'

Me.Cb_grafica_1.Location = New System.Drawing.Point(16, 16)

Me.Cb_grafica_1.Name = "Cb_grafica_1"

Me.Cb_grafica_1.Size = New System.Drawing.Size(72, 16)

Me.Cb_grafica_1.TabIndex = 0

Me.Cb_grafica_1.Text = "Gráfica 1"

'

'Label95

'

Me.Label95.ForeColor = System.Drawing.Color.Black

Me.Label95.Location = New System.Drawing.Point(16, 472)

Me.Label95.Name = "Label95"

Me.Label95.Size = New System.Drawing.Size(80, 16)

Me.Label95.TabIndex = 66

Page 65: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label95.Text = "Tiempo (min):"

'

'Label94

'

Me.Label94.Location = New System.Drawing.Point(624, 208)

Me.Label94.Name = "Label94"

Me.Label94.Size = New System.Drawing.Size(80, 16)

Me.Label94.TabIndex = 65

Me.Label94.Text = "Tiempo (min):"

'

'Label93

'

Me.Label93.Location = New System.Drawing.Point(224, 208)

Me.Label93.Name = "Label93"

Me.Label93.Size = New System.Drawing.Size(80, 16)

Me.Label93.TabIndex = 64

Me.Label93.Text = "Tiempo (min):"

'

'Label92

'

Me.Label92.ForeColor = System.Drawing.Color.Black

Me.Label92.Location = New System.Drawing.Point(848, 472)

Me.Label92.Name = "Label92"

Me.Label92.Size = New System.Drawing.Size(80, 16)

Me.Label92.TabIndex = 63

Me.Label92.Text = "Tiempo (min):"

'

'Cb44

'

Me.Cb44.Items.AddRange(New Object() {"30", "60", "90", "120", "150"})

Me.Cb44.Location = New System.Drawing.Point(928, 472)

Me.Cb44.Name = "Cb44"

Me.Cb44.Size = New System.Drawing.Size(56, 21)

Me.Cb44.TabIndex = 54

Me.Cb44.Text = "30"

'

'Cb43

'

Me.Cb43.ForeColor = System.Drawing.Color.DarkOrange

Me.Cb43.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb43.Location = New System.Drawing.Point(928, 440)

Page 66: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb43.Name = "Cb43"

Me.Cb43.Size = New System.Drawing.Size(64, 21)

Me.Cb43.TabIndex = 53

Me.Cb43.Text = "Ninguna"

'

'cb42

'

Me.cb42.ForeColor = System.Drawing.Color.Red

Me.cb42.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.cb42.Location = New System.Drawing.Point(856, 440)

Me.cb42.Name = "cb42"

Me.cb42.Size = New System.Drawing.Size(64, 21)

Me.cb42.TabIndex = 52

Me.cb42.Text = "Ninguna"

'

'Cb41

'

Me.Cb41.ForeColor = System.Drawing.Color.Green

Me.Cb41.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb41.Location = New System.Drawing.Point(784, 440)

Me.Cb41.Name = "Cb41"

Me.Cb41.Size = New System.Drawing.Size(64, 21)

Me.Cb41.TabIndex = 51

Me.Cb41.Text = "Ninguna"

'

'Cb34

'

Me.Cb34.Items.AddRange(New Object() {"30", "60", "90", "120", "150"})

Me.Cb34.Location = New System.Drawing.Point(96, 472)

Me.Cb34.Name = "Cb34"

Me.Cb34.Size = New System.Drawing.Size(56, 21)

Me.Cb34.TabIndex = 47

Me.Cb34.Text = "30"

'

'Cb33

'

Me.Cb33.ForeColor = System.Drawing.Color.DarkOrange

Me.Cb33.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb33.Location = New System.Drawing.Point(160, 440)

Me.Cb33.Name = "Cb33"

Me.Cb33.Size = New System.Drawing.Size(64, 21)

Page 67: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb33.TabIndex = 46

Me.Cb33.Text = "Ninguna"

'

'Cb32

'

Me.Cb32.ForeColor = System.Drawing.Color.Red

Me.Cb32.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb32.Location = New System.Drawing.Point(88, 440)

Me.Cb32.Name = "Cb32"

Me.Cb32.Size = New System.Drawing.Size(64, 21)

Me.Cb32.TabIndex = 45

Me.Cb32.Text = "Ninguna"

'

'Cb31

'

Me.Cb31.ForeColor = System.Drawing.Color.Green

Me.Cb31.Items.AddRange(New Object() {"Ninguna", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb31.Location = New System.Drawing.Point(16, 440)

Me.Cb31.Name = "Cb31"

Me.Cb31.Size = New System.Drawing.Size(64, 21)

Me.Cb31.TabIndex = 44

Me.Cb31.Text = "Ninguna"

'

'cb24

'

Me.cb24.Items.AddRange(New Object() {"5", "10", "20", "30", "60"})

Me.cb24.Location = New System.Drawing.Point(712, 208)

Me.cb24.Name = "cb24"

Me.cb24.Size = New System.Drawing.Size(56, 21)

Me.cb24.TabIndex = 40

Me.cb24.Text = "5"

'

'Cb23

'

Me.Cb23.ForeColor = System.Drawing.Color.DarkOrange

Me.Cb23.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.Cb23.Location = New System.Drawing.Point(928, 208)

Me.Cb23.Name = "Cb23"

Me.Cb23.Size = New System.Drawing.Size(64, 21)

Me.Cb23.TabIndex = 39

Page 68: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb23.Text = "Ninguna"

'

'Cb22

'

Me.Cb22.ForeColor = System.Drawing.Color.Red

Me.Cb22.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.Cb22.Location = New System.Drawing.Point(856, 208)

Me.Cb22.Name = "Cb22"

Me.Cb22.Size = New System.Drawing.Size(64, 21)

Me.Cb22.TabIndex = 38

Me.Cb22.Text = "Ninguna"

'

'Cb21

'

Me.Cb21.ForeColor = System.Drawing.Color.Green

Me.Cb21.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.Cb21.Location = New System.Drawing.Point(784, 208)

Me.Cb21.Name = "Cb21"

Me.Cb21.Size = New System.Drawing.Size(64, 21)

Me.Cb21.TabIndex = 37

Me.Cb21.Text = "Ninguna"

'

'Cb14

'

Me.Cb14.Items.AddRange(New Object() {"5", "10", "20", "30", "60"})

Me.Cb14.Location = New System.Drawing.Point(304, 208)

Me.Cb14.Name = "Cb14"

Me.Cb14.Size = New System.Drawing.Size(56, 21)

Me.Cb14.TabIndex = 33

Me.Cb14.Text = "5"

'

'Cb13

'

Me.Cb13.ForeColor = System.Drawing.Color.DarkOrange

Me.Cb13.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.Cb13.Location = New System.Drawing.Point(160, 208)

Me.Cb13.Name = "Cb13"

Me.Cb13.Size = New System.Drawing.Size(64, 21)

Me.Cb13.TabIndex = 32

Page 69: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb13.Text = "Ninguna"

'

'cb12

'

Me.cb12.ForeColor = System.Drawing.Color.Red

Me.cb12.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.cb12.Location = New System.Drawing.Point(88, 208)

Me.cb12.Name = "cb12"

Me.cb12.Size = New System.Drawing.Size(64, 21)

Me.cb12.TabIndex = 31

Me.cb12.Text = "Ninguna"

'

'Cb11

'

Me.Cb11.ForeColor = System.Drawing.Color.Green

Me.Cb11.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8"})

Me.Cb11.Location = New System.Drawing.Point(16, 208)

Me.Cb11.Name = "Cb11"

Me.Cb11.Size = New System.Drawing.Size(64, 21)

Me.Cb11.TabIndex = 30

Me.Cb11.Text = "Ninguna"

'

'Legend4

'

Me.Legend4.Items.AddRange(New NationalInstruments.UI.LegendItem() {Me.LegendItem8, Me.LegendItem12, Me.LegendItem11})

Me.Legend4.Location = New System.Drawing.Point(784, 400)

Me.Legend4.Name = "Legend4"

Me.Legend4.Size = New System.Drawing.Size(216, 32)

Me.Legend4.TabIndex = 10

'

'LegendItem8

'

Me.LegendItem8.Source = Me.WaveformPlot4

Me.LegendItem8.Text = "Vacío"

'

'WaveformPlot4

'

Me.WaveformPlot4.CanScaleYAxis = False

Me.WaveformPlot4.LineColor = System.Drawing.Color.Transparent

Page 70: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.WaveformPlot4.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot4.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot4.ToolTipsEnabled = True

Me.WaveformPlot4.XAxis = Me.XAxis2

Me.WaveformPlot4.YAxis = Me.YAxis2

'

'YAxis2

'

Me.YAxis2.Range = New NationalInstruments.UI.Range(-1, 1)

'

'LegendItem12

'

Me.LegendItem12.Source = Me.WaveformPlot12

Me.LegendItem12.Text = "Vacío"

'

'WaveformPlot12

'

Me.WaveformPlot12.CanScaleYAxis = False

Me.WaveformPlot12.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot12.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot12.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot12.ToolTipsEnabled = True

Me.WaveformPlot12.XAxis = Me.XAxis2

Me.WaveformPlot12.YAxis = Me.YAxis2

'

'LegendItem11

'

Me.LegendItem11.Source = Me.WaveformPlot11

Me.LegendItem11.Text = "Vacío"

'

'WaveformPlot11

'

Me.WaveformPlot11.CanScaleYAxis = False

Me.WaveformPlot11.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot11.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot11.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot11.ToolTipsEnabled = True

Me.WaveformPlot11.XAxis = Me.XAxis2

Me.WaveformPlot11.YAxis = Me.YAxis2

'

'Legend3

Page 71: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Legend3.Items.AddRange(New NationalInstruments.UI.LegendItem() {Me.LegendItem7, Me.LegendItem9, Me.LegendItem10})

Me.Legend3.Location = New System.Drawing.Point(784, 176)

Me.Legend3.Name = "Legend3"

Me.Legend3.Size = New System.Drawing.Size(216, 32)

Me.Legend3.TabIndex = 16

'

'LegendItem7

'

Me.LegendItem7.Source = Me.WaveformPlot5

Me.LegendItem7.Text = "Vacío"

'

'WaveformPlot5

'

Me.WaveformPlot5.AntiAliased = True

Me.WaveformPlot5.CanScaleYAxis = False

Me.WaveformPlot5.HistoryCapacity = 3600

Me.WaveformPlot5.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot5.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot5.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot5.ToolTipsEnabled = True

Me.WaveformPlot5.XAxis = Me.XAxis3

Me.WaveformPlot5.YAxis = Me.YAxis3

'

'YAxis3

'

Me.YAxis3.Range = New NationalInstruments.UI.Range(-1, 1)

'

'LegendItem9

'

Me.LegendItem9.Source = Me.WaveformPlot7

Me.LegendItem9.Text = "Vacío"

'

'WaveformPlot7

'

Me.WaveformPlot7.CanScaleYAxis = False

Me.WaveformPlot7.HistoryCapacity = 3600

Me.WaveformPlot7.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot7.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot7.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Page 72: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.WaveformPlot7.ToolTipsEnabled = True

Me.WaveformPlot7.XAxis = Me.XAxis3

Me.WaveformPlot7.YAxis = Me.YAxis3

'

'LegendItem10

'

Me.LegendItem10.Source = Me.WaveformPlot8

Me.LegendItem10.Text = "Vacío"

'

'WaveformPlot8

'

Me.WaveformPlot8.CanScaleYAxis = False

Me.WaveformPlot8.HistoryCapacity = 3600

Me.WaveformPlot8.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot8.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot8.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot8.ToolTipsEnabled = True

Me.WaveformPlot8.XAxis = Me.XAxis3

Me.WaveformPlot8.YAxis = Me.YAxis3

'

'Legend2

'

Me.Legend2.Items.AddRange(New NationalInstruments.UI.LegendItem() {Me.LegendItem4, Me.LegendItem5, Me.LegendItem6})

Me.Legend2.Location = New System.Drawing.Point(16, 400)

Me.Legend2.Name = "Legend2"

Me.Legend2.Size = New System.Drawing.Size(224, 32)

Me.Legend2.TabIndex = 9

'

'LegendItem4

'

Me.LegendItem4.Source = Me.WaveformPlot6

Me.LegendItem4.Text = "Vacío"

'

'WaveformPlot6

'

Me.WaveformPlot6.CanScaleYAxis = False

Me.WaveformPlot6.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot6.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot6.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot6.ToolTipsEnabled = True

Page 73: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.WaveformPlot6.XAxis = Me.XAxis4

Me.WaveformPlot6.YAxis = Me.YAxis4

'

'YAxis4

'

Me.YAxis4.Range = New NationalInstruments.UI.Range(-1, 1)

'

'LegendItem5

'

Me.LegendItem5.Source = Me.WaveformPlot9

Me.LegendItem5.Text = "Vacío"

'

'WaveformPlot9

'

Me.WaveformPlot9.CanScaleYAxis = False

Me.WaveformPlot9.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot9.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot9.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot9.ToolTipsEnabled = True

Me.WaveformPlot9.XAxis = Me.XAxis4

Me.WaveformPlot9.YAxis = Me.YAxis4

'

'LegendItem6

'

Me.LegendItem6.Source = Me.WaveformPlot10

Me.LegendItem6.Text = "Vacío"

'

'WaveformPlot10

'

Me.WaveformPlot10.CanScaleYAxis = False

Me.WaveformPlot10.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot10.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot10.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot10.ToolTipsEnabled = True

Me.WaveformPlot10.XAxis = Me.XAxis4

Me.WaveformPlot10.YAxis = Me.YAxis4

'

'Legend1

'

Me.Legend1.Items.AddRange(New NationalInstruments.UI.LegendItem() {Me.LegendItem1, Me.LegendItem2, Me.LegendItem3})

Page 74: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Legend1.Location = New System.Drawing.Point(16, 176)

Me.Legend1.Name = "Legend1"

Me.Legend1.Size = New System.Drawing.Size(216, 32)

Me.Legend1.TabIndex = 11

'

'LegendItem1

'

Me.LegendItem1.Source = Me.WaveformPlot1

Me.LegendItem1.Text = "Vacío "

'

'WaveformPlot1

'

Me.WaveformPlot1.AntiAliased = True

Me.WaveformPlot1.CanScaleYAxis = False

Me.WaveformPlot1.HistoryCapacity = 3600

Me.WaveformPlot1.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot1.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot1.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot1.ProcessSpecialValues = True

Me.WaveformPlot1.ToolTipsEnabled = True

Me.WaveformPlot1.ToolTipXFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Engineering, "ee")

Me.WaveformPlot1.ToolTipYFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Engineering, "ee")

Me.WaveformPlot1.XAxis = Me.XAxis5

Me.WaveformPlot1.YAxis = Me.YAxis5

'

'YAxis5

'

Me.YAxis5.Range = New NationalInstruments.UI.Range(-1, 1)

'

'LegendItem2

'

Me.LegendItem2.Source = Me.WaveformPlot2

Me.LegendItem2.Text = "Vacío "

'

'WaveformPlot2

'

Me.WaveformPlot2.CanScaleYAxis = False

Me.WaveformPlot2.HistoryCapacity = 3600

Me.WaveformPlot2.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot2.PointColor = System.Drawing.Color.Transparent

Page 75: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.WaveformPlot2.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot2.ToolTipsEnabled = True

Me.WaveformPlot2.ToolTipXFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Engineering, "ee")

Me.WaveformPlot2.ToolTipYFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Engineering, "ee")

Me.WaveformPlot2.XAxis = Me.XAxis5

Me.WaveformPlot2.YAxis = Me.YAxis5

'

'LegendItem3

'

Me.LegendItem3.Source = Me.WaveformPlot3

Me.LegendItem3.Text = "Vacío "

'

'WaveformPlot3

'

Me.WaveformPlot3.CanScaleYAxis = False

Me.WaveformPlot3.HistoryCapacity = 3600

Me.WaveformPlot3.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot3.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot3.PointStyle = NationalInstruments.UI.PointStyle.EmptyDiamond

Me.WaveformPlot3.ToolTipsEnabled = True

Me.WaveformPlot3.ToolTipYFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Engineering, "ee")

Me.WaveformPlot3.XAxis = Me.XAxis5

Me.WaveformPlot3.YAxis = Me.YAxis5

'

'grafica_3

'

Me.grafica_3.Cursors.AddRange(New NationalInstruments.UI.XYCursor() {Me.XyCursor_graf_3_1, Me.XyCursor_graf_3_2})

Me.grafica_3.Location = New System.Drawing.Point(24, 232)

Me.grafica_3.Name = "grafica_3"

Me.grafica_3.PlotAreaColor = System.Drawing.Color.White

Me.grafica_3.Plots.AddRange(New NationalInstruments.UI.WaveformPlot() {Me.WaveformPlot6, Me.WaveformPlot9, Me.WaveformPlot10})

Me.grafica_3.Size = New System.Drawing.Size(448, 168)

Me.grafica_3.TabIndex = 29

Me.grafica_3.XAxes.AddRange(New NationalInstruments.UI.XAxis() {Me.XAxis4})

Me.grafica_3.YAxes.AddRange(New NationalInstruments.UI.YAxis() {Me.YAxis4})

'

'XyCursor_graf_3_1

'

Page 76: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.XyCursor_graf_3_1.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_3_1.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_3_1.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_3_1.LabelVisible = True

Me.XyCursor_graf_3_1.Plot = Me.WaveformPlot6

Me.XyCursor_graf_3_1.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_3_1.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_3_1.Visible = False

'

'XyCursor_graf_3_2

'

Me.XyCursor_graf_3_2.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_3_2.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_3_2.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_3_2.LabelVisible = True

Me.XyCursor_graf_3_2.Plot = Me.WaveformPlot6

Me.XyCursor_graf_3_2.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_3_2.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_3_2.Visible = False

'

'grafica_2

'

Me.grafica_2.Cursors.AddRange(New NationalInstruments.UI.XYCursor() {Me.XyCursor_graf_2_1, Me.XyCursor_graf_2_2})

Me.grafica_2.Location = New System.Drawing.Point(544, 8)

Me.grafica_2.Name = "grafica_2"

Me.grafica_2.PlotAreaColor = System.Drawing.Color.White

Me.grafica_2.Plots.AddRange(New NationalInstruments.UI.WaveformPlot() {Me.WaveformPlot5, Me.WaveformPlot7, Me.WaveformPlot8})

Me.grafica_2.Size = New System.Drawing.Size(456, 168)

Me.grafica_2.TabIndex = 8

Me.grafica_2.XAxes.AddRange(New NationalInstruments.UI.XAxis() {Me.XAxis3})

Me.grafica_2.YAxes.AddRange(New NationalInstruments.UI.YAxis() {Me.YAxis3})

'

'XyCursor_graf_2_1

'

Me.XyCursor_graf_2_1.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_2_1.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_2_1.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_2_1.LabelVisible = True

Me.XyCursor_graf_2_1.Plot = Me.WaveformPlot5

Me.XyCursor_graf_2_1.PointStyle = NationalInstruments.UI.PointStyle.Cross

Page 77: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.XyCursor_graf_2_1.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_2_1.Visible = False

'

'XyCursor_graf_2_2

'

Me.XyCursor_graf_2_2.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_2_2.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_2_2.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_2_2.LabelVisible = True

Me.XyCursor_graf_2_2.Plot = Me.WaveformPlot5

Me.XyCursor_graf_2_2.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_2_2.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_2_2.Visible = False

'

'grafica_4

'

Me.grafica_4.Cursors.AddRange(New NationalInstruments.UI.XYCursor() {Me.XyCursor_graf_4_1, Me.XyCursor_graf_4_2})

Me.grafica_4.Location = New System.Drawing.Point(544, 232)

Me.grafica_4.Name = "grafica_4"

Me.grafica_4.PlotAreaColor = System.Drawing.Color.White

Me.grafica_4.Plots.AddRange(New NationalInstruments.UI.WaveformPlot() {Me.WaveformPlot4, Me.WaveformPlot12, Me.WaveformPlot11})

Me.grafica_4.Size = New System.Drawing.Size(456, 168)

Me.grafica_4.TabIndex = 29

Me.grafica_4.XAxes.AddRange(New NationalInstruments.UI.XAxis() {Me.XAxis2})

Me.grafica_4.YAxes.AddRange(New NationalInstruments.UI.YAxis() {Me.YAxis2})

'

'XyCursor_graf_4_1

'

Me.XyCursor_graf_4_1.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_4_1.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_4_1.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_4_1.LabelVisible = True

Me.XyCursor_graf_4_1.Plot = Me.WaveformPlot4

Me.XyCursor_graf_4_1.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_4_1.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_4_1.Visible = False

'

'XyCursor_graf_4_2

'

Me.XyCursor_graf_4_2.Color = System.Drawing.Color.Navy

Page 78: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.XyCursor_graf_4_2.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_4_2.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_4_2.LabelVisible = True

Me.XyCursor_graf_4_2.Plot = Me.WaveformPlot4

Me.XyCursor_graf_4_2.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_4_2.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_4_2.Visible = False

'

'grafica_1

'

Me.grafica_1.Cursors.AddRange(New NationalInstruments.UI.XYCursor() {Me.XyCursor_graf_1_1, Me.XyCursor_graf_1_2})

Me.grafica_1.Location = New System.Drawing.Point(16, 8)

Me.grafica_1.Name = "grafica_1"

Me.grafica_1.PlotAreaColor = System.Drawing.Color.White

Me.grafica_1.Plots.AddRange(New NationalInstruments.UI.WaveformPlot() {Me.WaveformPlot1, Me.WaveformPlot2, Me.WaveformPlot3})

Me.grafica_1.Size = New System.Drawing.Size(456, 168)

Me.grafica_1.TabIndex = 7

Me.grafica_1.XAxes.AddRange(New NationalInstruments.UI.XAxis() {Me.XAxis5})

Me.grafica_1.YAxes.AddRange(New NationalInstruments.UI.YAxis() {Me.YAxis5})

'

'XyCursor_graf_1_1

'

Me.XyCursor_graf_1_1.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_1_1.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_1_1.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_1_1.LabelVisible = True

Me.XyCursor_graf_1_1.LabelXFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Numeric, "G5")

Me.XyCursor_graf_1_1.Plot = Me.WaveformPlot1

Me.XyCursor_graf_1_1.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_1_1.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_1_1.Visible = False

'

'XyCursor_graf_1_2

'

Me.XyCursor_graf_1_2.Color = System.Drawing.Color.Navy

Me.XyCursor_graf_1_2.LabelBackColor = System.Drawing.Color.White

Me.XyCursor_graf_1_2.LabelForeColor = System.Drawing.Color.Navy

Me.XyCursor_graf_1_2.LabelVisible = True

Me.XyCursor_graf_1_2.LabelXFormat = New

Page 79: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Numeric, "F0")

Me.XyCursor_graf_1_2.LabelYFormat = New NationalInstruments.UI.FormatString(NationalInstruments.UI.FormatStringMode.Numeric, "F3")

Me.XyCursor_graf_1_2.Plot = Me.WaveformPlot1

Me.XyCursor_graf_1_2.PointStyle = NationalInstruments.UI.PointStyle.Cross

Me.XyCursor_graf_1_2.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_graf_1_2.Visible = False

'

'cbcursor_graf_1

'

Me.cbcursor_graf_1.ForeColor = System.Drawing.Color.Navy

Me.cbcursor_graf_1.Location = New System.Drawing.Point(248, 184)

Me.cbcursor_graf_1.Name = "cbcursor_graf_1"

Me.cbcursor_graf_1.Size = New System.Drawing.Size(72, 16)

Me.cbcursor_graf_1.TabIndex = 2

Me.cbcursor_graf_1.Text = "Cursores"

'

'tbcursors_graf_1_x

'

Me.tbcursors_graf_1_x.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_1_x.Location = New System.Drawing.Point(424, 184)

Me.tbcursors_graf_1_x.Name = "tbcursors_graf_1_x"

Me.tbcursors_graf_1_x.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_1_x.TabIndex = 15

Me.tbcursors_graf_1_x.Text = "0"

Me.tbcursors_graf_1_x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label10

'

Me.Label10.ForeColor = System.Drawing.Color.Navy

Me.Label10.Location = New System.Drawing.Point(320, 184)

Me.Label10.Name = "Label10"

Me.Label10.Size = New System.Drawing.Size(24, 16)

Me.Label10.TabIndex = 12

Me.Label10.Text = "∆y"

'

'Label11

'

Me.Label11.ForeColor = System.Drawing.Color.Navy

Me.Label11.Location = New System.Drawing.Point(400, 184)

Me.Label11.Name = "Label11"

Page 80: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label11.Size = New System.Drawing.Size(24, 16)

Me.Label11.TabIndex = 14

Me.Label11.Text = "∆x"

'

'tbcursors_graf_1_y

'

Me.tbcursors_graf_1_y.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_1_y.Location = New System.Drawing.Point(344, 184)

Me.tbcursors_graf_1_y.Name = "tbcursors_graf_1_y"

Me.tbcursors_graf_1_y.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_1_y.TabIndex = 13

Me.tbcursors_graf_1_y.Text = "0"

Me.tbcursors_graf_1_y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'cbcursor_graf_3

'

Me.cbcursor_graf_3.ForeColor = System.Drawing.Color.Navy

Me.cbcursor_graf_3.Location = New System.Drawing.Point(248, 408)

Me.cbcursor_graf_3.Name = "cbcursor_graf_3"

Me.cbcursor_graf_3.Size = New System.Drawing.Size(72, 16)

Me.cbcursor_graf_3.TabIndex = 4

Me.cbcursor_graf_3.Text = "Cursores"

'

'tbcursors_graf_3_y

'

Me.tbcursors_graf_3_y.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_3_y.Location = New System.Drawing.Point(344, 408)

Me.tbcursors_graf_3_y.Name = "tbcursors_graf_3_y"

Me.tbcursors_graf_3_y.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_3_y.TabIndex = 22

Me.tbcursors_graf_3_y.Text = "0"

Me.tbcursors_graf_3_y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label20

'

Me.Label20.ForeColor = System.Drawing.Color.Navy

Me.Label20.Location = New System.Drawing.Point(400, 408)

Me.Label20.Name = "Label20"

Me.Label20.Size = New System.Drawing.Size(24, 16)

Me.Label20.TabIndex = 23

Me.Label20.Text = "∆x"

Page 81: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label21

'

Me.Label21.ForeColor = System.Drawing.Color.Navy

Me.Label21.Location = New System.Drawing.Point(320, 408)

Me.Label21.Name = "Label21"

Me.Label21.Size = New System.Drawing.Size(24, 16)

Me.Label21.TabIndex = 21

Me.Label21.Text = "∆y"

'

'tbcursors_graf_3_x

'

Me.tbcursors_graf_3_x.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_3_x.Location = New System.Drawing.Point(424, 408)

Me.tbcursors_graf_3_x.Name = "tbcursors_graf_3_x"

Me.tbcursors_graf_3_x.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_3_x.TabIndex = 24

Me.tbcursors_graf_3_x.Text = "0"

Me.tbcursors_graf_3_x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'cbcursor_graf_2

'

Me.cbcursor_graf_2.CheckAlign = System.Drawing.ContentAlignment.MiddleRight

Me.cbcursor_graf_2.ForeColor = System.Drawing.Color.Navy

Me.cbcursor_graf_2.Location = New System.Drawing.Point(704, 184)

Me.cbcursor_graf_2.Name = "cbcursor_graf_2"

Me.cbcursor_graf_2.Size = New System.Drawing.Size(72, 16)

Me.cbcursor_graf_2.TabIndex = 3

Me.cbcursor_graf_2.Text = "Cursores"

'

'Label27

'

Me.Label27.ForeColor = System.Drawing.Color.Navy

Me.Label27.Location = New System.Drawing.Point(552, 184)

Me.Label27.Name = "Label27"

Me.Label27.Size = New System.Drawing.Size(24, 16)

Me.Label27.TabIndex = 17

Me.Label27.Text = "∆y"

'

'tbcursors_graf_2_x

'

Page 82: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.tbcursors_graf_2_x.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_2_x.Location = New System.Drawing.Point(656, 184)

Me.tbcursors_graf_2_x.Name = "tbcursors_graf_2_x"

Me.tbcursors_graf_2_x.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_2_x.TabIndex = 20

Me.tbcursors_graf_2_x.Text = "0"

Me.tbcursors_graf_2_x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbcursors_graf_2_y

'

Me.tbcursors_graf_2_y.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_2_y.Location = New System.Drawing.Point(576, 184)

Me.tbcursors_graf_2_y.Name = "tbcursors_graf_2_y"

Me.tbcursors_graf_2_y.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_2_y.TabIndex = 18

Me.tbcursors_graf_2_y.Text = "0"

Me.tbcursors_graf_2_y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label26

'

Me.Label26.ForeColor = System.Drawing.Color.Navy

Me.Label26.Location = New System.Drawing.Point(632, 184)

Me.Label26.Name = "Label26"

Me.Label26.Size = New System.Drawing.Size(24, 16)

Me.Label26.TabIndex = 19

Me.Label26.Text = "∆x"

'

'cbcursor_graf_4

'

Me.cbcursor_graf_4.CheckAlign = System.Drawing.ContentAlignment.MiddleRight

Me.cbcursor_graf_4.ForeColor = System.Drawing.Color.Navy

Me.cbcursor_graf_4.Location = New System.Drawing.Point(704, 408)

Me.cbcursor_graf_4.Name = "cbcursor_graf_4"

Me.cbcursor_graf_4.Size = New System.Drawing.Size(72, 16)

Me.cbcursor_graf_4.TabIndex = 5

Me.cbcursor_graf_4.Text = "Cursores"

'

'Label32

'

Me.Label32.ForeColor = System.Drawing.Color.Navy

Me.Label32.Location = New System.Drawing.Point(632, 408)

Page 83: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label32.Name = "Label32"

Me.Label32.Size = New System.Drawing.Size(24, 16)

Me.Label32.TabIndex = 27

Me.Label32.Text = "∆x"

'

'Label33

'

Me.Label33.ForeColor = System.Drawing.Color.Navy

Me.Label33.Location = New System.Drawing.Point(552, 408)

Me.Label33.Name = "Label33"

Me.Label33.Size = New System.Drawing.Size(24, 16)

Me.Label33.TabIndex = 25

Me.Label33.Text = "∆y"

'

'tbcursors_graf_4_x

'

Me.tbcursors_graf_4_x.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_4_x.Location = New System.Drawing.Point(656, 408)

Me.tbcursors_graf_4_x.Name = "tbcursors_graf_4_x"

Me.tbcursors_graf_4_x.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_4_x.TabIndex = 28

Me.tbcursors_graf_4_x.Text = "0"

Me.tbcursors_graf_4_x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'tbcursors_graf_4_y

'

Me.tbcursors_graf_4_y.ForeColor = System.Drawing.Color.Navy

Me.tbcursors_graf_4_y.Location = New System.Drawing.Point(576, 408)

Me.tbcursors_graf_4_y.Name = "tbcursors_graf_4_y"

Me.tbcursors_graf_4_y.Size = New System.Drawing.Size(48, 20)

Me.tbcursors_graf_4_y.TabIndex = 26

Me.tbcursors_graf_4_y.Text = "0"

Me.tbcursors_graf_4_y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'TabPage7

'

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_6)

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_5)

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_4)

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_3)

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_2)

Page 84: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.TabPage7.Controls.Add(Me.cb_rejilla_y_1)

Me.TabPage7.Controls.Add(Me.cb_rejilla_x)

Me.TabPage7.Controls.Add(Me.Label114)

Me.TabPage7.Controls.Add(Me.Cb_rango_osc)

Me.TabPage7.Controls.Add(Me.B_rango_y_osc)

Me.TabPage7.Controls.Add(Me.Tb_osciloscopio_nivel)

Me.TabPage7.Controls.Add(Me.Label15)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_flanco)

Me.TabPage7.Controls.Add(Me.Label14)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_canal)

Me.TabPage7.Controls.Add(Me.Label13)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_6)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_5)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_4)

Me.TabPage7.Controls.Add(Me.B_osc_importar)

Me.TabPage7.Controls.Add(Me.B_osc_exportar)

Me.TabPage7.Controls.Add(Me.B_envio_128)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_t)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_3)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_2)

Me.TabPage7.Controls.Add(Me.Cb_osciloscopio_var_1)

Me.TabPage7.Controls.Add(Me.Legend5)

Me.TabPage7.Controls.Add(Me.cbcursor_osc)

Me.TabPage7.Controls.Add(Me.tbcursors_osc_x)

Me.TabPage7.Controls.Add(Me.Label3)

Me.TabPage7.Controls.Add(Me.Label9)

Me.TabPage7.Controls.Add(Me.tbcursors_osc_y)

Me.TabPage7.Controls.Add(Me.Osciloscopio)

Me.TabPage7.Location = New System.Drawing.Point(4, 22)

Me.TabPage7.Name = "TabPage7"

Me.TabPage7.Size = New System.Drawing.Size(1010, 518)

Me.TabPage7.TabIndex = 8

Me.TabPage7.Text = "Osciloscopio"

'

'cb_rejilla_y_6

'

Me.cb_rejilla_y_6.ForeColor = System.Drawing.Color.Blue

Me.cb_rejilla_y_6.Location = New System.Drawing.Point(16, 424)

Me.cb_rejilla_y_6.Name = "cb_rejilla_y_6"

Me.cb_rejilla_y_6.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_y_6.TabIndex = 68

Page 85: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.cb_rejilla_y_6.Text = "Y 6"

'

'cb_rejilla_y_5

'

Me.cb_rejilla_y_5.ForeColor = System.Drawing.Color.MediumVioletRed

Me.cb_rejilla_y_5.Location = New System.Drawing.Point(16, 408)

Me.cb_rejilla_y_5.Name = "cb_rejilla_y_5"

Me.cb_rejilla_y_5.Size = New System.Drawing.Size(40, 16)

Me.cb_rejilla_y_5.TabIndex = 67

Me.cb_rejilla_y_5.Text = "Y 5"

'

'cb_rejilla_y_4

'

Me.cb_rejilla_y_4.ForeColor = System.Drawing.Color.Gray

Me.cb_rejilla_y_4.Location = New System.Drawing.Point(16, 392)

Me.cb_rejilla_y_4.Name = "cb_rejilla_y_4"

Me.cb_rejilla_y_4.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_y_4.TabIndex = 66

Me.cb_rejilla_y_4.Text = "Y 4"

'

'cb_rejilla_y_3

'

Me.cb_rejilla_y_3.ForeColor = System.Drawing.Color.DarkOrange

Me.cb_rejilla_y_3.Location = New System.Drawing.Point(16, 376)

Me.cb_rejilla_y_3.Name = "cb_rejilla_y_3"

Me.cb_rejilla_y_3.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_y_3.TabIndex = 65

Me.cb_rejilla_y_3.Text = "Y 3"

'

'cb_rejilla_y_2

'

Me.cb_rejilla_y_2.ForeColor = System.Drawing.Color.Red

Me.cb_rejilla_y_2.Location = New System.Drawing.Point(16, 360)

Me.cb_rejilla_y_2.Name = "cb_rejilla_y_2"

Me.cb_rejilla_y_2.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_y_2.TabIndex = 64

Me.cb_rejilla_y_2.Text = "Y 2"

'

'cb_rejilla_y_1

'

Me.cb_rejilla_y_1.ForeColor = System.Drawing.Color.Green

Page 86: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.cb_rejilla_y_1.Location = New System.Drawing.Point(16, 344)

Me.cb_rejilla_y_1.Name = "cb_rejilla_y_1"

Me.cb_rejilla_y_1.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_y_1.TabIndex = 63

Me.cb_rejilla_y_1.Text = "Y 1"

'

'cb_rejilla_x

'

Me.cb_rejilla_x.Location = New System.Drawing.Point(16, 328)

Me.cb_rejilla_x.Name = "cb_rejilla_x"

Me.cb_rejilla_x.Size = New System.Drawing.Size(48, 16)

Me.cb_rejilla_x.TabIndex = 62

Me.cb_rejilla_x.Text = "X"

'

'Label114

'

Me.Label114.Location = New System.Drawing.Point(16, 304)

Me.Label114.Name = "Label114"

Me.Label114.Size = New System.Drawing.Size(48, 16)

Me.Label114.TabIndex = 61

Me.Label114.Text = "Rejillas"

'

'Cb_rango_osc

'

Me.Cb_rango_osc.Location = New System.Drawing.Point(96, 304)

Me.Cb_rango_osc.Name = "Cb_rango_osc"

Me.Cb_rango_osc.Size = New System.Drawing.Size(48, 24)

Me.Cb_rango_osc.TabIndex = 60

Me.Cb_rango_osc.Text = "R. A."

'

'B_rango_y_osc

'

Me.B_rango_y_osc.Location = New System.Drawing.Point(96, 328)

Me.B_rango_y_osc.Name = "B_rango_y_osc"

Me.B_rango_y_osc.Size = New System.Drawing.Size(56, 23)

Me.B_rango_y_osc.TabIndex = 59

Me.B_rango_y_osc.Text = "Rango Y"

'

'Tb_osciloscopio_nivel

'

Me.Tb_osciloscopio_nivel.Location = New System.Drawing.Point(88, 248)

Page 87: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_osciloscopio_nivel.Name = "Tb_osciloscopio_nivel"

Me.Tb_osciloscopio_nivel.Size = New System.Drawing.Size(64, 20)

Me.Tb_osciloscopio_nivel.TabIndex = 58

Me.Tb_osciloscopio_nivel.Text = CType(configurationAppSettings.GetValue("Tb_osciloscopio_nivel.Text", GetType(System.String)), String)

Me.Tb_osciloscopio_nivel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label15

'

Me.Label15.Location = New System.Drawing.Point(16, 248)

Me.Label15.Name = "Label15"

Me.Label15.Size = New System.Drawing.Size(72, 16)

Me.Label15.TabIndex = 57

Me.Label15.Text = "Nivel Disparo"

'

'Cb_osciloscopio_flanco

'

Me.Cb_osciloscopio_flanco.Items.AddRange(New Object() {"Subida", "Bajada"})

Me.Cb_osciloscopio_flanco.Location = New System.Drawing.Point(88, 224)

Me.Cb_osciloscopio_flanco.Name = "Cb_osciloscopio_flanco"

Me.Cb_osciloscopio_flanco.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_flanco.TabIndex = 56

Me.Cb_osciloscopio_flanco.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_flanco.Text", GetType(System.String)), String)

'

'Label14

'

Me.Label14.Location = New System.Drawing.Point(16, 224)

Me.Label14.Name = "Label14"

Me.Label14.Size = New System.Drawing.Size(64, 23)

Me.Label14.TabIndex = 55

Me.Label14.Text = "Tipo Flanco"

'

'Cb_osciloscopio_canal

'

Me.Cb_osciloscopio_canal.Items.AddRange(New Object() {"0", "1", "2", "3", "4", "5", "6"})

Me.Cb_osciloscopio_canal.Location = New System.Drawing.Point(112, 200)

Me.Cb_osciloscopio_canal.Name = "Cb_osciloscopio_canal"

Me.Cb_osciloscopio_canal.Size = New System.Drawing.Size(40, 21)

Me.Cb_osciloscopio_canal.TabIndex = 54

Me.Cb_osciloscopio_canal.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_canal.Text", GetType(System.String)), String)

Page 88: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label13

'

Me.Label13.Location = New System.Drawing.Point(16, 200)

Me.Label13.Name = "Label13"

Me.Label13.Size = New System.Drawing.Size(80, 16)

Me.Label13.TabIndex = 53

Me.Label13.Text = "Canal Disparo"

'

'Cb_osciloscopio_var_6

'

Me.Cb_osciloscopio_var_6.ForeColor = System.Drawing.Color.Blue

Me.Cb_osciloscopio_var_6.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_6.Location = New System.Drawing.Point(8, 136)

Me.Cb_osciloscopio_var_6.Name = "Cb_osciloscopio_var_6"

Me.Cb_osciloscopio_var_6.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_6.TabIndex = 52

Me.Cb_osciloscopio_var_6.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_6.Text", GetType(System.String)), String)

'

'Cb_osciloscopio_var_5

'

Me.Cb_osciloscopio_var_5.ForeColor = System.Drawing.Color.MediumVioletRed

Me.Cb_osciloscopio_var_5.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_5.Location = New System.Drawing.Point(8, 112)

Me.Cb_osciloscopio_var_5.Name = "Cb_osciloscopio_var_5"

Me.Cb_osciloscopio_var_5.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_5.TabIndex = 51

Me.Cb_osciloscopio_var_5.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_5.Text", GetType(System.String)), String)

'

'Cb_osciloscopio_var_4

'

Me.Cb_osciloscopio_var_4.ForeColor = System.Drawing.Color.Gray

Me.Cb_osciloscopio_var_4.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_4.Location = New System.Drawing.Point(8, 88)

Me.Cb_osciloscopio_var_4.Name = "Cb_osciloscopio_var_4"

Me.Cb_osciloscopio_var_4.Size = New System.Drawing.Size(64, 21)

Page 89: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Cb_osciloscopio_var_4.TabIndex = 50

Me.Cb_osciloscopio_var_4.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_4.Text", GetType(System.String)), String)

'

'B_osc_importar

'

Me.B_osc_importar.ForeColor = System.Drawing.Color.Green

Me.B_osc_importar.Location = New System.Drawing.Point(8, 488)

Me.B_osc_importar.Name = "B_osc_importar"

Me.B_osc_importar.Size = New System.Drawing.Size(64, 23)

Me.B_osc_importar.TabIndex = 49

Me.B_osc_importar.Text = "Importar"

'

'B_osc_exportar

'

Me.B_osc_exportar.ForeColor = System.Drawing.Color.Green

Me.B_osc_exportar.Location = New System.Drawing.Point(8, 456)

Me.B_osc_exportar.Name = "B_osc_exportar"

Me.B_osc_exportar.Size = New System.Drawing.Size(64, 23)

Me.B_osc_exportar.TabIndex = 48

Me.B_osc_exportar.Text = "Exportar"

'

'B_envio_128

'

Me.B_envio_128.Enabled = False

Me.B_envio_128.ForeColor = System.Drawing.Color.Maroon

Me.B_envio_128.Location = New System.Drawing.Point(88, 488)

Me.B_envio_128.Name = "B_envio_128"

Me.B_envio_128.Size = New System.Drawing.Size(64, 23)

Me.B_envio_128.TabIndex = 47

Me.B_envio_128.Text = "Refrescar"

'

'Cb_osciloscopio_var_t

'

Me.Cb_osciloscopio_var_t.Items.AddRange(New Object() {"20", "40", "60", "80", "100", "200", "400", "600", "1000", "1500", "200"})

Me.Cb_osciloscopio_var_t.Location = New System.Drawing.Point(8, 160)

Me.Cb_osciloscopio_var_t.Name = "Cb_osciloscopio_var_t"

Me.Cb_osciloscopio_var_t.RightToLeft = System.Windows.Forms.RightToLeft.Yes

Me.Cb_osciloscopio_var_t.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_t.TabIndex = 46

Me.Cb_osciloscopio_var_t.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_t.Text",

Page 90: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

GetType(System.String)), String)

'

'Cb_osciloscopio_var_3

'

Me.Cb_osciloscopio_var_3.ForeColor = System.Drawing.Color.DarkOrange

Me.Cb_osciloscopio_var_3.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_3.Location = New System.Drawing.Point(8, 64)

Me.Cb_osciloscopio_var_3.Name = "Cb_osciloscopio_var_3"

Me.Cb_osciloscopio_var_3.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_3.TabIndex = 45

Me.Cb_osciloscopio_var_3.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_3.Text", GetType(System.String)), String)

'

'Cb_osciloscopio_var_2

'

Me.Cb_osciloscopio_var_2.ForeColor = System.Drawing.Color.Red

Me.Cb_osciloscopio_var_2.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_2.Location = New System.Drawing.Point(8, 40)

Me.Cb_osciloscopio_var_2.Name = "Cb_osciloscopio_var_2"

Me.Cb_osciloscopio_var_2.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_2.TabIndex = 44

Me.Cb_osciloscopio_var_2.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_2.Text", GetType(System.String)), String)

'

'Cb_osciloscopio_var_1

'

Me.Cb_osciloscopio_var_1.ForeColor = System.Drawing.Color.Green

Me.Cb_osciloscopio_var_1.Items.AddRange(New Object() {"Ninguna", "Idc1", "Idc2", "Idc3", "Idc4", "Idc5", "Vc1", "Vc2", "Vc3", "Vc4", "Ia", "Ib", "Ic", "Va", "Vb", "Vc", "Pw", "Qw", "fdp", "MR1", "MR2", "MR3", "MR4", "MR5", "MR6", "MR7", "MR8", "ML1", "ML2", "ML3", "ML4", "ML5", "ML6", "ML7", "ML8"})

Me.Cb_osciloscopio_var_1.Location = New System.Drawing.Point(8, 16)

Me.Cb_osciloscopio_var_1.Name = "Cb_osciloscopio_var_1"

Me.Cb_osciloscopio_var_1.Size = New System.Drawing.Size(64, 21)

Me.Cb_osciloscopio_var_1.TabIndex = 43

Me.Cb_osciloscopio_var_1.Text = CType(configurationAppSettings.GetValue("Cb_osciloscopio_var_1.Text", GetType(System.String)), String)

'

'Legend5

'

Me.Legend5.Items.AddRange(New NationalInstruments.UI.LegendItem() {Me.LegendItem16, Me.LegendItem17, Me.LegendItem18, Me.LegendItem19, Me.LegendItem20, Me.LegendItem21})

Page 91: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Legend5.Location = New System.Drawing.Point(80, 8)

Me.Legend5.Name = "Legend5"

Me.Legend5.Size = New System.Drawing.Size(80, 176)

Me.Legend5.TabIndex = 38

'

'LegendItem16

'

Me.LegendItem16.Source = Me.WaveformPlot13

Me.LegendItem16.Text = "Vacío "

'

'WaveformPlot13

'

Me.WaveformPlot13.CanScaleYAxis = False

Me.WaveformPlot13.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot13.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot13.XAxis = Me.XAxis1

Me.WaveformPlot13.YAxis = Me.YAxis1

'

'XAxis1

'

Me.XAxis1.MajorDivisions.GridColor = System.Drawing.Color.Black

'

'YAxis1

'

Me.YAxis1.BaseLineColor = System.Drawing.Color.Green

Me.YAxis1.BaseLineVisible = True

Me.YAxis1.CaptionBackColor = System.Drawing.Color.Green

Me.YAxis1.CaptionFont = New System.Drawing.Font("MS PGothic", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.YAxis1.CaptionForeColor = System.Drawing.Color.Green

Me.YAxis1.MajorDivisions.GridColor = System.Drawing.Color.Green

Me.YAxis1.MajorDivisions.LabelForeColor = System.Drawing.Color.Green

Me.YAxis1.MajorDivisions.TickColor = System.Drawing.Color.Green

Me.YAxis1.Range = New NationalInstruments.UI.Range(-10, 10)

'

'LegendItem17

'

Me.LegendItem17.Source = Me.WaveformPlot14

Me.LegendItem17.Text = "Vacío "

'

'WaveformPlot14

Page 92: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.WaveformPlot14.CanScaleYAxis = False

Me.WaveformPlot14.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot14.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot14.XAxis = Me.XAxis1

Me.WaveformPlot14.YAxis = Me.YAxis6

'

'YAxis6

'

Me.YAxis6.BaseLineColor = System.Drawing.Color.Red

Me.YAxis6.BaseLineVisible = True

Me.YAxis6.MajorDivisions.GridColor = System.Drawing.Color.Red

Me.YAxis6.MajorDivisions.LabelForeColor = System.Drawing.Color.Red

Me.YAxis6.MajorDivisions.TickColor = System.Drawing.Color.Red

Me.YAxis6.Range = New NationalInstruments.UI.Range(-10, 10)

'

'LegendItem18

'

Me.LegendItem18.Source = Me.WaveformPlot15

Me.LegendItem18.Text = "Vacío "

'

'WaveformPlot15

'

Me.WaveformPlot15.CanScaleYAxis = False

Me.WaveformPlot15.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot15.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot15.XAxis = Me.XAxis1

Me.WaveformPlot15.YAxis = Me.YAxis7

'

'YAxis7

'

Me.YAxis7.BaseLineColor = System.Drawing.Color.DarkOrange

Me.YAxis7.BaseLineVisible = True

Me.YAxis7.MajorDivisions.GridColor = System.Drawing.Color.DarkOrange

Me.YAxis7.MajorDivisions.LabelForeColor = System.Drawing.Color.DarkOrange

Me.YAxis7.MajorDivisions.TickColor = System.Drawing.Color.DarkOrange

Me.YAxis7.Range = New NationalInstruments.UI.Range(-10, 10)

'

'LegendItem19

'

Me.LegendItem19.Source = Me.WaveformPlot16

Page 93: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.LegendItem19.Text = "Vacío"

'

'WaveformPlot16

'

Me.WaveformPlot16.CanScaleYAxis = False

Me.WaveformPlot16.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot16.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot16.XAxis = Me.XAxis1

Me.WaveformPlot16.YAxis = Me.YAxis8

'

'YAxis8

'

Me.YAxis8.BaseLineColor = System.Drawing.Color.Gray

Me.YAxis8.BaseLineVisible = True

Me.YAxis8.MajorDivisions.GridColor = System.Drawing.Color.Gray

Me.YAxis8.MajorDivisions.LabelForeColor = System.Drawing.Color.Gray

Me.YAxis8.MajorDivisions.TickColor = System.Drawing.Color.Gray

Me.YAxis8.Range = New NationalInstruments.UI.Range(-10, 10)

'

'LegendItem20

'

Me.LegendItem20.Source = Me.WaveformPlot17

Me.LegendItem20.Text = "Vacío"

'

'WaveformPlot17

'

Me.WaveformPlot17.CanScaleYAxis = False

Me.WaveformPlot17.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot17.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot17.XAxis = Me.XAxis1

Me.WaveformPlot17.YAxis = Me.YAxis9

'

'YAxis9

'

Me.YAxis9.BaseLineColor = System.Drawing.Color.MediumVioletRed

Me.YAxis9.BaseLineVisible = True

Me.YAxis9.MajorDivisions.GridColor = System.Drawing.Color.MediumVioletRed

Me.YAxis9.MajorDivisions.LabelForeColor = System.Drawing.Color.MediumVioletRed

Me.YAxis9.MajorDivisions.TickColor = System.Drawing.Color.MediumVioletRed

Me.YAxis9.Range = New NationalInstruments.UI.Range(-10, 10)

'

Page 94: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'LegendItem21

'

Me.LegendItem21.Source = Me.WaveformPlot18

Me.LegendItem21.Text = "Vacío"

'

'WaveformPlot18

'

Me.WaveformPlot18.CanScaleYAxis = False

Me.WaveformPlot18.LineColor = System.Drawing.Color.Transparent

Me.WaveformPlot18.PointColor = System.Drawing.Color.Transparent

Me.WaveformPlot18.XAxis = Me.XAxis1

Me.WaveformPlot18.YAxis = Me.YAxis10

'

'YAxis10

'

Me.YAxis10.BaseLineColor = System.Drawing.Color.Blue

Me.YAxis10.BaseLineVisible = True

Me.YAxis10.MajorDivisions.GridColor = System.Drawing.Color.Blue

Me.YAxis10.MajorDivisions.LabelForeColor = System.Drawing.Color.Blue

Me.YAxis10.MajorDivisions.TickColor = System.Drawing.Color.Blue

Me.YAxis10.Range = New NationalInstruments.UI.Range(-10, 10)

'

'cbcursor_osc

'

Me.cbcursor_osc.ForeColor = System.Drawing.Color.Black

Me.cbcursor_osc.Location = New System.Drawing.Point(96, 360)

Me.cbcursor_osc.Name = "cbcursor_osc"

Me.cbcursor_osc.Size = New System.Drawing.Size(64, 16)

Me.cbcursor_osc.TabIndex = 37

Me.cbcursor_osc.Text = "Cursors"

'

'tbcursors_osc_x

'

Me.tbcursors_osc_x.ForeColor = System.Drawing.Color.Black

Me.tbcursors_osc_x.Location = New System.Drawing.Point(120, 416)

Me.tbcursors_osc_x.Name = "tbcursors_osc_x"

Me.tbcursors_osc_x.Size = New System.Drawing.Size(32, 20)

Me.tbcursors_osc_x.TabIndex = 42

Me.tbcursors_osc_x.Text = "0"

Me.tbcursors_osc_x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

Page 95: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Label3

'

Me.Label3.ForeColor = System.Drawing.Color.Black

Me.Label3.Location = New System.Drawing.Point(96, 384)

Me.Label3.Name = "Label3"

Me.Label3.Size = New System.Drawing.Size(24, 16)

Me.Label3.TabIndex = 39

Me.Label3.Text = "∆y"

'

'Label9

'

Me.Label9.ForeColor = System.Drawing.Color.Black

Me.Label9.Location = New System.Drawing.Point(96, 416)

Me.Label9.Name = "Label9"

Me.Label9.Size = New System.Drawing.Size(24, 16)

Me.Label9.TabIndex = 41

Me.Label9.Text = "∆x"

'

'tbcursors_osc_y

'

Me.tbcursors_osc_y.ForeColor = System.Drawing.Color.Black

Me.tbcursors_osc_y.Location = New System.Drawing.Point(120, 384)

Me.tbcursors_osc_y.Name = "tbcursors_osc_y"

Me.tbcursors_osc_y.Size = New System.Drawing.Size(32, 20)

Me.tbcursors_osc_y.TabIndex = 40

Me.tbcursors_osc_y.Text = "0"

Me.tbcursors_osc_y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Osciloscopio

'

Me.Osciloscopio.Cursors.AddRange(New NationalInstruments.UI.XYCursor() {Me.XyCursor_osc_1, Me.XyCursor_osc_2})

Me.Osciloscopio.Location = New System.Drawing.Point(160, 8)

Me.Osciloscopio.Name = "Osciloscopio"

Me.Osciloscopio.PlotAreaColor = System.Drawing.Color.White

Me.Osciloscopio.Plots.AddRange(New NationalInstruments.UI.WaveformPlot() {Me.WaveformPlot13, Me.WaveformPlot14, Me.WaveformPlot15, Me.WaveformPlot16, Me.WaveformPlot17, Me.WaveformPlot18})

Me.Osciloscopio.Size = New System.Drawing.Size(832, 496)

Me.Osciloscopio.TabIndex = 0

Me.Osciloscopio.XAxes.AddRange(New NationalInstruments.UI.XAxis() {Me.XAxis1})

Me.Osciloscopio.YAxes.AddRange(New NationalInstruments.UI.YAxis() {Me.YAxis1, Me.YAxis6, Me.YAxis7, Me.YAxis8, Me.YAxis9, Me.YAxis10})

'

Page 96: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'XyCursor_osc_1

'

Me.XyCursor_osc_1.Color = System.Drawing.Color.Black

Me.XyCursor_osc_1.LabelVisible = True

Me.XyCursor_osc_1.Plot = Me.WaveformPlot13

Me.XyCursor_osc_1.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_osc_1.Visible = False

'

'XyCursor_osc_2

'

Me.XyCursor_osc_2.Color = System.Drawing.Color.Black

Me.XyCursor_osc_2.LabelVisible = True

Me.XyCursor_osc_2.Plot = Me.WaveformPlot13

Me.XyCursor_osc_2.SnapMode = NationalInstruments.UI.CursorSnapMode.NearestPoint

Me.XyCursor_osc_2.Visible = False

'

'TabPage2

'

Me.TabPage2.Controls.Add(Me.GroupBox5)

Me.TabPage2.Controls.Add(Me.Label8)

Me.TabPage2.Controls.Add(Me.Label7)

Me.TabPage2.Controls.Add(Me.Label6)

Me.TabPage2.Controls.Add(Me.Label5)

Me.TabPage2.Controls.Add(Me.Lvtabla)

Me.TabPage2.Controls.Add(Me.cbcampo)

Me.TabPage2.Controls.Add(Me.cbtablas)

Me.TabPage2.Controls.Add(Me.tbvalor)

Me.TabPage2.Controls.Add(Me.tbbase)

Me.TabPage2.Controls.Add(Me.Bnuevoitem)

Me.TabPage2.Controls.Add(Me.Basignar)

Me.TabPage2.Controls.Add(Me.Beliminaritem)

Me.TabPage2.Controls.Add(Me.Bguardarbase)

Me.TabPage2.Controls.Add(Me.breleertabla)

Me.TabPage2.Controls.Add(Me.Babrirtabla)

Me.TabPage2.Controls.Add(Me.Bmostrartablas)

Me.TabPage2.Controls.Add(Me.Bexaminar)

Me.TabPage2.Location = New System.Drawing.Point(4, 22)

Me.TabPage2.Name = "TabPage2"

Me.TabPage2.Size = New System.Drawing.Size(1010, 518)

Me.TabPage2.TabIndex = 2

Me.TabPage2.Text = "Tabla"

Page 97: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'GroupBox5

'

Me.GroupBox5.Controls.Add(Me.Tbintervalo)

Me.GroupBox5.Controls.Add(Me.Label1)

Me.GroupBox5.Controls.Add(Me.cbautomatico)

Me.GroupBox5.ForeColor = System.Drawing.Color.Black

Me.GroupBox5.Location = New System.Drawing.Point(24, 160)

Me.GroupBox5.Name = "GroupBox5"

Me.GroupBox5.Size = New System.Drawing.Size(160, 88)

Me.GroupBox5.TabIndex = 18

Me.GroupBox5.TabStop = False

Me.GroupBox5.Text = "Almacenamiento de datos"

'

'Tbintervalo

'

Me.Tbintervalo.Enabled = False

Me.Tbintervalo.ForeColor = System.Drawing.Color.Black

Me.Tbintervalo.Location = New System.Drawing.Point(96, 56)

Me.Tbintervalo.Name = "Tbintervalo"

Me.Tbintervalo.Size = New System.Drawing.Size(32, 20)

Me.Tbintervalo.TabIndex = 2

Me.Tbintervalo.Text = "5"

Me.Tbintervalo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label1

'

Me.Label1.ForeColor = System.Drawing.Color.Black

Me.Label1.Location = New System.Drawing.Point(16, 56)

Me.Label1.Name = "Label1"

Me.Label1.Size = New System.Drawing.Size(96, 16)

Me.Label1.TabIndex = 1

Me.Label1.Text = "Intervalo (seg)"

'

'cbautomatico

'

Me.cbautomatico.Enabled = False

Me.cbautomatico.ForeColor = System.Drawing.Color.Black

Me.cbautomatico.Location = New System.Drawing.Point(16, 24)

Me.cbautomatico.Name = "cbautomatico"

Me.cbautomatico.Size = New System.Drawing.Size(80, 24)

Page 98: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.cbautomatico.TabIndex = 0

Me.cbautomatico.Text = "Automático"

'

'Label8

'

Me.Label8.ForeColor = System.Drawing.Color.Black

Me.Label8.Location = New System.Drawing.Point(16, 440)

Me.Label8.Name = "Label8"

Me.Label8.Size = New System.Drawing.Size(32, 16)

Me.Label8.TabIndex = 16

Me.Label8.Text = "Valor"

'

'Label7

'

Me.Label7.ForeColor = System.Drawing.Color.Black

Me.Label7.Location = New System.Drawing.Point(8, 40)

Me.Label7.Name = "Label7"

Me.Label7.Size = New System.Drawing.Size(40, 16)

Me.Label7.TabIndex = 13

Me.Label7.Text = "Tabla"

'

'Label6

'

Me.Label6.ForeColor = System.Drawing.Color.Black

Me.Label6.Location = New System.Drawing.Point(8, 416)

Me.Label6.Name = "Label6"

Me.Label6.Size = New System.Drawing.Size(48, 16)

Me.Label6.TabIndex = 15

Me.Label6.Text = "Campo"

'

'Label5

'

Me.Label5.ForeColor = System.Drawing.Color.Black

Me.Label5.Location = New System.Drawing.Point(8, 16)

Me.Label5.Name = "Label5"

Me.Label5.Size = New System.Drawing.Size(80, 16)

Me.Label5.TabIndex = 12

Me.Label5.Text = "Base de datos"

'

'Lvtabla

'

Page 99: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Lvtabla.Location = New System.Drawing.Point(208, 8)

Me.Lvtabla.Name = "Lvtabla"

Me.Lvtabla.Size = New System.Drawing.Size(792, 448)

Me.Lvtabla.TabIndex = 14

'

'cbcampo

'

Me.cbcampo.Enabled = False

Me.cbcampo.ForeColor = System.Drawing.Color.Black

Me.cbcampo.Location = New System.Drawing.Point(56, 408)

Me.cbcampo.Name = "cbcampo"

Me.cbcampo.Size = New System.Drawing.Size(144, 21)

Me.cbcampo.TabIndex = 6

'

'cbtablas

'

Me.cbtablas.ForeColor = System.Drawing.Color.Black

Me.cbtablas.Location = New System.Drawing.Point(80, 32)

Me.cbtablas.Name = "cbtablas"

Me.cbtablas.Size = New System.Drawing.Size(121, 21)

Me.cbtablas.TabIndex = 3

'

'tbvalor

'

Me.tbvalor.Enabled = False

Me.tbvalor.ForeColor = System.Drawing.Color.Black

Me.tbvalor.Location = New System.Drawing.Point(56, 432)

Me.tbvalor.Name = "tbvalor"

Me.tbvalor.Size = New System.Drawing.Size(144, 20)

Me.tbvalor.TabIndex = 7

Me.tbvalor.Text = ""

'

'tbbase

'

Me.tbbase.BackColor = System.Drawing.Color.White

Me.tbbase.ForeColor = System.Drawing.Color.Black

Me.tbbase.Location = New System.Drawing.Point(88, 8)

Me.tbbase.Name = "tbbase"

Me.tbbase.Size = New System.Drawing.Size(112, 20)

Me.tbbase.TabIndex = 0

Me.tbbase.Text = CType(configurationAppSettings.GetValue("tbbase.Text", GetType(System.String)), String)

Page 100: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Bnuevoitem

'

Me.Bnuevoitem.Enabled = False

Me.Bnuevoitem.ForeColor = System.Drawing.Color.Black

Me.Bnuevoitem.Location = New System.Drawing.Point(104, 312)

Me.Bnuevoitem.Name = "Bnuevoitem"

Me.Bnuevoitem.Size = New System.Drawing.Size(88, 23)

Me.Bnuevoitem.TabIndex = 5

Me.Bnuevoitem.Text = "Nuevo Item"

'

'Basignar

'

Me.Basignar.Enabled = False

Me.Basignar.ForeColor = System.Drawing.Color.Black

Me.Basignar.Location = New System.Drawing.Point(8, 344)

Me.Basignar.Name = "Basignar"

Me.Basignar.Size = New System.Drawing.Size(88, 23)

Me.Basignar.TabIndex = 8

Me.Basignar.Text = "Asignar"

'

'Beliminaritem

'

Me.Beliminaritem.Enabled = False

Me.Beliminaritem.ForeColor = System.Drawing.Color.Black

Me.Beliminaritem.Location = New System.Drawing.Point(104, 344)

Me.Beliminaritem.Name = "Beliminaritem"

Me.Beliminaritem.Size = New System.Drawing.Size(88, 23)

Me.Beliminaritem.TabIndex = 10

Me.Beliminaritem.Text = "Eliminar Item"

'

'Bguardarbase

'

Me.Bguardarbase.Enabled = False

Me.Bguardarbase.ForeColor = System.Drawing.Color.Black

Me.Bguardarbase.Location = New System.Drawing.Point(8, 376)

Me.Bguardarbase.Name = "Bguardarbase"

Me.Bguardarbase.Size = New System.Drawing.Size(88, 23)

Me.Bguardarbase.TabIndex = 9

Me.Bguardarbase.Text = "Guardar Base"

'

Page 101: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'breleertabla

'

Me.breleertabla.Enabled = False

Me.breleertabla.ForeColor = System.Drawing.Color.Black

Me.breleertabla.Location = New System.Drawing.Point(104, 376)

Me.breleertabla.Name = "breleertabla"

Me.breleertabla.Size = New System.Drawing.Size(88, 23)

Me.breleertabla.TabIndex = 11

Me.breleertabla.Text = "Releer Tabla"

'

'Babrirtabla

'

Me.Babrirtabla.Enabled = False

Me.Babrirtabla.ForeColor = System.Drawing.Color.Black

Me.Babrirtabla.Location = New System.Drawing.Point(8, 96)

Me.Babrirtabla.Name = "Babrirtabla"

Me.Babrirtabla.Size = New System.Drawing.Size(88, 23)

Me.Babrirtabla.TabIndex = 4

Me.Babrirtabla.Text = "Abrir tabla"

'

'Bmostrartablas

'

Me.Bmostrartablas.Enabled = False

Me.Bmostrartablas.ForeColor = System.Drawing.Color.Black

Me.Bmostrartablas.Location = New System.Drawing.Point(104, 64)

Me.Bmostrartablas.Name = "Bmostrartablas"

Me.Bmostrartablas.Size = New System.Drawing.Size(88, 23)

Me.Bmostrartablas.TabIndex = 2

Me.Bmostrartablas.Text = "Mostrar Tablas"

'

'Bexaminar

'

Me.Bexaminar.ForeColor = System.Drawing.Color.Black

Me.Bexaminar.Location = New System.Drawing.Point(8, 64)

Me.Bexaminar.Name = "Bexaminar"

Me.Bexaminar.Size = New System.Drawing.Size(88, 23)

Me.Bexaminar.TabIndex = 1

Me.Bexaminar.Text = "Examinar"

'

'TabPage9

'

Page 102: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.TabPage9.Controls.Add(Me.B_imp_par)

Me.TabPage9.Controls.Add(Me.B_exp_par)

Me.TabPage9.Controls.Add(Me.GroupBox17)

Me.TabPage9.Controls.Add(Me.GroupBox16)

Me.TabPage9.Location = New System.Drawing.Point(4, 22)

Me.TabPage9.Name = "TabPage9"

Me.TabPage9.Size = New System.Drawing.Size(1010, 518)

Me.TabPage9.TabIndex = 9

Me.TabPage9.Text = "Parámetros"

'

'B_imp_par

'

Me.B_imp_par.Location = New System.Drawing.Point(120, 456)

Me.B_imp_par.Name = "B_imp_par"

Me.B_imp_par.Size = New System.Drawing.Size(88, 23)

Me.B_imp_par.TabIndex = 3

Me.B_imp_par.Text = "Importar"

'

'B_exp_par

'

Me.B_exp_par.Location = New System.Drawing.Point(16, 456)

Me.B_exp_par.Name = "B_exp_par"

Me.B_exp_par.Size = New System.Drawing.Size(88, 23)

Me.B_exp_par.TabIndex = 2

Me.B_exp_par.Text = "Exportar"

'

'GroupBox17

'

Me.GroupBox17.Controls.Add(Me.Tb_par_20)

Me.GroupBox17.Controls.Add(Me.Label63)

Me.GroupBox17.Controls.Add(Me.Tb_par_19)

Me.GroupBox17.Controls.Add(Me.Label64)

Me.GroupBox17.Controls.Add(Me.Tb_par_18)

Me.GroupBox17.Controls.Add(Me.Label65)

Me.GroupBox17.Controls.Add(Me.Tb_par_17)

Me.GroupBox17.Controls.Add(Me.Label66)

Me.GroupBox17.Controls.Add(Me.Tb_par_16)

Me.GroupBox17.Controls.Add(Me.Label67)

Me.GroupBox17.Controls.Add(Me.Tb_par_15)

Me.GroupBox17.Controls.Add(Me.Label68)

Me.GroupBox17.Controls.Add(Me.Tb_par_14)

Page 103: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox17.Controls.Add(Me.Label69)

Me.GroupBox17.Controls.Add(Me.Tb_par_13)

Me.GroupBox17.Controls.Add(Me.Label70)

Me.GroupBox17.Controls.Add(Me.Tb_par_12)

Me.GroupBox17.Controls.Add(Me.Label71)

Me.GroupBox17.Controls.Add(Me.Tb_par_11)

Me.GroupBox17.Controls.Add(Me.Label72)

Me.GroupBox17.Controls.Add(Me.Tb_par_10)

Me.GroupBox17.Controls.Add(Me.Label73)

Me.GroupBox17.Controls.Add(Me.Tb_par_9)

Me.GroupBox17.Controls.Add(Me.Label74)

Me.GroupBox17.Controls.Add(Me.Tb_par_8)

Me.GroupBox17.Controls.Add(Me.Label75)

Me.GroupBox17.Controls.Add(Me.Tb_par_7)

Me.GroupBox17.Controls.Add(Me.Label76)

Me.GroupBox17.Controls.Add(Me.Tb_par_6)

Me.GroupBox17.Controls.Add(Me.Label77)

Me.GroupBox17.Controls.Add(Me.Tb_par_5)

Me.GroupBox17.Controls.Add(Me.Label78)

Me.GroupBox17.Controls.Add(Me.Tb_par_4)

Me.GroupBox17.Controls.Add(Me.Label79)

Me.GroupBox17.Controls.Add(Me.Tb_par_3)

Me.GroupBox17.Controls.Add(Me.Label80)

Me.GroupBox17.Controls.Add(Me.Tb_par_2)

Me.GroupBox17.Controls.Add(Me.Label81)

Me.GroupBox17.Controls.Add(Me.Tb_par_1)

Me.GroupBox17.Controls.Add(Me.Label82)

Me.GroupBox17.Controls.Add(Me.B_envio_67)

Me.GroupBox17.Controls.Add(Me.B_envio_68_2)

Me.GroupBox17.Location = New System.Drawing.Point(248, 24)

Me.GroupBox17.Name = "GroupBox17"

Me.GroupBox17.Size = New System.Drawing.Size(216, 416)

Me.GroupBox17.TabIndex = 1

Me.GroupBox17.TabStop = False

Me.GroupBox17.Text = "Otros parámetros"

'

'Tb_par_20

'

Me.Tb_par_20.Location = New System.Drawing.Point(160, 240)

Me.Tb_par_20.Name = "Tb_par_20"

Me.Tb_par_20.Size = New System.Drawing.Size(40, 20)

Page 104: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_par_20.TabIndex = 39

Me.Tb_par_20.Text = "0"

Me.Tb_par_20.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label63

'

Me.Label63.Location = New System.Drawing.Point(112, 240)

Me.Label63.Name = "Label63"

Me.Label63.Size = New System.Drawing.Size(48, 16)

Me.Label63.TabIndex = 38

Me.Label63.Text = "Par_20"

'

'Tb_par_19

'

Me.Tb_par_19.Location = New System.Drawing.Point(160, 216)

Me.Tb_par_19.Name = "Tb_par_19"

Me.Tb_par_19.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_19.TabIndex = 37

Me.Tb_par_19.Text = "0"

Me.Tb_par_19.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label64

'

Me.Label64.Location = New System.Drawing.Point(112, 216)

Me.Label64.Name = "Label64"

Me.Label64.Size = New System.Drawing.Size(48, 16)

Me.Label64.TabIndex = 36

Me.Label64.Text = "Par_19"

'

'Tb_par_18

'

Me.Tb_par_18.Location = New System.Drawing.Point(160, 192)

Me.Tb_par_18.Name = "Tb_par_18"

Me.Tb_par_18.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_18.TabIndex = 35

Me.Tb_par_18.Text = "0"

Me.Tb_par_18.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label65

'

Me.Label65.Location = New System.Drawing.Point(112, 192)

Page 105: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label65.Name = "Label65"

Me.Label65.Size = New System.Drawing.Size(48, 16)

Me.Label65.TabIndex = 34

Me.Label65.Text = "Par_18"

'

'Tb_par_17

'

Me.Tb_par_17.Location = New System.Drawing.Point(160, 168)

Me.Tb_par_17.Name = "Tb_par_17"

Me.Tb_par_17.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_17.TabIndex = 33

Me.Tb_par_17.Text = "0"

Me.Tb_par_17.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label66

'

Me.Label66.Location = New System.Drawing.Point(112, 168)

Me.Label66.Name = "Label66"

Me.Label66.Size = New System.Drawing.Size(48, 16)

Me.Label66.TabIndex = 32

Me.Label66.Text = "Par_17"

'

'Tb_par_16

'

Me.Tb_par_16.Location = New System.Drawing.Point(160, 144)

Me.Tb_par_16.Name = "Tb_par_16"

Me.Tb_par_16.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_16.TabIndex = 31

Me.Tb_par_16.Text = "0"

Me.Tb_par_16.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label67

'

Me.Label67.Location = New System.Drawing.Point(112, 144)

Me.Label67.Name = "Label67"

Me.Label67.Size = New System.Drawing.Size(48, 16)

Me.Label67.TabIndex = 30

Me.Label67.Text = "Par_16"

'

'Tb_par_15

'

Page 106: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_par_15.Location = New System.Drawing.Point(160, 120)

Me.Tb_par_15.Name = "Tb_par_15"

Me.Tb_par_15.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_15.TabIndex = 29

Me.Tb_par_15.Text = "0"

Me.Tb_par_15.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label68

'

Me.Label68.Location = New System.Drawing.Point(112, 120)

Me.Label68.Name = "Label68"

Me.Label68.Size = New System.Drawing.Size(48, 16)

Me.Label68.TabIndex = 28

Me.Label68.Text = "Par_15"

'

'Tb_par_14

'

Me.Tb_par_14.Location = New System.Drawing.Point(160, 96)

Me.Tb_par_14.Name = "Tb_par_14"

Me.Tb_par_14.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_14.TabIndex = 27

Me.Tb_par_14.Text = "0"

Me.Tb_par_14.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label69

'

Me.Label69.Location = New System.Drawing.Point(112, 96)

Me.Label69.Name = "Label69"

Me.Label69.Size = New System.Drawing.Size(48, 16)

Me.Label69.TabIndex = 26

Me.Label69.Text = "Par_14"

'

'Tb_par_13

'

Me.Tb_par_13.Location = New System.Drawing.Point(160, 72)

Me.Tb_par_13.Name = "Tb_par_13"

Me.Tb_par_13.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_13.TabIndex = 25

Me.Tb_par_13.Text = "0"

Me.Tb_par_13.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

Page 107: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Label70

'

Me.Label70.Location = New System.Drawing.Point(112, 72)

Me.Label70.Name = "Label70"

Me.Label70.Size = New System.Drawing.Size(48, 16)

Me.Label70.TabIndex = 24

Me.Label70.Text = "Par_13"

'

'Tb_par_12

'

Me.Tb_par_12.Location = New System.Drawing.Point(160, 48)

Me.Tb_par_12.Name = "Tb_par_12"

Me.Tb_par_12.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_12.TabIndex = 23

Me.Tb_par_12.Text = "0"

Me.Tb_par_12.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label71

'

Me.Label71.Location = New System.Drawing.Point(112, 48)

Me.Label71.Name = "Label71"

Me.Label71.Size = New System.Drawing.Size(48, 16)

Me.Label71.TabIndex = 22

Me.Label71.Text = "Par_12"

'

'Tb_par_11

'

Me.Tb_par_11.Location = New System.Drawing.Point(160, 24)

Me.Tb_par_11.Name = "Tb_par_11"

Me.Tb_par_11.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_11.TabIndex = 21

Me.Tb_par_11.Text = "0"

Me.Tb_par_11.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label72

'

Me.Label72.Location = New System.Drawing.Point(112, 24)

Me.Label72.Name = "Label72"

Me.Label72.Size = New System.Drawing.Size(48, 16)

Me.Label72.TabIndex = 20

Me.Label72.Text = "Par_11"

Page 108: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Tb_par_10

'

Me.Tb_par_10.Location = New System.Drawing.Point(56, 240)

Me.Tb_par_10.Name = "Tb_par_10"

Me.Tb_par_10.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_10.TabIndex = 19

Me.Tb_par_10.Text = "0"

Me.Tb_par_10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label73

'

Me.Label73.Location = New System.Drawing.Point(8, 240)

Me.Label73.Name = "Label73"

Me.Label73.Size = New System.Drawing.Size(48, 16)

Me.Label73.TabIndex = 18

Me.Label73.Text = "Par_10"

'

'Tb_par_9

'

Me.Tb_par_9.Location = New System.Drawing.Point(56, 216)

Me.Tb_par_9.Name = "Tb_par_9"

Me.Tb_par_9.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_9.TabIndex = 17

Me.Tb_par_9.Text = "0"

Me.Tb_par_9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label74

'

Me.Label74.Location = New System.Drawing.Point(8, 216)

Me.Label74.Name = "Label74"

Me.Label74.Size = New System.Drawing.Size(40, 16)

Me.Label74.TabIndex = 16

Me.Label74.Text = "Par_9"

'

'Tb_par_8

'

Me.Tb_par_8.Location = New System.Drawing.Point(56, 192)

Me.Tb_par_8.Name = "Tb_par_8"

Me.Tb_par_8.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_8.TabIndex = 15

Page 109: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_par_8.Text = "0"

Me.Tb_par_8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label75

'

Me.Label75.Location = New System.Drawing.Point(8, 192)

Me.Label75.Name = "Label75"

Me.Label75.Size = New System.Drawing.Size(40, 16)

Me.Label75.TabIndex = 14

Me.Label75.Text = "Par_8"

'

'Tb_par_7

'

Me.Tb_par_7.Location = New System.Drawing.Point(56, 168)

Me.Tb_par_7.Name = "Tb_par_7"

Me.Tb_par_7.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_7.TabIndex = 13

Me.Tb_par_7.Text = "0"

Me.Tb_par_7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label76

'

Me.Label76.Location = New System.Drawing.Point(8, 168)

Me.Label76.Name = "Label76"

Me.Label76.Size = New System.Drawing.Size(40, 16)

Me.Label76.TabIndex = 12

Me.Label76.Text = "Par_7"

'

'Tb_par_6

'

Me.Tb_par_6.Location = New System.Drawing.Point(56, 144)

Me.Tb_par_6.Name = "Tb_par_6"

Me.Tb_par_6.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_6.TabIndex = 11

Me.Tb_par_6.Text = "0"

Me.Tb_par_6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label77

'

Me.Label77.Location = New System.Drawing.Point(8, 144)

Me.Label77.Name = "Label77"

Page 110: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label77.Size = New System.Drawing.Size(40, 16)

Me.Label77.TabIndex = 10

Me.Label77.Text = "Par_6"

'

'Tb_par_5

'

Me.Tb_par_5.Location = New System.Drawing.Point(56, 120)

Me.Tb_par_5.Name = "Tb_par_5"

Me.Tb_par_5.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_5.TabIndex = 9

Me.Tb_par_5.Text = "0"

Me.Tb_par_5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label78

'

Me.Label78.Location = New System.Drawing.Point(8, 120)

Me.Label78.Name = "Label78"

Me.Label78.Size = New System.Drawing.Size(40, 16)

Me.Label78.TabIndex = 8

Me.Label78.Text = "Par_5"

'

'Tb_par_4

'

Me.Tb_par_4.Location = New System.Drawing.Point(56, 96)

Me.Tb_par_4.Name = "Tb_par_4"

Me.Tb_par_4.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_4.TabIndex = 7

Me.Tb_par_4.Text = "0"

Me.Tb_par_4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label79

'

Me.Label79.Location = New System.Drawing.Point(8, 96)

Me.Label79.Name = "Label79"

Me.Label79.Size = New System.Drawing.Size(40, 16)

Me.Label79.TabIndex = 6

Me.Label79.Text = "Par_4"

'

'Tb_par_3

'

Me.Tb_par_3.Location = New System.Drawing.Point(56, 72)

Page 111: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_par_3.Name = "Tb_par_3"

Me.Tb_par_3.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_3.TabIndex = 5

Me.Tb_par_3.Text = "0"

Me.Tb_par_3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label80

'

Me.Label80.Location = New System.Drawing.Point(8, 72)

Me.Label80.Name = "Label80"

Me.Label80.Size = New System.Drawing.Size(40, 16)

Me.Label80.TabIndex = 4

Me.Label80.Text = "Par_3"

'

'Tb_par_2

'

Me.Tb_par_2.Location = New System.Drawing.Point(56, 48)

Me.Tb_par_2.Name = "Tb_par_2"

Me.Tb_par_2.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_2.TabIndex = 3

Me.Tb_par_2.Text = "0"

Me.Tb_par_2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label81

'

Me.Label81.Location = New System.Drawing.Point(8, 48)

Me.Label81.Name = "Label81"

Me.Label81.Size = New System.Drawing.Size(40, 16)

Me.Label81.TabIndex = 2

Me.Label81.Text = "Par_2"

'

'Tb_par_1

'

Me.Tb_par_1.Location = New System.Drawing.Point(56, 24)

Me.Tb_par_1.Name = "Tb_par_1"

Me.Tb_par_1.Size = New System.Drawing.Size(40, 20)

Me.Tb_par_1.TabIndex = 1

Me.Tb_par_1.Text = "0"

Me.Tb_par_1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label82

Page 112: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Label82.Location = New System.Drawing.Point(8, 24)

Me.Label82.Name = "Label82"

Me.Label82.Size = New System.Drawing.Size(40, 16)

Me.Label82.TabIndex = 0

Me.Label82.Text = "Par_1"

'

'B_envio_67

'

Me.B_envio_67.Enabled = False

Me.B_envio_67.Location = New System.Drawing.Point(8, 376)

Me.B_envio_67.Name = "B_envio_67"

Me.B_envio_67.Size = New System.Drawing.Size(88, 23)

Me.B_envio_67.TabIndex = 8

Me.B_envio_67.Text = "Enviar"

'

'B_envio_68_2

'

Me.B_envio_68_2.Enabled = False

Me.B_envio_68_2.Location = New System.Drawing.Point(112, 376)

Me.B_envio_68_2.Name = "B_envio_68_2"

Me.B_envio_68_2.Size = New System.Drawing.Size(88, 23)

Me.B_envio_68_2.TabIndex = 0

Me.B_envio_68_2.Text = "Leer"

'

'GroupBox16

'

Me.GroupBox16.Controls.Add(Me.Tb_cal_28)

Me.GroupBox16.Controls.Add(Me.Label83)

Me.GroupBox16.Controls.Add(Me.Tb_cal_27)

Me.GroupBox16.Controls.Add(Me.Label84)

Me.GroupBox16.Controls.Add(Me.Tb_cal_26)

Me.GroupBox16.Controls.Add(Me.Label85)

Me.GroupBox16.Controls.Add(Me.Tb_cal_25)

Me.GroupBox16.Controls.Add(Me.Label86)

Me.GroupBox16.Controls.Add(Me.Tb_cal_14)

Me.GroupBox16.Controls.Add(Me.Label87)

Me.GroupBox16.Controls.Add(Me.Tb_cal_13)

Me.GroupBox16.Controls.Add(Me.Label88)

Me.GroupBox16.Controls.Add(Me.Tb_cal_12)

Me.GroupBox16.Controls.Add(Me.Label89)

Page 113: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox16.Controls.Add(Me.Tb_cal_11)

Me.GroupBox16.Controls.Add(Me.Label90)

Me.GroupBox16.Controls.Add(Me.Tb_cal_24)

Me.GroupBox16.Controls.Add(Me.Label53)

Me.GroupBox16.Controls.Add(Me.Tb_cal_23)

Me.GroupBox16.Controls.Add(Me.Label54)

Me.GroupBox16.Controls.Add(Me.Tb_cal_22)

Me.GroupBox16.Controls.Add(Me.Label55)

Me.GroupBox16.Controls.Add(Me.Tb_cal_21)

Me.GroupBox16.Controls.Add(Me.Label56)

Me.GroupBox16.Controls.Add(Me.Tb_cal_20)

Me.GroupBox16.Controls.Add(Me.Label57)

Me.GroupBox16.Controls.Add(Me.Tb_cal_19)

Me.GroupBox16.Controls.Add(Me.Label58)

Me.GroupBox16.Controls.Add(Me.Tb_cal_18)

Me.GroupBox16.Controls.Add(Me.Label59)

Me.GroupBox16.Controls.Add(Me.Tb_cal_17)

Me.GroupBox16.Controls.Add(Me.Label60)

Me.GroupBox16.Controls.Add(Me.Tb_cal_16)

Me.GroupBox16.Controls.Add(Me.Label61)

Me.GroupBox16.Controls.Add(Me.Tb_cal_15)

Me.GroupBox16.Controls.Add(Me.Label62)

Me.GroupBox16.Controls.Add(Me.Tb_cal_10)

Me.GroupBox16.Controls.Add(Me.Label51)

Me.GroupBox16.Controls.Add(Me.Tb_cal_9)

Me.GroupBox16.Controls.Add(Me.Label52)

Me.GroupBox16.Controls.Add(Me.Tb_cal_8)

Me.GroupBox16.Controls.Add(Me.Label47)

Me.GroupBox16.Controls.Add(Me.Tb_cal_7)

Me.GroupBox16.Controls.Add(Me.Label48)

Me.GroupBox16.Controls.Add(Me.Tb_cal_6)

Me.GroupBox16.Controls.Add(Me.Label49)

Me.GroupBox16.Controls.Add(Me.Tb_cal_5)

Me.GroupBox16.Controls.Add(Me.Label50)

Me.GroupBox16.Controls.Add(Me.Tb_cal_4)

Me.GroupBox16.Controls.Add(Me.Label45)

Me.GroupBox16.Controls.Add(Me.Tb_cal_3)

Me.GroupBox16.Controls.Add(Me.Label46)

Me.GroupBox16.Controls.Add(Me.Tb_cal_2)

Me.GroupBox16.Controls.Add(Me.Label44)

Me.GroupBox16.Controls.Add(Me.Tb_cal_1)

Page 114: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox16.Controls.Add(Me.Label43)

Me.GroupBox16.Controls.Add(Me.B_envio_68_1)

Me.GroupBox16.Controls.Add(Me.B_envio_66)

Me.GroupBox16.Location = New System.Drawing.Point(16, 24)

Me.GroupBox16.Name = "GroupBox16"

Me.GroupBox16.Size = New System.Drawing.Size(216, 416)

Me.GroupBox16.TabIndex = 0

Me.GroupBox16.TabStop = False

Me.GroupBox16.Text = "Parámetros de calibración"

'

'Tb_cal_28

'

Me.Tb_cal_28.Location = New System.Drawing.Point(160, 336)

Me.Tb_cal_28.Name = "Tb_cal_28"

Me.Tb_cal_28.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_28.TabIndex = 55

Me.Tb_cal_28.Text = "0"

Me.Tb_cal_28.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label83

'

Me.Label83.Location = New System.Drawing.Point(120, 336)

Me.Label83.Name = "Label83"

Me.Label83.Size = New System.Drawing.Size(40, 16)

Me.Label83.TabIndex = 54

Me.Label83.Text = "Cal_28"

'

'Tb_cal_27

'

Me.Tb_cal_27.Location = New System.Drawing.Point(160, 312)

Me.Tb_cal_27.Name = "Tb_cal_27"

Me.Tb_cal_27.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_27.TabIndex = 53

Me.Tb_cal_27.Text = "0"

Me.Tb_cal_27.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label84

'

Me.Label84.Location = New System.Drawing.Point(120, 312)

Me.Label84.Name = "Label84"

Me.Label84.Size = New System.Drawing.Size(40, 16)

Page 115: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label84.TabIndex = 52

Me.Label84.Text = "Cal_27"

'

'Tb_cal_26

'

Me.Tb_cal_26.Location = New System.Drawing.Point(160, 288)

Me.Tb_cal_26.Name = "Tb_cal_26"

Me.Tb_cal_26.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_26.TabIndex = 51

Me.Tb_cal_26.Text = "0"

Me.Tb_cal_26.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label85

'

Me.Label85.Location = New System.Drawing.Point(120, 288)

Me.Label85.Name = "Label85"

Me.Label85.Size = New System.Drawing.Size(40, 16)

Me.Label85.TabIndex = 50

Me.Label85.Text = "Cal_26"

'

'Tb_cal_25

'

Me.Tb_cal_25.Location = New System.Drawing.Point(160, 264)

Me.Tb_cal_25.Name = "Tb_cal_25"

Me.Tb_cal_25.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_25.TabIndex = 49

Me.Tb_cal_25.Text = "0"

Me.Tb_cal_25.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label86

'

Me.Label86.Location = New System.Drawing.Point(120, 264)

Me.Label86.Name = "Label86"

Me.Label86.Size = New System.Drawing.Size(40, 16)

Me.Label86.TabIndex = 48

Me.Label86.Text = "Cal_25"

'

'Tb_cal_14

'

Me.Tb_cal_14.Location = New System.Drawing.Point(56, 336)

Me.Tb_cal_14.Name = "Tb_cal_14"

Page 116: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_cal_14.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_14.TabIndex = 47

Me.Tb_cal_14.Text = "0"

Me.Tb_cal_14.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label87

'

Me.Label87.Location = New System.Drawing.Point(16, 336)

Me.Label87.Name = "Label87"

Me.Label87.Size = New System.Drawing.Size(40, 16)

Me.Label87.TabIndex = 46

Me.Label87.Text = "Cal_14"

'

'Tb_cal_13

'

Me.Tb_cal_13.Location = New System.Drawing.Point(56, 312)

Me.Tb_cal_13.Name = "Tb_cal_13"

Me.Tb_cal_13.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_13.TabIndex = 45

Me.Tb_cal_13.Text = "0"

Me.Tb_cal_13.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label88

'

Me.Label88.Location = New System.Drawing.Point(16, 312)

Me.Label88.Name = "Label88"

Me.Label88.Size = New System.Drawing.Size(40, 16)

Me.Label88.TabIndex = 44

Me.Label88.Text = "Cal_13"

'

'Tb_cal_12

'

Me.Tb_cal_12.Location = New System.Drawing.Point(56, 288)

Me.Tb_cal_12.Name = "Tb_cal_12"

Me.Tb_cal_12.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_12.TabIndex = 43

Me.Tb_cal_12.Text = "0"

Me.Tb_cal_12.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label89

'

Page 117: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label89.Location = New System.Drawing.Point(16, 288)

Me.Label89.Name = "Label89"

Me.Label89.Size = New System.Drawing.Size(40, 16)

Me.Label89.TabIndex = 42

Me.Label89.Text = "Cal_12"

'

'Tb_cal_11

'

Me.Tb_cal_11.Location = New System.Drawing.Point(56, 264)

Me.Tb_cal_11.Name = "Tb_cal_11"

Me.Tb_cal_11.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_11.TabIndex = 41

Me.Tb_cal_11.Text = "0"

Me.Tb_cal_11.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label90

'

Me.Label90.Location = New System.Drawing.Point(16, 264)

Me.Label90.Name = "Label90"

Me.Label90.Size = New System.Drawing.Size(40, 16)

Me.Label90.TabIndex = 40

Me.Label90.Text = "Cal_11"

'

'Tb_cal_24

'

Me.Tb_cal_24.Location = New System.Drawing.Point(160, 240)

Me.Tb_cal_24.Name = "Tb_cal_24"

Me.Tb_cal_24.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_24.TabIndex = 39

Me.Tb_cal_24.Text = "0"

Me.Tb_cal_24.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label53

'

Me.Label53.Location = New System.Drawing.Point(120, 240)

Me.Label53.Name = "Label53"

Me.Label53.Size = New System.Drawing.Size(40, 16)

Me.Label53.TabIndex = 38

Me.Label53.Text = "Cal_24"

'

'Tb_cal_23

Page 118: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Tb_cal_23.Location = New System.Drawing.Point(160, 216)

Me.Tb_cal_23.Name = "Tb_cal_23"

Me.Tb_cal_23.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_23.TabIndex = 37

Me.Tb_cal_23.Text = "0"

Me.Tb_cal_23.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label54

'

Me.Label54.Location = New System.Drawing.Point(120, 216)

Me.Label54.Name = "Label54"

Me.Label54.Size = New System.Drawing.Size(40, 16)

Me.Label54.TabIndex = 36

Me.Label54.Text = "Cal_23"

'

'Tb_cal_22

'

Me.Tb_cal_22.Location = New System.Drawing.Point(160, 192)

Me.Tb_cal_22.Name = "Tb_cal_22"

Me.Tb_cal_22.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_22.TabIndex = 35

Me.Tb_cal_22.Text = "0"

Me.Tb_cal_22.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label55

'

Me.Label55.Location = New System.Drawing.Point(120, 192)

Me.Label55.Name = "Label55"

Me.Label55.Size = New System.Drawing.Size(40, 16)

Me.Label55.TabIndex = 34

Me.Label55.Text = "Cal_22"

'

'Tb_cal_21

'

Me.Tb_cal_21.Location = New System.Drawing.Point(160, 168)

Me.Tb_cal_21.Name = "Tb_cal_21"

Me.Tb_cal_21.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_21.TabIndex = 33

Me.Tb_cal_21.Text = "0"

Me.Tb_cal_21.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

Page 119: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Label56

'

Me.Label56.Location = New System.Drawing.Point(120, 168)

Me.Label56.Name = "Label56"

Me.Label56.Size = New System.Drawing.Size(40, 16)

Me.Label56.TabIndex = 32

Me.Label56.Text = "Cal_21"

'

'Tb_cal_20

'

Me.Tb_cal_20.Location = New System.Drawing.Point(160, 144)

Me.Tb_cal_20.Name = "Tb_cal_20"

Me.Tb_cal_20.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_20.TabIndex = 31

Me.Tb_cal_20.Text = "0"

Me.Tb_cal_20.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label57

'

Me.Label57.Location = New System.Drawing.Point(120, 144)

Me.Label57.Name = "Label57"

Me.Label57.Size = New System.Drawing.Size(40, 16)

Me.Label57.TabIndex = 30

Me.Label57.Text = "Cal_20"

'

'Tb_cal_19

'

Me.Tb_cal_19.Location = New System.Drawing.Point(160, 120)

Me.Tb_cal_19.Name = "Tb_cal_19"

Me.Tb_cal_19.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_19.TabIndex = 29

Me.Tb_cal_19.Text = "0"

Me.Tb_cal_19.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label58

'

Me.Label58.Location = New System.Drawing.Point(120, 120)

Me.Label58.Name = "Label58"

Me.Label58.Size = New System.Drawing.Size(40, 16)

Me.Label58.TabIndex = 28

Page 120: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label58.Text = "Cal_19"

'

'Tb_cal_18

'

Me.Tb_cal_18.Location = New System.Drawing.Point(160, 96)

Me.Tb_cal_18.Name = "Tb_cal_18"

Me.Tb_cal_18.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_18.TabIndex = 27

Me.Tb_cal_18.Text = "0"

Me.Tb_cal_18.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label59

'

Me.Label59.Location = New System.Drawing.Point(120, 96)

Me.Label59.Name = "Label59"

Me.Label59.Size = New System.Drawing.Size(40, 16)

Me.Label59.TabIndex = 26

Me.Label59.Text = "Cal_18"

'

'Tb_cal_17

'

Me.Tb_cal_17.Location = New System.Drawing.Point(160, 72)

Me.Tb_cal_17.Name = "Tb_cal_17"

Me.Tb_cal_17.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_17.TabIndex = 25

Me.Tb_cal_17.Text = "0"

Me.Tb_cal_17.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label60

'

Me.Label60.Location = New System.Drawing.Point(120, 72)

Me.Label60.Name = "Label60"

Me.Label60.Size = New System.Drawing.Size(40, 16)

Me.Label60.TabIndex = 24

Me.Label60.Text = "Cal_17"

'

'Tb_cal_16

'

Me.Tb_cal_16.Location = New System.Drawing.Point(160, 48)

Me.Tb_cal_16.Name = "Tb_cal_16"

Me.Tb_cal_16.Size = New System.Drawing.Size(40, 20)

Page 121: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_cal_16.TabIndex = 23

Me.Tb_cal_16.Text = "0"

Me.Tb_cal_16.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label61

'

Me.Label61.Location = New System.Drawing.Point(120, 48)

Me.Label61.Name = "Label61"

Me.Label61.Size = New System.Drawing.Size(40, 16)

Me.Label61.TabIndex = 22

Me.Label61.Text = "Cal_16"

'

'Tb_cal_15

'

Me.Tb_cal_15.Location = New System.Drawing.Point(160, 24)

Me.Tb_cal_15.Name = "Tb_cal_15"

Me.Tb_cal_15.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_15.TabIndex = 21

Me.Tb_cal_15.Text = "0"

Me.Tb_cal_15.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label62

'

Me.Label62.Location = New System.Drawing.Point(120, 24)

Me.Label62.Name = "Label62"

Me.Label62.Size = New System.Drawing.Size(40, 16)

Me.Label62.TabIndex = 20

Me.Label62.Text = "Cal_15"

'

'Tb_cal_10

'

Me.Tb_cal_10.Location = New System.Drawing.Point(56, 240)

Me.Tb_cal_10.Name = "Tb_cal_10"

Me.Tb_cal_10.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_10.TabIndex = 19

Me.Tb_cal_10.Text = "0"

Me.Tb_cal_10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label51

'

Me.Label51.Location = New System.Drawing.Point(16, 240)

Page 122: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Label51.Name = "Label51"

Me.Label51.Size = New System.Drawing.Size(40, 16)

Me.Label51.TabIndex = 18

Me.Label51.Text = "Cal_10"

'

'Tb_cal_9

'

Me.Tb_cal_9.Location = New System.Drawing.Point(56, 216)

Me.Tb_cal_9.Name = "Tb_cal_9"

Me.Tb_cal_9.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_9.TabIndex = 17

Me.Tb_cal_9.Text = "0"

Me.Tb_cal_9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label52

'

Me.Label52.Location = New System.Drawing.Point(16, 216)

Me.Label52.Name = "Label52"

Me.Label52.Size = New System.Drawing.Size(40, 16)

Me.Label52.TabIndex = 16

Me.Label52.Text = "Cal_9"

'

'Tb_cal_8

'

Me.Tb_cal_8.Location = New System.Drawing.Point(56, 192)

Me.Tb_cal_8.Name = "Tb_cal_8"

Me.Tb_cal_8.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_8.TabIndex = 15

Me.Tb_cal_8.Text = "0"

Me.Tb_cal_8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label47

'

Me.Label47.Location = New System.Drawing.Point(16, 192)

Me.Label47.Name = "Label47"

Me.Label47.Size = New System.Drawing.Size(40, 16)

Me.Label47.TabIndex = 14

Me.Label47.Text = "Cal_8"

'

'Tb_cal_7

'

Page 123: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Tb_cal_7.Location = New System.Drawing.Point(56, 168)

Me.Tb_cal_7.Name = "Tb_cal_7"

Me.Tb_cal_7.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_7.TabIndex = 13

Me.Tb_cal_7.Text = "0"

Me.Tb_cal_7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label48

'

Me.Label48.Location = New System.Drawing.Point(16, 168)

Me.Label48.Name = "Label48"

Me.Label48.Size = New System.Drawing.Size(40, 16)

Me.Label48.TabIndex = 12

Me.Label48.Text = "Cal_7"

'

'Tb_cal_6

'

Me.Tb_cal_6.Location = New System.Drawing.Point(56, 144)

Me.Tb_cal_6.Name = "Tb_cal_6"

Me.Tb_cal_6.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_6.TabIndex = 11

Me.Tb_cal_6.Text = "0"

Me.Tb_cal_6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label49

'

Me.Label49.Location = New System.Drawing.Point(16, 144)

Me.Label49.Name = "Label49"

Me.Label49.Size = New System.Drawing.Size(40, 16)

Me.Label49.TabIndex = 10

Me.Label49.Text = "Cal_6"

'

'Tb_cal_5

'

Me.Tb_cal_5.Location = New System.Drawing.Point(56, 120)

Me.Tb_cal_5.Name = "Tb_cal_5"

Me.Tb_cal_5.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_5.TabIndex = 9

Me.Tb_cal_5.Text = "0"

Me.Tb_cal_5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

Page 124: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Label50

'

Me.Label50.Location = New System.Drawing.Point(16, 120)

Me.Label50.Name = "Label50"

Me.Label50.Size = New System.Drawing.Size(40, 16)

Me.Label50.TabIndex = 8

Me.Label50.Text = "Cal_5"

'

'Tb_cal_4

'

Me.Tb_cal_4.Location = New System.Drawing.Point(56, 96)

Me.Tb_cal_4.Name = "Tb_cal_4"

Me.Tb_cal_4.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_4.TabIndex = 7

Me.Tb_cal_4.Text = "0"

Me.Tb_cal_4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label45

'

Me.Label45.Location = New System.Drawing.Point(16, 96)

Me.Label45.Name = "Label45"

Me.Label45.Size = New System.Drawing.Size(40, 16)

Me.Label45.TabIndex = 6

Me.Label45.Text = "Cal_4"

'

'Tb_cal_3

'

Me.Tb_cal_3.Location = New System.Drawing.Point(56, 72)

Me.Tb_cal_3.Name = "Tb_cal_3"

Me.Tb_cal_3.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_3.TabIndex = 5

Me.Tb_cal_3.Text = "0"

Me.Tb_cal_3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label46

'

Me.Label46.Location = New System.Drawing.Point(16, 72)

Me.Label46.Name = "Label46"

Me.Label46.Size = New System.Drawing.Size(40, 16)

Me.Label46.TabIndex = 4

Me.Label46.Text = "Cal_3"

Page 125: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'Tb_cal_2

'

Me.Tb_cal_2.Location = New System.Drawing.Point(56, 48)

Me.Tb_cal_2.Name = "Tb_cal_2"

Me.Tb_cal_2.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_2.TabIndex = 3

Me.Tb_cal_2.Text = "0"

Me.Tb_cal_2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label44

'

Me.Label44.Location = New System.Drawing.Point(16, 48)

Me.Label44.Name = "Label44"

Me.Label44.Size = New System.Drawing.Size(40, 16)

Me.Label44.TabIndex = 2

Me.Label44.Text = "Cal_2"

'

'Tb_cal_1

'

Me.Tb_cal_1.Location = New System.Drawing.Point(56, 24)

Me.Tb_cal_1.Name = "Tb_cal_1"

Me.Tb_cal_1.Size = New System.Drawing.Size(40, 20)

Me.Tb_cal_1.TabIndex = 1

Me.Tb_cal_1.Text = "0"

Me.Tb_cal_1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label43

'

Me.Label43.Location = New System.Drawing.Point(16, 24)

Me.Label43.Name = "Label43"

Me.Label43.Size = New System.Drawing.Size(40, 16)

Me.Label43.TabIndex = 0

Me.Label43.Text = "Cal_1"

'

'B_envio_68_1

'

Me.B_envio_68_1.Enabled = False

Me.B_envio_68_1.Location = New System.Drawing.Point(120, 376)

Me.B_envio_68_1.Name = "B_envio_68_1"

Me.B_envio_68_1.Size = New System.Drawing.Size(80, 23)

Page 126: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.B_envio_68_1.TabIndex = 7

Me.B_envio_68_1.Text = "Leer"

'

'B_envio_66

'

Me.B_envio_66.Enabled = False

Me.B_envio_66.Location = New System.Drawing.Point(16, 376)

Me.B_envio_66.Name = "B_envio_66"

Me.B_envio_66.Size = New System.Drawing.Size(80, 23)

Me.B_envio_66.TabIndex = 7

Me.B_envio_66.Text = "Enviar"

'

'TabPage3

'

Me.TabPage3.Controls.Add(Me.Lvmensajes)

Me.TabPage3.Controls.Add(Me.B_guardar_mensajes)

Me.TabPage3.Controls.Add(Me.B_borrar_mensajes)

Me.TabPage3.ForeColor = System.Drawing.Color.Coral

Me.TabPage3.Location = New System.Drawing.Point(4, 22)

Me.TabPage3.Name = "TabPage3"

Me.TabPage3.Size = New System.Drawing.Size(1010, 518)

Me.TabPage3.TabIndex = 6

Me.TabPage3.Text = "Mensajes"

'

'Lvmensajes

'

Me.Lvmensajes.Location = New System.Drawing.Point(160, 56)

Me.Lvmensajes.Name = "Lvmensajes"

Me.Lvmensajes.Size = New System.Drawing.Size(640, 344)

Me.Lvmensajes.TabIndex = 3

'

'B_guardar_mensajes

'

Me.B_guardar_mensajes.ForeColor = System.Drawing.Color.Black

Me.B_guardar_mensajes.Location = New System.Drawing.Point(248, 408)

Me.B_guardar_mensajes.Name = "B_guardar_mensajes"

Me.B_guardar_mensajes.TabIndex = 2

Me.B_guardar_mensajes.Text = "Guardar"

'

'B_borrar_mensajes

'

Page 127: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.B_borrar_mensajes.ForeColor = System.Drawing.Color.Black

Me.B_borrar_mensajes.Location = New System.Drawing.Point(168, 408)

Me.B_borrar_mensajes.Name = "B_borrar_mensajes"

Me.B_borrar_mensajes.TabIndex = 1

Me.B_borrar_mensajes.Text = "Borrar"

'

'TabPage8

'

Me.TabPage8.Controls.Add(Me.GroupBox6)

Me.TabPage8.Controls.Add(Me.GroupBox12)

Me.TabPage8.Controls.Add(Me.GroupBox11)

Me.TabPage8.Controls.Add(Me.GroupBox10)

Me.TabPage8.Controls.Add(Me.GroupBox9)

Me.TabPage8.Location = New System.Drawing.Point(4, 22)

Me.TabPage8.Name = "TabPage8"

Me.TabPage8.Size = New System.Drawing.Size(1010, 518)

Me.TabPage8.TabIndex = 11

Me.TabPage8.Text = "Conexión"

'

'GroupBox6

'

Me.GroupBox6.Controls.Add(Me.Label12)

Me.GroupBox6.Controls.Add(Me.Tb_tiempo_ranura)

Me.GroupBox6.Controls.Add(Me.Label91)

Me.GroupBox6.Controls.Add(Me.Tb_ranura_tx)

Me.GroupBox6.Location = New System.Drawing.Point(264, 16)

Me.GroupBox6.Name = "GroupBox6"

Me.GroupBox6.Size = New System.Drawing.Size(176, 88)

Me.GroupBox6.TabIndex = 9

Me.GroupBox6.TabStop = False

Me.GroupBox6.Text = "Ranuras"

'

'Label12

'

Me.Label12.Location = New System.Drawing.Point(16, 24)

Me.Label12.Name = "Label12"

Me.Label12.Size = New System.Drawing.Size(64, 16)

Me.Label12.TabIndex = 6

Me.Label12.Text = "Ranura Rx"

'

'Tb_tiempo_ranura

Page 128: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

Me.Tb_tiempo_ranura.Location = New System.Drawing.Point(88, 24)

Me.Tb_tiempo_ranura.Name = "Tb_tiempo_ranura"

Me.Tb_tiempo_ranura.Size = New System.Drawing.Size(64, 20)

Me.Tb_tiempo_ranura.TabIndex = 5

Me.Tb_tiempo_ranura.Text = CType(configurationAppSettings.GetValue("Tb_tiempo_ranura.Text", GetType(System.String)), String)

Me.Tb_tiempo_ranura.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'Label91

'

Me.Label91.Location = New System.Drawing.Point(16, 56)

Me.Label91.Name = "Label91"

Me.Label91.Size = New System.Drawing.Size(64, 16)

Me.Label91.TabIndex = 8

Me.Label91.Text = "Ranura Tx"

'

'Tb_ranura_tx

'

Me.Tb_ranura_tx.Location = New System.Drawing.Point(88, 56)

Me.Tb_ranura_tx.Name = "Tb_ranura_tx"

Me.Tb_ranura_tx.Size = New System.Drawing.Size(64, 20)

Me.Tb_ranura_tx.TabIndex = 7

Me.Tb_ranura_tx.Text = CType(configurationAppSettings.GetValue("Tb_ranura_tx.Text", GetType(System.String)), String)

Me.Tb_ranura_tx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center

'

'GroupBox12

'

Me.GroupBox12.Controls.Add(Me.Rb_par)

Me.GroupBox12.Controls.Add(Me.Rb_impar)

Me.GroupBox12.Controls.Add(Me.Rb_sinparidad)

Me.GroupBox12.Location = New System.Drawing.Point(120, 16)

Me.GroupBox12.Name = "GroupBox12"

Me.GroupBox12.Size = New System.Drawing.Size(128, 88)

Me.GroupBox12.TabIndex = 3

Me.GroupBox12.TabStop = False

Me.GroupBox12.Text = "Paridad"

'

'Rb_par

'

Me.Rb_par.Checked = CType(configurationAppSettings.GetValue("Rb_par.Checked", GetType(System.Boolean)), Boolean)

Page 129: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Rb_par.Location = New System.Drawing.Point(8, 40)

Me.Rb_par.Name = "Rb_par"

Me.Rb_par.TabIndex = 2

Me.Rb_par.Text = "Par"

'

'Rb_impar

'

Me.Rb_impar.Checked = CType(configurationAppSettings.GetValue("Rb_impar.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_impar.Location = New System.Drawing.Point(8, 64)

Me.Rb_impar.Name = "Rb_impar"

Me.Rb_impar.Size = New System.Drawing.Size(104, 16)

Me.Rb_impar.TabIndex = 1

Me.Rb_impar.Text = "Impar"

'

'Rb_sinparidad

'

Me.Rb_sinparidad.Checked = CType(configurationAppSettings.GetValue("Rb_sinparidad.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_sinparidad.Location = New System.Drawing.Point(8, 16)

Me.Rb_sinparidad.Name = "Rb_sinparidad"

Me.Rb_sinparidad.TabIndex = 0

Me.Rb_sinparidad.TabStop = True

Me.Rb_sinparidad.Text = "Sin paridad"

'

'GroupBox11

'

Me.GroupBox11.Controls.Add(Me.Rb_2)

Me.GroupBox11.Controls.Add(Me.Rb_1)

Me.GroupBox11.Controls.Add(Me.Rb_3)

Me.GroupBox11.Location = New System.Drawing.Point(120, 120)

Me.GroupBox11.Name = "GroupBox11"

Me.GroupBox11.Size = New System.Drawing.Size(128, 100)

Me.GroupBox11.TabIndex = 2

Me.GroupBox11.TabStop = False

Me.GroupBox11.Text = "Bits de stop"

'

'Rb_2

'

Me.Rb_2.Checked = CType(configurationAppSettings.GetValue("Rb_2.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_2.Location = New System.Drawing.Point(8, 40)

Me.Rb_2.Name = "Rb_2"

Page 130: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Rb_2.Size = New System.Drawing.Size(96, 24)

Me.Rb_2.TabIndex = 1

Me.Rb_2.Text = "2 bits de stop"

'

'Rb_1

'

Me.Rb_1.Checked = CType(configurationAppSettings.GetValue("Rb_1.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_1.Location = New System.Drawing.Point(8, 16)

Me.Rb_1.Name = "Rb_1"

Me.Rb_1.Size = New System.Drawing.Size(96, 24)

Me.Rb_1.TabIndex = 0

Me.Rb_1.TabStop = True

Me.Rb_1.Text = "1 bit de stop"

'

'Rb_3

'

Me.Rb_3.Checked = CType(configurationAppSettings.GetValue("Rb_3.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_3.Location = New System.Drawing.Point(8, 64)

Me.Rb_3.Name = "Rb_3"

Me.Rb_3.Size = New System.Drawing.Size(96, 24)

Me.Rb_3.TabIndex = 2

Me.Rb_3.Text = "3 bits de stop"

'

'GroupBox10

'

Me.GroupBox10.Controls.Add(Me.Rb_com_2)

Me.GroupBox10.Controls.Add(Me.Rb_com_1)

Me.GroupBox10.Location = New System.Drawing.Point(8, 16)

Me.GroupBox10.Name = "GroupBox10"

Me.GroupBox10.Size = New System.Drawing.Size(88, 88)

Me.GroupBox10.TabIndex = 1

Me.GroupBox10.TabStop = False

Me.GroupBox10.Text = "Puerto"

'

'Rb_com_2

'

Me.Rb_com_2.Checked = CType(configurationAppSettings.GetValue("Rb_com_2.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_com_2.Location = New System.Drawing.Point(8, 48)

Me.Rb_com_2.Name = "Rb_com_2"

Me.Rb_com_2.Size = New System.Drawing.Size(72, 24)

Page 131: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Rb_com_2.TabIndex = 1

Me.Rb_com_2.Text = "COM &2"

'

'Rb_com_1

'

Me.Rb_com_1.Checked = CType(configurationAppSettings.GetValue("Rb_com_1.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_com_1.Location = New System.Drawing.Point(8, 16)

Me.Rb_com_1.Name = "Rb_com_1"

Me.Rb_com_1.Size = New System.Drawing.Size(72, 24)

Me.Rb_com_1.TabIndex = 0

Me.Rb_com_1.TabStop = True

Me.Rb_com_1.Text = "COM &1"

'

'GroupBox9

'

Me.GroupBox9.Controls.Add(Me.Rb_4800)

Me.GroupBox9.Controls.Add(Me.Rb_38400)

Me.GroupBox9.Controls.Add(Me.Rb_9600)

Me.GroupBox9.Controls.Add(Me.Rb_57600)

Me.GroupBox9.Controls.Add(Me.Rb_115200)

Me.GroupBox9.Location = New System.Drawing.Point(8, 120)

Me.GroupBox9.Name = "GroupBox9"

Me.GroupBox9.Size = New System.Drawing.Size(88, 144)

Me.GroupBox9.TabIndex = 0

Me.GroupBox9.TabStop = False

Me.GroupBox9.Text = "Velocidad"

'

'Rb_4800

'

Me.Rb_4800.Checked = CType(configurationAppSettings.GetValue("Rb_4800.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_4800.Location = New System.Drawing.Point(8, 16)

Me.Rb_4800.Name = "Rb_4800"

Me.Rb_4800.Size = New System.Drawing.Size(48, 24)

Me.Rb_4800.TabIndex = 5

Me.Rb_4800.Text = "4800"

'

'Rb_38400

'

Me.Rb_38400.Checked = CType(configurationAppSettings.GetValue("Rb_38400.Checked", GetType(System.Boolean)), Boolean)

Page 132: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Rb_38400.Location = New System.Drawing.Point(8, 64)

Me.Rb_38400.Name = "Rb_38400"

Me.Rb_38400.Size = New System.Drawing.Size(56, 24)

Me.Rb_38400.TabIndex = 3

Me.Rb_38400.TabStop = True

Me.Rb_38400.Text = "38400"

'

'Rb_9600

'

Me.Rb_9600.Checked = CType(configurationAppSettings.GetValue("Rb_9600.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_9600.Location = New System.Drawing.Point(8, 40)

Me.Rb_9600.Name = "Rb_9600"

Me.Rb_9600.Size = New System.Drawing.Size(48, 24)

Me.Rb_9600.TabIndex = 2

Me.Rb_9600.Text = "9600"

'

'Rb_57600

'

Me.Rb_57600.Checked = CType(configurationAppSettings.GetValue("Rb_57600.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_57600.Location = New System.Drawing.Point(8, 88)

Me.Rb_57600.Name = "Rb_57600"

Me.Rb_57600.Size = New System.Drawing.Size(64, 24)

Me.Rb_57600.TabIndex = 4

Me.Rb_57600.Text = "57600"

'

'Rb_115200

'

Me.Rb_115200.Checked = CType(configurationAppSettings.GetValue("Rb_115200.Checked", GetType(System.Boolean)), Boolean)

Me.Rb_115200.Location = New System.Drawing.Point(8, 112)

Me.Rb_115200.Name = "Rb_115200"

Me.Rb_115200.Size = New System.Drawing.Size(64, 24)

Me.Rb_115200.TabIndex = 1

Me.Rb_115200.Text = "115200"

'

'Bsalir

'

Me.Bsalir.Location = New System.Drawing.Point(936, 632)

Me.Bsalir.Name = "Bsalir"

Me.Bsalir.TabIndex = 3

Page 133: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Bsalir.Text = "Salir"

'

'StatusBar2

'

Me.StatusBar2.Location = New System.Drawing.Point(0, 682)

Me.StatusBar2.Name = "StatusBar2"

Me.StatusBar2.Size = New System.Drawing.Size(1018, 22)

Me.StatusBar2.TabIndex = 5

Me.StatusBar2.Text = "Sin conexion"

'

'StatusBar1

'

Me.StatusBar1.Location = New System.Drawing.Point(0, 660)

Me.StatusBar1.Name = "StatusBar1"

Me.StatusBar1.Size = New System.Drawing.Size(1018, 22)

Me.StatusBar1.TabIndex = 6

'

'Bconexion

'

Me.Bconexion.ForeColor = System.Drawing.Color.Red

Me.Bconexion.Location = New System.Drawing.Point(936, 560)

Me.Bconexion.Name = "Bconexion"

Me.Bconexion.TabIndex = 1

Me.Bconexion.Text = "Conectar"

'

'Timer1

'

'

'GroupBox13

'

Me.GroupBox13.Location = New System.Drawing.Point(16, 248)

Me.GroupBox13.Name = "GroupBox13"

Me.GroupBox13.TabIndex = 0

Me.GroupBox13.TabStop = False

'

'Timer2

'

Me.Timer2.Interval = 30000

'

'GroupBox7

'

Page 134: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.GroupBox7.Controls.Add(Me.B_rearme)

Me.GroupBox7.Controls.Add(Me.B_parada)

Me.GroupBox7.Controls.Add(Me.B_marcha)

Me.GroupBox7.Location = New System.Drawing.Point(8, 592)

Me.GroupBox7.Name = "GroupBox7"

Me.GroupBox7.Size = New System.Drawing.Size(272, 56)

Me.GroupBox7.TabIndex = 4

Me.GroupBox7.TabStop = False

Me.GroupBox7.Text = "Comandos maniobra"

'

'B_rearme

'

Me.B_rearme.Enabled = False

Me.B_rearme.Location = New System.Drawing.Point(184, 24)

Me.B_rearme.Name = "B_rearme"

Me.B_rearme.TabIndex = 2

Me.B_rearme.Text = "Rearme"

'

'B_parada

'

Me.B_parada.Enabled = False

Me.B_parada.Location = New System.Drawing.Point(96, 24)

Me.B_parada.Name = "B_parada"

Me.B_parada.TabIndex = 1

Me.B_parada.Text = "Parada"

'

'B_marcha

'

Me.B_marcha.Enabled = False

Me.B_marcha.Location = New System.Drawing.Point(8, 24)

Me.B_marcha.Name = "B_marcha"

Me.B_marcha.TabIndex = 0

Me.B_marcha.Text = "Marcha"

'

'Timer3

'

'

'Lb_comunicacion

'

Me.Lb_comunicacion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle

Me.Lb_comunicacion.ForeColor = System.Drawing.Color.Red

Page 135: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Me.Lb_comunicacion.Location = New System.Drawing.Point(888, 592)

Me.Lb_comunicacion.Name = "Lb_comunicacion"

Me.Lb_comunicacion.Size = New System.Drawing.Size(120, 16)

Me.Lb_comunicacion.TabIndex = 8

Me.Lb_comunicacion.Text = "Comunicación inactiva"

Me.Lb_comunicacion.TextAlign = System.Drawing.ContentAlignment.MiddleRight

'

'Form1

'

Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)

Me.ClientSize = New System.Drawing.Size(1018, 704)

Me.Controls.Add(Me.Lb_comunicacion)

Me.Controls.Add(Me.Bconexion)

Me.Controls.Add(Me.StatusBar1)

Me.Controls.Add(Me.StatusBar2)

Me.Controls.Add(Me.Bsalir)

Me.Controls.Add(Me.TabControl1)

Me.Controls.Add(Me.GroupBox7)

Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle

Me.Name = "Form1"

Me.Text = "DSP_Monitor"

Me.TabControl1.ResumeLayout(False)

Me.TabPage5.ResumeLayout(False)

Me.TabPage1.ResumeLayout(False)

Me.GroupBox15.ResumeLayout(False)

Me.GroupBox14.ResumeLayout(False)

Me.Idc.ResumeLayout(False)

Me.GroupBox4.ResumeLayout(False)

Me.GroupBox3.ResumeLayout(False)

Me.GroupBox2.ResumeLayout(False)

Me.GroupBox1.ResumeLayout(False)

Me.TabPage4.ResumeLayout(False)

Me.GroupBox18.ResumeLayout(False)

CType(Me.Legend4, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.Legend3, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.Legend2, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.Legend1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.grafica_3, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_3_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_3_2, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.grafica_2, System.ComponentModel.ISupportInitialize).EndInit()

Page 136: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

CType(Me.XyCursor_graf_2_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_2_2, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.grafica_4, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_4_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_4_2, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.grafica_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_1_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_graf_1_2, System.ComponentModel.ISupportInitialize).EndInit()

Me.TabPage7.ResumeLayout(False)

CType(Me.Legend5, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.Osciloscopio, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_osc_1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.XyCursor_osc_2, System.ComponentModel.ISupportInitialize).EndInit()

Me.TabPage2.ResumeLayout(False)

Me.GroupBox5.ResumeLayout(False)

Me.TabPage9.ResumeLayout(False)

Me.GroupBox17.ResumeLayout(False)

Me.GroupBox16.ResumeLayout(False)

Me.TabPage3.ResumeLayout(False)

Me.TabPage8.ResumeLayout(False)

Me.GroupBox6.ResumeLayout(False)

Me.GroupBox12.ResumeLayout(False)

Me.GroupBox11.ResumeLayout(False)

Me.GroupBox10.ResumeLayout(False)

Me.GroupBox9.ResumeLayout(False)

Me.GroupBox7.ResumeLayout(False)

Me.ResumeLayout(False)

End Sub

#End Region

Private Sub mors232_commevent(ByVal source As Rs232, ByVal mask As Rs232.EventMasks) Handles moRs232.CommEvent

'========================================================================================================================

' Descripción: Guarda los datos que llegan por el puerto serie en el vector 'trama'

' Creación: 23 / 07 / 2005

'

' Notas: Modificación de la rutina de Corrado Cavalli

'========================================================================================================================

If flag_recepcion = True Then

Page 137: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Debug.Assert(Me.InvokeRequired = False)

Dim ipnt As Int32, sbuf As String, buffer() As Byte

Debug.Assert(Me.InvokeRequired = False)

'Lbbytes.Items.Add("Mask: " & mask.ToString)

If (mask And Rs232.EventMasks.RxChar) > 0 Then

'Para el contador de espera

Timer1.Enabled = False

'Recoje del bufer el último bloque recibido

trama_aux = source.InputStream

'Junta el bloque recogido con los que llegaron antes

For ipnt = 0 To trama_aux.Length - 1

trama(indice_trama) = trama_aux(ipnt)

indice_trama += 1

Next

'Inicia el contador de espera

Timer1.Enabled = True

End If

End If

End Sub

Public Sub abre_tabla_mensajes()

'========================================================================================================================

' Descripción: Abre la base de datos donde se guardaran el list view de la pestaña "Mensajes"

'

' Creación: 21 / 02 / 2006

'========================================================================================================================

'Abre el cuadro de diálogo

'With OpenFileDialog1

'.Title = "Seleccionar base de datos"

'.Filter = "Bases de Access (*.mdb)|*.mdb"

'If .ShowDialog = DialogResult.OK Then

's_base_mensajes = .FileName

Page 138: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'End If

'End With

'Dim sIni As String = Application.StartupPath & "\prueba.cfg"

s_base_mensajes = Application.StartupPath & "\mensajes.mdb"

's_base_mensajes = "C:\Documents and Settings\Alberto\Escritorio\Proyecto (22 febrero 2006)\mensajes.mdb"

CadenaConexion = "SELECT * FROM " & s_tabla_mensajes

'Abre la tabla

With Lvmensajes

.View = View.Details

.FullRowSelect = True

.GridLines = True

.LabelEdit = False

.HideSelection = False

.Columns.Clear()

End With

'Vuelve a reconectar para actualizar los datos desde la base

If Not dbConnection Is Nothing Then

dbConnection.Close()

End If

Conectar(s_base_mensajes, CadenaConexion)

'Llena la lista con los elementos de la tabla

AsignarCabeceraLista(Lvmensajes)

LLenarLista(Lvmensajes)

'Prepara las variables necesarias para modificar la tabla

datasource = s_tabla_mensajes

commandstring = CadenaConexion

'Establece valores por defecto

If datasource = "" Then

datasource = "c:\mensajes.mdb"

End If

If commandstring = "" Then

commandstring = "SELECT * FROM Table1"

End If

Page 139: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

If dbConnection Is Nothing Then

Conectar(datasource, commandstring)

End If

'Presenta tabla en el ListView

AsignarCabeceraLista(Lvmensajes)

LLenarLista(Lvmensajes)

actualiza_form()

End Sub

Public Sub envia_trama(ByVal tipo_trama1 As Integer, ByVal tipo_trama2 As Integer)

'=========================================================================================================================

' Descripción: Genera la trama del tipo que se le pasa como parámetro y la envía

'

' Creación: 18 / 12 / 2005

'=========================================================================================================================

Try

stipo = tipo_trama1

'Redimensiona el tamaño del array que contendrá la trama a enviar

Select Case tipo_trama1

Case 1

tamaño_trama = 6

Case 8

tamaño_trama = 6

Case 66

tamaño_trama = 60

Case 67

tamaño_trama = 44

Case 68

tamaño_trama = 6

Case 128

tamaño_trama = 24

End Select

ReDim array_trama(tamaño_trama - 1)

'Genera trama a enviar

genera_trama(tipo_trama1, tipo_trama2)

Page 140: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Envia trama generada

moRs232.PurgeBuffer(Rs232.PurgeBuffers.TxClear Or Rs232.PurgeBuffers.RXClear)

moRs232.Write(array_trama)

'Cambia el mensaje de la barra de estado

sb1string = "Trama tipo " & stipo & " generada y enviada"

Catch

'Si no se envía la trama, informa al usuario con un mensaje

MessageBox.Show("No se pudo completar la peticion de envio de trama")

End Try

End Sub

Public Sub vacia_cola()

'=========================================================================================================================

' Descripción: Envía la ultima trama introducida en la cola de transmisión

'

' Creación: 18 / 12 / 2005

'=========================================================================================================================

tipo_trama1 = cola_txon(n_tramas_cola - 1, 0)

tipo_trama2 = cola_txon(n_tramas_cola - 1, 1)

envia_trama(tipo_trama1, tipo_trama2)

n_tramas_cola -= 1

End Sub

Private Sub envio_1()

'=========================================================================================================================

' Descripción: Manda a la cola de transmisión la orden de envío de una trama tipo 1

'

' Creación: 20 / 12 / 2005

'=========================================================================================================================

'Si la cola de transmisión no está llena almacena la orden de envío

If n_tramas_cola <> 2 Then

cola_txon(n_tramas_cola, 0) = 1

Page 141: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 1: demasiadas tramas en el buffer"

End If

End Sub

Private Sub SetRange(ByVal scale As Scale, ByVal caption As String)

'========================================================================================================================

' Descripción: Establece el rango del eje que se le pase como parámetro

'

' Creación: 22 / 02/ 2006

'

' Nota: Procedimiento de los ejemplos del paquete Measurement Studio

'========================================================================================================================

Dim dlg As RangeEditorDlg = New RangeEditorDlg(scale.Range.Minimum, scale.Range.Maximum)

dlg.Text = caption

Dim result As DialogResult = dlg.ShowDialog()

If Not result = DialogResult.Cancel Then

Try

scale.Range = New Range(dlg.Minimum, dlg.Maximum)

Catch ex As Exception

MessageBox.Show("The Range.Minimum was greater than the Range.Maximum", "Range Error")

End Try

End If

End Sub

Public Sub actualiza_form()

'========================================================================================================================

' Descripción: Actualiza los datos del formulario

'

' Creación: 18 / 07/ 2005

'========================================================================================================================

'Cambia el estado del Check Box cbautomatico si la variable automatico ha cambiado

If flag_act_automatico = True Then

If automatico = False Then

Page 142: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

cbautomatico.Checked = False

End If

flag_act_automatico = False

End If

'Actualiza el label de comunicación con el DSP en función del estado de ésta

If flag_act_comunicacion = True Then

If flag_comunicacion = True Then

Lb_comunicacion.ForeColor = Green

Lb_comunicacion.Text = "Comunicación activa"

Else

Lb_comunicacion.ForeColor = Red

Lb_comunicacion.Text = "Comunicación inactiva"

End If

flag_act_comunicacion = False

End If

'Actualiza pestaña Medidas

If flag_act_medidas = True Then

Tbidc1.Text = arraydoublemedidasrx(0)

Tbidc2.Text = arraydoublemedidasrx(1)

Tbidc3.Text = arraydoublemedidasrx(2)

Tbidc4.Text = arraydoublemedidasrx(3)

Tbidc5.Text = arraydoublemedidasrx(4)

Tbia.Text = arraydoublemedidasrx(9)

Tbib.Text = arraydoublemedidasrx(10)

tbic.Text = arraydoublemedidasrx(11)

tbva.Text = arraydoublemedidasrx(12)

tbvb.Text = arraydoublemedidasrx(13)

tbvc.Text = arraydoublemedidasrx(14)

tbvc1.Text = arraydoublemedidasrx(5)

tbvc2.Text = arraydoublemedidasrx(6)

tbvc3.Text = arraydoublemedidasrx(7)

tbvc4.Text = arraydoublemedidasrx(8)

tbp.Text = arraydoublemedidasrx(15)

tbq.Text = arraydoublemedidasrx(16)

tbfactor.Text = arraydoublemedidasrx(17)

Tbmr1.Text = arraydoublemedidasrx(18)

Tbmr2.Text = arraydoublemedidasrx(19)

Tbmr3.Text = arraydoublemedidasrx(20)

Tbmr4.Text = arraydoublemedidasrx(21)

Page 143: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Tbmr5.Text = arraydoublemedidasrx(22)

Tbmr6.Text = arraydoublemedidasrx(23)

Tbmr7.Text = arraydoublemedidasrx(24)

Tbmr8.Text = arraydoublemedidasrx(25)

Tbml1.Text = arraydouble_medidas_lentas(0)

Tbml2.Text = arraydouble_medidas_lentas(1)

Tbml3.Text = arraydouble_medidas_lentas(2)

Tbml4.Text = arraydouble_medidas_lentas(3)

Tbml5.Text = arraydouble_medidas_lentas(4)

Tbml6.Text = arraydouble_medidas_lentas(5)

Tbml7.Text = arraydouble_medidas_lentas(6)

Tbml8.Text = arraydouble_medidas_lentas(7)

flag_act_medidas = False

End If

'Actualiza pestaña Parametros calibración

If flag_act_par_cal = True Then

Tb_cal_1.Text = d_vect_par_cal(0)

Tb_cal_2.Text = d_vect_par_cal(1)

Tb_cal_3.Text = d_vect_par_cal(2)

Tb_cal_4.Text = d_vect_par_cal(3)

Tb_cal_5.Text = d_vect_par_cal(4)

Tb_cal_6.Text = d_vect_par_cal(5)

Tb_cal_7.Text = d_vect_par_cal(6)

Tb_cal_8.Text = d_vect_par_cal(7)

Tb_cal_9.Text = d_vect_par_cal(8)

Tb_cal_10.Text = d_vect_par_cal(9)

Tb_cal_11.Text = d_vect_par_cal(10)

Tb_cal_12.Text = d_vect_par_cal(11)

Tb_cal_13.Text = d_vect_par_cal(12)

Tb_cal_14.Text = d_vect_par_cal(13)

Tb_cal_15.Text = d_vect_par_cal(14)

Tb_cal_16.Text = d_vect_par_cal(15)

Tb_cal_17.Text = d_vect_par_cal(16)

Tb_cal_18.Text = d_vect_par_cal(17)

Tb_cal_19.Text = d_vect_par_cal(18)

Tb_cal_20.Text = d_vect_par_cal(19)

Page 144: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Tb_cal_21.Text = d_vect_par_cal(20)

Tb_cal_22.Text = d_vect_par_cal(21)

Tb_cal_23.Text = d_vect_par_cal(22)

Tb_cal_24.Text = d_vect_par_cal(23)

Tb_cal_25.Text = d_vect_par_cal(24)

Tb_cal_26.Text = d_vect_par_cal(25)

Tb_cal_27.Text = d_vect_par_cal(26)

Tb_cal_28.Text = d_vect_par_cal(27)

Tb_par_1.Text = d_vect_otros_par(0)

Tb_par_2.Text = d_vect_otros_par(1)

Tb_par_3.Text = d_vect_otros_par(2)

Tb_par_4.Text = d_vect_otros_par(3)

Tb_par_5.Text = d_vect_otros_par(4)

Tb_par_6.Text = d_vect_otros_par(5)

Tb_par_7.Text = d_vect_otros_par(6)

Tb_par_8.Text = d_vect_otros_par(7)

Tb_par_9.Text = d_vect_otros_par(8)

Tb_par_10.Text = d_vect_otros_par(9)

Tb_par_11.Text = d_vect_otros_par(10)

Tb_par_12.Text = d_vect_otros_par(11)

Tb_par_13.Text = d_vect_otros_par(12)

Tb_par_14.Text = d_vect_otros_par(13)

Tb_par_15.Text = d_vect_otros_par(14)

Tb_par_16.Text = d_vect_otros_par(15)

Tb_par_17.Text = d_vect_otros_par(16)

Tb_par_18.Text = d_vect_otros_par(17)

Tb_par_19.Text = d_vect_otros_par(18)

Tb_par_20.Text = d_vect_otros_par(19)

flag_act_par_cal = False

End If

'Actualiza barras de estado

StatusBar1.Text = sb1string

StatusBar2.Text = sb2string

'Activa/desactiva botones y comboboxes

If flag_act_conexion = True Then

B_envio_128.Enabled = conexion_on

Page 145: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

B_marcha.Enabled = conexion_on

B_parada.Enabled = conexion_on

B_rearme.Enabled = conexion_on

B_envio_66.Enabled = conexion_on

B_envio_67.Enabled = conexion_on

B_envio_68_1.Enabled = conexion_on

B_envio_68_2.Enabled = conexion_on

Rb_com_1.Enabled = Not conexion_on

Rb_com_2.Enabled = Not conexion_on

'Rb_600.Enabled = Not conexion_on

Rb_115200.Enabled = Not conexion_on

Rb_57600.Enabled = Not conexion_on

Rb_4800.Enabled = Not conexion_on

Rb_9600.Enabled = Not conexion_on

'Rb_19200.Enabled = Not conexion_on

Rb_38400.Enabled = Not conexion_on

Rb_sinparidad.Enabled = Not conexion_on

Rb_par.Enabled = Not conexion_on

Rb_impar.Enabled = Not conexion_on

Rb_1.Enabled = Not conexion_on

Rb_2.Enabled = Not conexion_on

Rb_3.Enabled = Not conexion_on

Tb_tiempo_ranura.Enabled = Not conexion_on

Tb_ranura_tx.Enabled = Not conexion_on

flag_act_conexion = False

End If

'Actualiza los flags de Estado y Alarmas (leds y labels)

If flag_act_alarmas = True Then

Lflag1.BackColor = IIf(flag1 = True, Red, Green)

lflag2.BackColor = IIf(flag2 = True, Red, Green)

lflag3.BackColor = IIf(flag3 = True, Red, Green)

lflag4.BackColor = IIf(flag4 = True, Red, Green)

lflag5.BackColor = IIf(flag5 = True, Red, Green)

lflag6.BackColor = IIf(flag6 = True, Red, Green)

lflag7.BackColor = IIf(flag7 = True, Red, Green)

lflag8.BackColor = IIf(flag8 = True, Red, Green)

Page 146: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

lflag9.BackColor = IIf(flag9 = True, Red, Green)

lflag10.BackColor = IIf(flag10 = True, Red, Green)

lflag11.BackColor = IIf(flag11 = True, Red, Green)

lflag12.BackColor = IIf(flag12 = True, Red, Green)

lflag13.BackColor = IIf(flag13 = True, Red, Green)

lflag14.BackColor = IIf(flag14 = True, Red, Green)

lflag15.BackColor = IIf(flag15 = True, Red, Green)

lflag16.BackColor = IIf(flag16 = True, Red, Green)

flag_act_alarmas = False

End If

'Actualiza flags de estado del convertidor

If flag_act_estado_conv = True Then

L_reposo.BackColor = IIf(flag_estado_con(0) = True, Yellow, Grey)

L_precarga.BackColor = IIf(flag_estado_con(1) = True, Yellow, Grey)

L_control.BackColor = IIf(flag_estado_con(2) = True, Yellow, Grey)

L_error.BackColor = IIf(flag_estado_con(3) = True, Yellow, Grey)

flag_act_estado_conv = False

End If

'Actualiza gráfica de la pestaña Osciloscopio

If flag_act_osciloscopio = True Then

'Representa gráficamente los datos

Osciloscopio.PlotYMultiple(var_osc)

'Actualiza la leyenda

LegendItem16.Text = s_osc_var(0)

LegendItem17.Text = s_osc_var(1)

LegendItem18.Text = s_osc_var(2)

LegendItem19.Text = s_osc_var(3)

LegendItem20.Text = s_osc_var(4)

LegendItem21.Text = s_osc_var(5)

'Actualiza los Combo Boxes

Cb_osciloscopio_var_1.Text = s_osc_var(0)

Cb_osciloscopio_var_2.Text = s_osc_var(1)

Cb_osciloscopio_var_3.Text = s_osc_var(2)

Cb_osciloscopio_var_4.Text = s_osc_var(3)

Cb_osciloscopio_var_5.Text = s_osc_var(4)

Page 147: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Cb_osciloscopio_var_6.Text = s_osc_var(5)

flag_act_osciloscopio = False

End If

'Actualiza las gráficas de la pestaña Histórico de medidas

If flag_act_historico = True Then

'Representa gráficamente los datos

grafica_1.PlotYMultiple(d_grafica_1)

grafica_2.PlotYMultiple(d_grafica_2)

grafica_3.PlotYMultiple(d_grafica_3)

grafica_4.PlotYMultiple(d_grafica_4)

'Actualiza las leyendas

LegendItem1.Text = s_graf_1_var(0)

LegendItem2.Text = s_graf_1_var(1)

LegendItem3.Text = s_graf_1_var(2)

LegendItem7.Text = s_graf_2_var(0)

LegendItem9.Text = s_graf_2_var(1)

LegendItem10.Text = s_graf_2_var(2)

LegendItem4.Text = s_graf_3_var(0)

LegendItem5.Text = s_graf_3_var(1)

LegendItem6.Text = s_graf_3_var(2)

LegendItem8.Text = s_graf_4_var(0)

LegendItem12.Text = s_graf_4_var(1)

LegendItem11.Text = s_graf_4_var(2)

'Actualiza los Combo Boxes

Cb11.Text = s_graf_1_var(0)

cb12.Text = s_graf_1_var(1)

Cb13.Text = s_graf_1_var(2)

Cb21.Text = s_graf_2_var(0)

Cb22.Text = s_graf_2_var(1)

Cb23.Text = s_graf_2_var(2)

Cb31.Text = s_graf_3_var(0)

Cb32.Text = s_graf_3_var(1)

Cb33.Text = s_graf_3_var(2)

Cb41.Text = s_graf_4_var(0)

cb42.Text = s_graf_4_var(1)

Cb43.Text = s_graf_4_var(2)

Page 148: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

flag_act_historico = False

End If

'Actualiza botones para la manipulación de la tabla

If flag_act_tabla = True Then

Bnuevoitem.Enabled = boolbnuevoitem

Basignar.Enabled = boolbasignar

Beliminaritem.Enabled = boolbeliminaritem

Bguardarbase.Enabled = boolbguardarbase

breleertabla.Enabled = boolbreleertabla

tbvalor.Enabled = booltbvalor

cbautomatico.Enabled = boolcbautomatico

cbcampo.Enabled = boolcbcampo

flag_act_tabla = False

End If

'Actualiza pestaña 'Mensajes'

If smensaje <> "" Then

'Prepara la fecha y hora actual

momentoactual = Now

fechaactual = momentoactual.Today

tiempoactual = momentoactual.Hour & ":"

If momentoactual.Minute < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Minute & ":"

If momentoactual.Second < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Second

'Introduce los nuevos datos en la tabla

Crea_fila(Bnuevoitem, e, Lvmensajes)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

Page 149: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

dato = smensaje

Escribe_campo(Basignar, e, dato, columna)

smensaje = ""

End If

End Sub

Public Sub elige_fichero_guardar(ByVal numero As String)

'Permite seleccionar por el usuario la hoja a abrir

If numero = 0 Then

With SaveFileDialog1

.Title = "Guardar parámetros como"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

Else

With SaveFileDialog1

.Title = "Guardar gráfica " & numero & " como"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

End If

End Sub

Public Sub elige_fichero_abrir(ByVal numero As String)

'Guarda en s_hoja la hoja con los datos seleccionada por el usuario

If numero = 0 Then

With OpenFileDialog1

.Title = "Importar parámetros de"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

Page 150: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Else

With OpenFileDialog1

.Title = "Importar gráfica " & numero & " como"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

End If

End Sub

'/================================================================

'/================================================================

'/

'/ Funciones asociadas a los objetos del programa

'/

'/================================================================

'/================================================================

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Carga ultima configuración de la ventana

Me.Left = CInt(cfgGetValue("configuration/appSettings", "Form1.Left", Me.Left.ToString))

Me.Top = CInt(cfgGetValue("configuration/appSettings", "Form1.Top", Me.Top.ToString))

'Prepara conexión con la base de datos

ArchivoDatos = tbbase.Text

CadenaConexion = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & ArchivoDatos

With Lvtabla

.View = View.Details

.FullRowSelect = True

.GridLines = True

.LabelEdit = False

End With

cbtablas.Text = ""

'Carga la ultima configuración de la pestaña Osciloscopio

Cb_osciloscopio_var_1_SelectedIndexChanged(Cb_osciloscopio_var_1, e)

Cb_osciloscopio_var_2_SelectedIndexChanged(Cb_osciloscopio_var_2, e)

Cb_osciloscopio_var_3_SelectedIndexChanged(Cb_osciloscopio_var_3, e)

Cb_osciloscopio_var_4_SelectedIndexChanged(Cb_osciloscopio_var_4, e)

Page 151: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Cb_osciloscopio_var_5_SelectedIndexChanged(Cb_osciloscopio_var_5, e)

Cb_osciloscopio_var_6_SelectedIndexChanged(Cb_osciloscopio_var_6, e)

Cb_osciloscopio_var_t_SelectedIndexChanged(Cb_osciloscopio_var_t, e)

Cb_osciloscopio_canal_SelectedIndexChanged(Cb_osciloscopio_canal, e)

Cb_osciloscopio_flanco_SelectedIndexChanged(Cb_osciloscopio_flanco, e)

'Abre tabla para los mensajes

abre_tabla_mensajes()

'Escribe un mensaje en la pestaña Mensajes

smensaje = "Inicio de la aplicación"

actualiza_form()

End Sub

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing

' Guarda configuración del tab Tabla

cfgSetValue("configuration/appSettings", "Tbintervalo.Text", Me.Tbintervalo.Text)

cfgSetValue("configuration/appSettings", "cbautomatico.Checked", Me.cbautomatico.Checked.ToString)

cfgSetValue("configuration/appSettings", "tbbase.Text", Me.tbbase.Text)

'Guarda la posición de la ventana

If Me.WindowState = FormWindowState.Normal Then

cfgSetValue("configuration/appSettings", "Form1.Left", Me.Left.ToString)

cfgSetValue("configuration/appSettings", "Form1.Top", Me.Top.ToString)

End If

'Guarda configuración de la conexión

cfgSetValue("configuration/appSettings", "Rb_com_1.Checked", Me.Rb_com_1.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_com_2.Checked", Me.Rb_com_2.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_115200.Checked", Me.Rb_115200.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_57600.Checked", Me.Rb_57600.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_4800.Checked", Me.Rb_4800.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_9600.Checked", Me.Rb_9600.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_38400.Checked", Me.Rb_38400.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_sinparidad.Checked", Me.Rb_sinparidad.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_par.Checked", Me.Rb_par.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_impar.Checked", Me.Rb_impar.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_1.Checked", Me.Rb_1.Checked.ToString)

cfgSetValue("configuration/appSettings", "Rb_2.Checked", Me.Rb_2.Checked.ToString)

Page 152: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

cfgSetValue("configuration/appSettings", "Rb_3.Checked", Me.Rb_3.Checked.ToString)

cfgSetValue("configuration/appSettings", "Tb_tiempo_ranura.Text", Me.Tb_tiempo_ranura.Text)

cfgSetValue("configuration/appSettings", "Tb_ranura_tx.Text", Me.Tb_ranura_tx.Text)

'Guarda configuración de la pestaña Osciloscopio

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_1.Text", Me.Cb_osciloscopio_var_1.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_2.Text", Me.Cb_osciloscopio_var_2.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_3.Text", Me.Cb_osciloscopio_var_3.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_4.Text", Me.Cb_osciloscopio_var_4.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_5.Text", Me.Cb_osciloscopio_var_5.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_6.Text", Me.Cb_osciloscopio_var_6.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_var_t.Text", Me.Cb_osciloscopio_var_t.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_canal.Text", Me.Cb_osciloscopio_canal.Text)

cfgSetValue("configuration/appSettings", "Cb_osciloscopio_flanco.Text", Me.Cb_osciloscopio_flanco.Text)

cfgSetValue("configuration/appSettings", "Tb_osciloscopio_nivel.Text", Me.Tb_osciloscopio_nivel.Text)

'Cierra el fichero de configuración al terminar de almacenar datos

configXml.Save(ficConfig)

'Cierra el puerto serie

If Not moRs232 Is Nothing Then

'Desactiva recepcion de eventos

moRs232.DisableEvents()

'Cierra puerto si está abierto

If moRs232.IsOpen Then moRs232.Close()

'Desactiva el envio cada 30s de las tramas de comprobación de comunicación

Timer2.Enabled = False

End If

'Cierra la tabla si se dejó abierta

Try

If dbConnection.State = ConnectionState.Open Then

dbConnection.Close()

End If

Catch

End Try

End Sub

Private Sub Bsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bsalir.Click

Page 153: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Cierra la ventana de la aplicación

Me.Close()

End Sub

Private Sub Bmostrartablas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bmostrartablas.Click

'Si hay una base de datos seleccionada muestra sus tablas

If tbbase.Text <> "" Then

'Si se puede abrir la base, muestra sus tablas

If Conectar(tbbase.Text, CadenaConexion) Then

Dim i As Integer

'Busca las tablas de la base abierta

nomtablas = NombresTablas()

cbtablas.Items.Clear()

'Rellena el ComboBox con las tablas de la base abierta

If Not nomtablas Is Nothing Then

For i = 0 To nomtablas.Length - 1

cbtablas.Items.Add(nomtablas(i))

Next

End If

If cbtablas.Items.Count > 0 Then

cbtablas.SelectedIndex = 0

End If

End If

End If

Babrirtabla.Enabled = True

cbtablas.Focus()

End Sub

Private Sub Bexaminar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bexaminar.Click

'Permite seleccionar por el usuario la base a abrir

With OpenFileDialog1

.Title = "Seleccionar base de datos"

.Filter = "Bases de Access (*.mdb)|*.mdb"

If .ShowDialog = DialogResult.OK Then

tbbase.Text = .FileName

End If

End With

End Sub

Page 154: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Private Sub cbtablas_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbtablas.SelectedIndexChanged

CadenaConexion = "SELECT * FROM " & cbtablas.Text

Babrirtabla.Enabled = True

End Sub

Private Sub Babrirtabla_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Babrirtabla.Click

With Lvtabla

.View = View.Details

.FullRowSelect = True

.GridLines = True

.LabelEdit = False

.HideSelection = False

.Columns.Clear()

End With

'Vuelve a reconectar para actualizar los datos desde la base

If Not dbConnection Is Nothing Then

dbConnection.Close()

End If

Conectar(tbbase.Text, CadenaConexion)

'Activa botones de modificación la tabla

activabotonesaccess()

'Llena la lista con los elementos de la tabla

AsignarCabeceraLista(Lvtabla)

LLenarLista(Lvtabla)

'Prepara las variables necesarias para modificar la tabla

datasource = tbbase.Text

commandstring = CadenaConexion

Me.tbvalor.Text = ""

'Establece valores por defecto

If datasource = "" Then

datasource = "c:\medidas.mdb"

End If

If commandstring = "" Then

Page 155: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

commandstring = "SELECT * FROM Table1"

End If

If dbConnection Is Nothing Then

Conectar(datasource, commandstring)

End If

'Presenta tabla en el ListView

AsignarCabeceraLista(Lvtabla, cbcampo)

LLenarLista(Lvtabla)

Me.AcceptButton = Basignar

Babrirtabla.Enabled = False

'Escribe el correspondiente mensaje en la pestaña Mensajes

smensaje = "Base de datos " & datasource & " abierta"

actualiza_form()

End Sub

Private Sub tbbase_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles tbbase.DragOver

e.Effect = DragDropEffects.Copy

End Sub

Private Sub tbbase_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles tbbase.DragDrop

Dim archivos() As String

If e.Data.GetDataPresent("FileDrop") Then

archivos = CType(e.Data.GetData("FileDrop"), String())

tbbase.Text = archivos(0)

tbbase.SelectionStart = tbbase.Text.Length

End If

End Sub

Private Sub Lvtabla_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lvtabla.SelectedIndexChanged

Try

lwItemActual = Lvtabla.SelectedItems(0)

MostrarCampo(cbcampo, tbvalor)

Catch

Page 156: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Try

End Sub

Private Sub Lvtabla_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lvtabla.Click

Try

lwItemActual = Lvtabla.SelectedItems(0)

MostrarCampo(cbcampo, tbvalor)

Catch

End Try

End Sub

Private Sub Basignar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Basignar.Click

'Escribe dato en la columna y la fila seleccionada

dato = tbvalor.Text

columna = cbcampo.SelectedIndex

Escribe_campo(sender, e, dato, columna)

End Sub

Private Sub Bguardarbase_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Bguardarbase.Click

Dim fila As Data.DataRow

Dim i, j As Integer

Dim lwItem As ListViewItem

Dim columna As Data.DataColumn

Try

'Actualiza la base de datos con los cambios realizados

For i = 0 To Lvtabla.Items.Count - 1 ' dbDataSet.Tables(NombreTabla).Rows.Count - 1

lwItem = Lvtabla.Items(i)

fila = CType(Lvtabla.Items(i).Tag, Data.DataRow)

fila.BeginEdit()

j = 0

For Each columna In dbDataSet.Tables(NombreTabla).Columns

If j = 0 Then

If columna.AutoIncrement = False Then

fila(j) = lwItem.Text

End If

Page 157: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Else

If columna.AutoIncrement = False Then

fila(columna.ColumnName) = lwItem.SubItems(j).Text

End If

End If

j += 1

Next

fila.EndEdit()

Next

'

dbDataAdapter.Update(dbDataSet, NombreTabla)

dbDataSet.AcceptChanges()

'

'Escribe el correspondiente mensaje en la pestaña Mensajes

smensaje = "Base de datos guardada en disco duro"

Catch errActualizar As Exception

MsgBox(errActualizar.Message)

End Try

actualiza_form()

End Sub

Private Sub Bnuevoitem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bnuevoitem.Click

'Crea una nueva fila al final de la tabla

Crea_fila(sender, e, Lvtabla)

cbcampo.Focus()

End Sub

Private Sub Beliminaritem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Beliminaritem.Click

Dim fila As Data.DataRow

'Elimina la fila indicada

fila = CType(Lvtabla.SelectedItems(0).Tag, Data.DataRow)

fila.Delete()

Lvtabla.Items.Remove(Lvtabla.SelectedItems(0))

End Sub

Private Sub breleerbase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles breleertabla.Click

Page 158: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Si la base de datos está abierta la cierra

If Not dbConnection Is Nothing Then

dbConnection.Close()

End If

'Abre la tabla de la base de datos seleccionada y la presenta en el ListView

Conectar()

AsignarCabeceraLista(Lvtabla, cbcampo)

LLenarLista(Lvtabla)

End Sub

Private Sub tbbase_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbbase.TextChanged

Bmostrartablas.Enabled = IIf(tbbase.Text = "", False, True)

End Sub

'// Gráfica 1

Private Sub cbcursor_graf_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbcursor_graf_1.CheckedChanged

'Visualiza/Oculta los cursores de la gráfica 1 en función del estado del combobox correspondiente

If cbcursor_graf_1.Checked Then

XyCursor_graf_1_1.Visible = True

XyCursor_graf_1_2.Visible = True

tbcursors_graf_1_x.Enabled = True

tbcursors_graf_1_y.Enabled = True

Else

XyCursor_graf_1_1.Visible = False

XyCursor_graf_1_2.Visible = False

tbcursors_graf_1_x.Enabled = False

tbcursors_graf_1_y.Enabled = False

End If

End Sub

Private Sub XyCursor_graf_1_1_AfterMove(ByVal sender As System.Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor_graf_1_1.AfterMove, XyCursor_graf_1_2.AfterMove

'Calcula la distancia entre los cursores y la presenta al usuario

tbcursors_graf_1_y.Text = CDec(XyCursor_graf_1_2.YPosition - XyCursor_graf_1_1.YPosition)

tbcursors_graf_1_x.Text = CDec(XyCursor_graf_1_2.XPosition - XyCursor_graf_1_1.XPosition)

End Sub

Private Sub tbcursors_graf_1_y_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_1_y.TextChanged

tbcursors_graf_1_y.Text = CDec(XyCursor_graf_1_2.YPosition - XyCursor_graf_1_1.YPosition)

Page 159: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Sub

Private Sub tbcursors_graf_1_x_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_1_x.TextChanged

tbcursors_graf_1_x.Text = CDec(XyCursor_graf_1_2.XPosition - XyCursor_graf_1_1.XPosition)

End Sub

'// Gráfica 3

Private Sub cbcursor_graf_3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbcursor_graf_3.CheckedChanged

'Visualiza/Oculta los cursores de la gráfica 3 en función del estado del combobox correspondiente

If cbcursor_graf_3.Checked Then

XyCursor_graf_3_1.Visible = True

XyCursor_graf_3_2.Visible = True

tbcursors_graf_3_x.Enabled = True

tbcursors_graf_3_y.Enabled = True

Else

XyCursor_graf_3_1.Visible = False

XyCursor_graf_3_2.Visible = False

tbcursors_graf_3_x.Enabled = False

tbcursors_graf_3_y.Enabled = False

End If

End Sub

Private Sub XyCursor_graf_3_1_AfterMove(ByVal sender As System.Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor_graf_3_1.AfterMove, XyCursor_graf_3_2.AfterMove

'Calcula la distancia entre los cursores y la presenta al usuario

tbcursors_graf_3_y.Text = CDec(XyCursor_graf_3_2.YPosition - XyCursor_graf_3_1.YPosition)

tbcursors_graf_3_x.Text = CDec(XyCursor_graf_3_2.XPosition - XyCursor_graf_3_1.XPosition)

End Sub

Private Sub tbcursors_graf_3_y_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_3_y.TextChanged

tbcursors_graf_3_y.Text = CDec(XyCursor_graf_3_2.YPosition - XyCursor_graf_3_1.YPosition)

End Sub

Private Sub tbcursors_graf_3_x_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_3_x.TextChanged

tbcursors_graf_3_x.Text = CDec(XyCursor_graf_3_2.XPosition - XyCursor_graf_3_1.XPosition)

End Sub

'// Gráfica 2

Private Sub cbcursor_graf_2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

Page 160: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

cbcursor_graf_2.CheckedChanged

'Visualiza/Oculta los cursores de la gráfica 2 en función del estado del combobox correspondiente

If cbcursor_graf_2.Checked Then

XyCursor_graf_2_1.Visible = True

XyCursor_graf_2_2.Visible = True

tbcursors_graf_2_x.Enabled = True

tbcursors_graf_2_y.Enabled = True

Else

XyCursor_graf_2_1.Visible = False

XyCursor_graf_2_2.Visible = False

tbcursors_graf_2_x.Enabled = False

tbcursors_graf_2_y.Enabled = False

End If

End Sub

Private Sub XyCursor_graf_2_1_AfterMove(ByVal sender As System.Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor_graf_2_1.AfterMove, XyCursor_graf_2_2.AfterMove

'Calcula la distancia entre los cursores y la presenta al usuario

tbcursors_graf_2_y.Text = CDec(XyCursor_graf_2_2.YPosition - XyCursor_graf_2_1.YPosition)

tbcursors_graf_2_x.Text = CDec(XyCursor_graf_2_2.XPosition - XyCursor_graf_2_1.XPosition)

End Sub

Private Sub tbcursors_graf_2_y_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_2_y.TextChanged

tbcursors_graf_2_y.Text = CDec(XyCursor_graf_2_2.YPosition - XyCursor_graf_2_1.YPosition)

End Sub

Private Sub tbcursors_con_x_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_2_x.TextChanged

tbcursors_graf_2_x.Text = CDec(XyCursor_graf_2_2.XPosition - XyCursor_graf_2_1.XPosition)

End Sub

'// Gráfica 4

Private Sub cbcursor_graf_4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbcursor_graf_4.CheckedChanged

'Visualiza/Oculta los cursores de la gráfica 4 en función del estado del combobox correspondiente

If cbcursor_graf_4.Checked Then

XyCursor_graf_4_1.Visible = True

XyCursor_graf_4_2.Visible = True

tbcursors_graf_4_x.Enabled = True

tbcursors_graf_4_y.Enabled = True

Else

Page 161: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

XyCursor_graf_4_1.Visible = False

XyCursor_graf_4_2.Visible = False

tbcursors_graf_4_x.Enabled = False

tbcursors_graf_4_y.Enabled = False

End If

End Sub

Private Sub XyCursor_graf_4_1_AfterMove(ByVal sender As System.Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor_graf_4_2.AfterMove, XyCursor_graf_4_1.AfterMove

'Calcula la distancia entre los cursores y la presenta al usuario

tbcursors_graf_4_y.Text = CDec(XyCursor_graf_4_2.YPosition - XyCursor_graf_4_1.YPosition)

tbcursors_graf_4_x.Text = CDec(XyCursor_graf_4_2.XPosition - XyCursor_graf_4_1.XPosition)

End Sub

Private Sub tbcursors_graf_4_y_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_4_y.TextChanged

tbcursors_graf_4_y.Text = CDec(XyCursor_graf_4_2.YPosition - XyCursor_graf_4_1.YPosition)

End Sub

Private Sub tbcursors_graf_4_x_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_graf_4_x.TextChanged

tbcursors_graf_4_x.Text = CDec(XyCursor_graf_4_2.XPosition - XyCursor_graf_4_1.XPosition)

End Sub

'// Gráfica osciloscopio

Private Sub cbcursor_osc_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbcursor_osc.CheckedChanged

'Visualiza/Oculta los cursores de la gráfica de la pestaña Osciloscopio en función del estado del combobox correspondiente

If cbcursor_osc.Checked Then

XyCursor_osc_1.Visible = True

XyCursor_osc_2.Visible = True

tbcursors_osc_x.Enabled = True

tbcursors_osc_y.Enabled = True

Else

XyCursor_osc_1.Visible = False

XyCursor_osc_2.Visible = False

tbcursors_osc_x.Enabled = False

tbcursors_osc_y.Enabled = False

End If

End Sub

Page 162: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Private Sub XyCursor_osc_1_AfterMove(ByVal sender As System.Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor_osc_1.AfterMove, XyCursor_osc_2.AfterMove

'Calcula la distancia entre los cursores y la presenta al usuario

tbcursors_osc_y.Text = CDec(XyCursor_osc_2.YPosition - XyCursor_osc_1.YPosition)

tbcursors_osc_x.Text = CDec(XyCursor_osc_2.XPosition - XyCursor_osc_1.XPosition)

End Sub

Private Sub tbcursors_osc_y_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_osc_y.TextChanged

tbcursors_osc_y.Text = CDec(XyCursor_osc_2.YPosition - XyCursor_osc_1.YPosition)

End Sub

Private Sub tbcursors_osc_x_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbcursors_osc_x.TextChanged

tbcursors_osc_x.Text = CDec(XyCursor_osc_2.XPosition - XyCursor_osc_1.XPosition)

End Sub

Private Sub Bconexion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bconexion.Click

'Abre el puerto serie con la configuración establecida en la pestaña Conexión

If Bconexion.Text = "Conectar" Then

'Crea un objeto de la clase Rs232()

moRs232 = New Rs232

Try

'Configuración de parámetros

estableceparametros(Rb_com_1, Rb_115200, Rb_57600, Rb_4800, Rb_9600, Rb_38400, Rb_sinparidad, Rb_par, Rb_1, Rb_2)

crea_conexion_Rs232(moRs232)

'Establece el tiempo de ranura (debe estar comprendido entre 10 y 1000 ms elegido por el usuario

itimeout_ant = itimeout

itimeout = Tb_tiempo_ranura.Text

ranura_tx_ant = ranura_tx

ranura_tx = Tb_ranura_tx.Text

If itimeout > 1000 Or itimeout < 10 Then

MessageBox.Show("El tiempo de ranura debe estar comprendido entre 10 y 1000 ms")

itimeout = itimeout_ant

Tb_tiempo_ranura.Text = itimeout_ant

Else

If itimeout + 20 > ranura_tx Then

MessageBox.Show("El tiempo de ranura de transmisión debe ser, al menos, 20 ms mayor que el de recepción")

ranura_tx = ranura_tx_ant

Tb_ranura_tx.Text = ranura_tx_ant

itimeout_tx = itimeout_ant

Page 163: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Tb_tiempo_ranura.Text = itimeout_ant

Else

'Abre puerto seleccionado

moRs232.Open()

'Activa control de eventos

moRs232.EnableEvents()

'Envía trama Comunicación activa y activa el reenvio cada 30s

envio_1()

Timer2.Enabled = True

'Establece tiempo de ranura en recepción

Timer1.Interval = itimeout

'Estable tiempo de ranura en transmisión

Timer3.Interval = ranura_tx

Timer3.Enabled = True

'Deshabilita las opciones de configuración de la conexión

actualiza(True)

'Cambia el texto del botón de Conexión/Desconexión

Bconexion.Text = "Desconectar"

Bconexion.ForeColor = Green

flag_comunicacion = False

flag_act_comunicacion = True

End If

End If

Catch ex As Exception

'Si no se puede abrir el puerto muestra un mensaje de error

MessageBox.Show(ex.Message, "Error de conexión", MessageBoxButtons.OK)

Finally

End Try

Else

'Desactiva el control de eventos

moRs232.DisableEvents()

'Cierra puerto

Page 164: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

moRs232.Close()

'Habilita las opciones de configuración de la conexión

actualiza(False)

'Cambia el texto del botón de Conexión/Desconexión

Bconexion.Text = "Conectar"

Bconexion.ForeColor = Red

'Deshabilita contadores para el envío de tramas

Timer2.Enabled = False

Timer3.Enabled = False

'Vacia la cola de transmisión

n_tramas_cola = 0

'Cambia el label de comunicación

flag_comunicacion = False

flag_act_comunicacion = True

End If

actualiza_form()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'//Da por finalizada la recepción de la trama al superarse el tiempo de ranura

'Deshabilita timer

Timer1.Enabled = False

'Impide la recepción de una nueva trama

flag_recepcion = False

'Trata la trama recibida

decisor_trama(trama, Lvtabla)

ReDim trama(512)

indice_trama = 0

'Actualiza formulario

actualiza_form()

Page 165: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Permite la recepción de una nueva trama

flag_recepcion = True

End Sub

Private Sub B_marcha_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_rearme.Click, B_parada.Click, B_marcha.Click

'//Manda a la cola de transmisión la orden de envío de una trama tipo 8

If sender Is B_marcha Then

tipo_trama2 = 1

ElseIf sender Is B_parada Then

tipo_trama2 = 2

ElseIf sender Is B_rearme Then

tipo_trama2 = 3

End If

'Si la cola de transmisión no está llena almacena la orden de envío

If n_tramas_cola <> 2 Then

cola_txon(n_tramas_cola, 0) = 8

cola_txon(n_tramas_cola, 1) = tipo_trama2

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 8: demasiadas tramas en el buffer"

End If

actualiza_form()

End Sub

Private Sub B_envio_128_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_envio_128.Click

'//Manda a la cola de transmisión la orden de envío de una trama tipo 68

ReDim var_osc(5, 249)

'Si la cola de transmisión no esta llena almacena la orden de envío

If n_tramas_cola <> 2 Then

cola_txon(n_tramas_cola, 0) = 128

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 128: demasiadas tramas en el buffer"

End If

Page 166: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

actualiza_form()

End Sub

Private Sub Cb_osciloscopio_var_1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_1.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la primera variable a representar

s_aux = Cb_osciloscopio_var_1.Text

s_osc_var(0) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la primera variable a representar

WaveformPlot13.PointColor = Green

WaveformPlot13.LineColor = Green

Select Case s_aux

Case "Idc1"

v_osc_var(0) = 0

Case "Idc2"

v_osc_var(0) = 1

Case "Idc3"

v_osc_var(0) = 2

Case "Idc4"

v_osc_var(0) = 3

Case "Idc5"

v_osc_var(0) = 4

Case "Vc1"

v_osc_var(0) = 5

Case "Vc2"

v_osc_var(0) = 6

Case "Vc3"

v_osc_var(0) = 7

Case "Vc4"

v_osc_var(0) = 8

Case "Ia"

v_osc_var(0) = 9

Case "Ib"

v_osc_var(0) = 10

Case "Ic"

v_osc_var(0) = 11

Case "Va"

v_osc_var(0) = 12

Case "Vb"

v_osc_var(0) = 13

Page 167: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "Vc"

v_osc_var(0) = 14

Case "Pw"

v_osc_var(0) = 15

Case "Qw"

v_osc_var(0) = 16

Case "fdp"

v_osc_var(0) = 17

Case "MR1"

v_osc_var(0) = 18

Case "MR2"

v_osc_var(0) = 19

Case "MR3"

v_osc_var(0) = 20

Case "MR4"

v_osc_var(0) = 21

Case "MR5"

v_osc_var(0) = 22

Case "MR6"

v_osc_var(0) = 23

Case "MR7"

v_osc_var(0) = 24

Case "MR8"

v_osc_var(0) = 25

Case "ML1"

v_osc_var(0) = 26

Case "ML2"

v_osc_var(0) = 27

Case "ML3"

v_osc_var(0) = 28

Case "ML4"

v_osc_var(0) = 29

Case "ML5"

v_osc_var(0) = 30

Case "ML6"

v_osc_var(0) = 31

Case "ML7"

v_osc_var(0) = 32

Case "ML8"

v_osc_var(0) = 33

Case Else

Page 168: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(0) = 255

WaveformPlot13.PointColor = Transparent

WaveformPlot13.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_2.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la segunda variable a representar

s_aux = Cb_osciloscopio_var_2.Text

s_osc_var(1) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la segunda variable a representar

WaveformPlot14.PointColor = Red

WaveformPlot14.LineColor = Red

Select Case s_aux

Case "Idc1"

v_osc_var(1) = 0

Case "Idc2"

v_osc_var(1) = 1

Case "Idc3"

v_osc_var(1) = 2

Case "Idc4"

v_osc_var(1) = 3

Case "Idc5"

v_osc_var(1) = 4

Case "Vc1"

v_osc_var(1) = 5

Case "Vc2"

v_osc_var(1) = 6

Case "Vc3"

v_osc_var(1) = 7

Case "Vc4"

v_osc_var(1) = 8

Case "Ia"

v_osc_var(1) = 9

Case "Ib"

v_osc_var(1) = 10

Case "Ic"

v_osc_var(1) = 11

Page 169: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "Va"

v_osc_var(1) = 12

Case "Vb"

v_osc_var(1) = 13

Case "Vc"

v_osc_var(1) = 14

Case "Pw"

v_osc_var(1) = 15

Case "Qw"

v_osc_var(1) = 16

Case "fdp"

v_osc_var(1) = 17

Case "MR1"

v_osc_var(1) = 18

Case "MR2"

v_osc_var(1) = 19

Case "MR3"

v_osc_var(1) = 20

Case "MR4"

v_osc_var(1) = 21

Case "MR5"

v_osc_var(1) = 22

Case "MR6"

v_osc_var(1) = 23

Case "MR7"

v_osc_var(1) = 24

Case "MR8"

v_osc_var(1) = 25

Case "ML1"

v_osc_var(1) = 26

Case "ML2"

v_osc_var(1) = 27

Case "ML3"

v_osc_var(1) = 28

Case "ML4"

v_osc_var(1) = 29

Case "ML5"

v_osc_var(1) = 30

Case "ML6"

v_osc_var(1) = 31

Case "ML7"

Page 170: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(1) = 32

Case "ML8"

v_osc_var(1) = 33

Case Else

v_osc_var(1) = 255

WaveformPlot14.PointColor = Transparent

WaveformPlot14.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_3.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la tercera variable a representar

s_aux = Cb_osciloscopio_var_3.Text

s_osc_var(2) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la tercera variable a representar

WaveformPlot15.PointColor = DarkOrange

WaveformPlot15.LineColor = DarkOrange

Select Case s_aux

Case "Idc1"

v_osc_var(2) = 0

Case "Idc2"

v_osc_var(2) = 1

Case "Idc3"

v_osc_var(2) = 2

Case "Idc4"

v_osc_var(2) = 3

Case "Idc5"

v_osc_var(2) = 4

Case "Vc1"

v_osc_var(2) = 5

Case "Vc2"

v_osc_var(2) = 6

Case "Vc3"

v_osc_var(2) = 7

Case "Vc4"

v_osc_var(2) = 8

Case "Ia"

v_osc_var(2) = 9

Case "Ib"

Page 171: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(2) = 10

Case "Ic"

v_osc_var(2) = 11

Case "Va"

v_osc_var(2) = 12

Case "Vb"

v_osc_var(2) = 13

Case "Vc"

v_osc_var(2) = 14

Case "Pw"

v_osc_var(2) = 15

Case "Qw"

v_osc_var(2) = 16

Case "fdp"

v_osc_var(2) = 17

Case "MR1"

v_osc_var(2) = 18

Case "MR2"

v_osc_var(2) = 19

Case "MR3"

v_osc_var(2) = 20

Case "MR4"

v_osc_var(2) = 21

Case "MR5"

v_osc_var(2) = 22

Case "MR6"

v_osc_var(2) = 23

Case "MR7"

v_osc_var(2) = 24

Case "MR8"

v_osc_var(2) = 25

Case "ML1"

v_osc_var(2) = 26

Case "ML2"

v_osc_var(2) = 27

Case "ML3"

v_osc_var(2) = 28

Case "ML4"

v_osc_var(2) = 29

Case "ML5"

v_osc_var(2) = 30

Page 172: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "ML6"

v_osc_var(2) = 31

Case "ML7"

v_osc_var(2) = 32

Case "ML8"

v_osc_var(2) = 33

Case Else

v_osc_var(2) = 255

WaveformPlot15.PointColor = Transparent

WaveformPlot15.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_4_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_4.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la cuarta variable a representar

s_aux = Cb_osciloscopio_var_4.Text

s_osc_var(3) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la cuarta variable a representar

WaveformPlot16.PointColor = Gray

WaveformPlot16.LineColor = Gray

Select Case s_aux

Case "Idc1"

v_osc_var(3) = 0

Case "Idc2"

v_osc_var(3) = 1

Case "Idc3"

v_osc_var(3) = 2

Case "Idc4"

v_osc_var(3) = 3

Case "Idc5"

v_osc_var(3) = 4

Case "Vc1"

v_osc_var(3) = 5

Case "Vc2"

v_osc_var(3) = 6

Case "Vc3"

v_osc_var(3) = 7

Case "Vc4"

Page 173: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(3) = 8

Case "Ia"

v_osc_var(3) = 9

Case "Ib"

v_osc_var(3) = 10

Case "Ic"

v_osc_var(3) = 11

Case "Va"

v_osc_var(3) = 12

Case "Vb"

v_osc_var(3) = 13

Case "Vc"

v_osc_var(3) = 14

Case "Pw"

v_osc_var(3) = 15

Case "Qw"

v_osc_var(3) = 16

Case "fdp"

v_osc_var(3) = 17

Case "MR1"

v_osc_var(3) = 18

Case "MR2"

v_osc_var(3) = 19

Case "MR3"

v_osc_var(3) = 20

Case "MR4"

v_osc_var(3) = 21

Case "MR5"

v_osc_var(3) = 22

Case "MR6"

v_osc_var(3) = 23

Case "MR7"

v_osc_var(3) = 24

Case "MR8"

v_osc_var(3) = 25

Case "ML1"

v_osc_var(3) = 26

Case "ML2"

v_osc_var(3) = 27

Case "ML3"

v_osc_var(3) = 28

Page 174: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "ML4"

v_osc_var(3) = 29

Case "ML5"

v_osc_var(3) = 30

Case "ML6"

v_osc_var(3) = 31

Case "ML7"

v_osc_var(3) = 32

Case "ML8"

v_osc_var(3) = 33

Case Else

v_osc_var(3) = 255

WaveformPlot16.PointColor = Transparent

WaveformPlot16.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_5_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_5.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la quinta variable a representar

s_aux = Cb_osciloscopio_var_5.Text

s_osc_var(4) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la quinta variable a representar

WaveformPlot17.PointColor = MediumVioletRed

WaveformPlot17.LineColor = MediumVioletRed

Select Case s_aux

Case "Idc1"

v_osc_var(4) = 0

Case "Idc2"

v_osc_var(4) = 1

Case "Idc3"

v_osc_var(4) = 2

Case "Idc4"

v_osc_var(4) = 3

Case "Idc5"

v_osc_var(4) = 4

Case "Vc1"

v_osc_var(4) = 5

Case "Vc2"

v_osc_var(4) = 6

Page 175: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "Vc3"

v_osc_var(4) = 7

Case "Vc4"

v_osc_var(4) = 8

Case "Ia"

v_osc_var(4) = 9

Case "Ib"

v_osc_var(4) = 10

Case "Ic"

v_osc_var(4) = 11

Case "Va"

v_osc_var(4) = 12

Case "Vb"

v_osc_var(4) = 13

Case "Vc"

v_osc_var(4) = 14

Case "Pw"

v_osc_var(4) = 15

Case "Qw"

v_osc_var(4) = 16

Case "fdp"

v_osc_var(4) = 17

Case "MR1"

v_osc_var(4) = 18

Case "MR2"

v_osc_var(4) = 19

Case "MR3"

v_osc_var(4) = 20

Case "MR4"

v_osc_var(4) = 21

Case "MR5"

v_osc_var(4) = 22

Case "MR6"

v_osc_var(4) = 23

Case "MR7"

v_osc_var(4) = 24

Case "MR8"

v_osc_var(4) = 25

Case "ML1"

v_osc_var(4) = 26

Case "ML2"

Page 176: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(4) = 27

Case "ML3"

v_osc_var(4) = 28

Case "ML4"

v_osc_var(4) = 29

Case "ML5"

v_osc_var(4) = 30

Case "ML6"

v_osc_var(4) = 31

Case "ML7"

v_osc_var(4) = 32

Case "ML8"

v_osc_var(4) = 33

Case Else

v_osc_var(4) = 255

WaveformPlot17.PointColor = Transparent

WaveformPlot17.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_6_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_6.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la eleccion de la sexta variable a representar

s_aux = Cb_osciloscopio_var_6.Text

s_osc_var(5) = s_aux

'Actualiza v_osc_var al cambiar la eleccion de la sexta variable a representar

WaveformPlot18.PointColor = Blue

WaveformPlot18.LineColor = Blue

Select Case s_aux

Case "Idc1"

v_osc_var(5) = 0

Case "Idc2"

v_osc_var(5) = 1

Case "Idc3"

v_osc_var(5) = 2

Case "Idc4"

v_osc_var(5) = 3

Case "Idc5"

v_osc_var(5) = 4

Case "Vc1"

Page 177: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

v_osc_var(5) = 5

Case "Vc2"

v_osc_var(5) = 6

Case "Vc3"

v_osc_var(5) = 7

Case "Vc4"

v_osc_var(5) = 8

Case "Ia"

v_osc_var(5) = 9

Case "Ib"

v_osc_var(5) = 10

Case "Ic"

v_osc_var(5) = 11

Case "Va"

v_osc_var(5) = 12

Case "Vb"

v_osc_var(5) = 13

Case "Vc"

v_osc_var(5) = 14

Case "Pw"

v_osc_var(5) = 15

Case "Qw"

v_osc_var(5) = 16

Case "fdp"

v_osc_var(5) = 17

Case "MR1"

v_osc_var(5) = 18

Case "MR2"

v_osc_var(5) = 19

Case "MR3"

v_osc_var(5) = 20

Case "MR4"

v_osc_var(5) = 21

Case "MR5"

v_osc_var(5) = 22

Case "MR6"

v_osc_var(5) = 23

Case "MR7"

v_osc_var(5) = 24

Case "MR8"

v_osc_var(5) = 25

Page 178: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "ML1"

v_osc_var(5) = 26

Case "ML2"

v_osc_var(5) = 27

Case "ML3"

v_osc_var(5) = 28

Case "ML4"

v_osc_var(5) = 29

Case "ML5"

v_osc_var(5) = 30

Case "ML6"

v_osc_var(5) = 31

Case "ML7"

v_osc_var(5) = 32

Case "ML8"

v_osc_var(5) = 33

Case Else

v_osc_var(5) = 255

WaveformPlot18.PointColor = Transparent

WaveformPlot18.LineColor = Transparent

End Select

End Sub

Private Sub Cb_osciloscopio_var_t_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_var_t.SelectedIndexChanged

'Actualiza s_osc_var al cambiar la elección de ancho de ventana

s_osc_var(6) = Cb_osciloscopio_var_t.Text

'Actualiza v_osc_var al cambiar la elección de ancho de ventana

v_osc_var(6) = Cb_osciloscopio_var_t.Text

End Sub

Private Sub B_osc_exportar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_osc_exportar.Click

'Permite seleccionar por el usuario la base a abrir

With SaveFileDialog1

.Title = "Guardar como"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

Page 179: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Guarda los datos en una hoja EXCEL

guarda_osc_excel()

End Sub

Private Sub B_osc_importar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_osc_importar.Click

'Guarda en s_hoja la hoja con los datos seleccionada por el usuario

With OpenFileDialog1

.Title = "Seleccionar hoja de cálculo"

.Filter = "Hojas de Excel (*.xls)|*.xls"

If .ShowDialog = DialogResult.OK Then

s_hoja = .FileName

End If

End With

'Extrae los datos de la hoja

abre_osc_excel()

'Actualiza la leyenda

act_leyendas()

flag_act_osciloscopio = True

'Representa los datos en la gráfica

actualiza_form()

End Sub

Private Sub Cb_osciloscopio_canal_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_canal.SelectedIndexChanged

'Actualiza i_canal_disparo al cambiar la elección del canal de disparo

i_canal_disparo = Cb_osciloscopio_canal.Text

End Sub

Private Sub Cb_osciloscopio_flanco_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_osciloscopio_flanco.SelectedIndexChanged

'Actualiza i_tipo_flanco al cambiar la elección de tipo de flanco

If Cb_osciloscopio_flanco.Text = "Subida" Then

i_tipo_flanco = 1

Else

Page 180: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

i_tipo_flanco = 0

End If

End Sub

Private Sub Tb_osciloscopio_nivel_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tb_osciloscopio_nivel.TextChanged

'Actualiza d_nivel_disparo al cambiar la elección de nivel de disparo

d_nivel_disparo = Tb_osciloscopio_nivel.Text

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

'Envía una trama de Comunicación Activa

envio_1()

End Sub

Private Sub B_envio_66_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_envio_66.Click

'Manda a la cola de transmisión la orden de envío de una trama tipo 66

Try

'Si la cola de transmisión no esta llena almacena la orden de envío

If n_tramas_cola <> 2 Then

'Guarda parámetros en un vector para introducirlos despues en la trama

d_vect_par_cal(0) = Tb_cal_1.Text

d_vect_par_cal(1) = Tb_cal_2.Text

d_vect_par_cal(2) = Tb_cal_3.Text

d_vect_par_cal(3) = Tb_cal_4.Text

d_vect_par_cal(4) = Tb_cal_5.Text

d_vect_par_cal(5) = Tb_cal_6.Text

d_vect_par_cal(6) = Tb_cal_7.Text

d_vect_par_cal(7) = Tb_cal_8.Text

d_vect_par_cal(8) = Tb_cal_9.Text

d_vect_par_cal(9) = Tb_cal_10.Text

d_vect_par_cal(10) = Tb_cal_11.Text

d_vect_par_cal(11) = Tb_cal_12.Text

d_vect_par_cal(12) = Tb_cal_13.Text

d_vect_par_cal(13) = Tb_cal_14.Text

d_vect_par_cal(14) = Tb_cal_15.Text

d_vect_par_cal(15) = Tb_cal_16.Text

Page 181: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

d_vect_par_cal(16) = Tb_cal_17.Text

d_vect_par_cal(17) = Tb_cal_18.Text

d_vect_par_cal(18) = Tb_cal_19.Text

d_vect_par_cal(19) = Tb_cal_20.Text

d_vect_par_cal(20) = Tb_cal_21.Text

d_vect_par_cal(21) = Tb_cal_22.Text

d_vect_par_cal(22) = Tb_cal_23.Text

d_vect_par_cal(23) = Tb_cal_24.Text

d_vect_par_cal(24) = Tb_cal_25.Text

d_vect_par_cal(25) = Tb_cal_26.Text

d_vect_par_cal(26) = Tb_cal_27.Text

d_vect_par_cal(27) = Tb_cal_28.Text

cola_txon(n_tramas_cola, 0) = 66

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 66: demasiadas tramas en el buffer"

End If

Catch

MessageBox.Show("Los parámetros deben ser números")

End Try

actualiza_form()

End Sub

Private Sub B_envio_67_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_envio_67.Click

'Manda a la cola de transmisión la orden de envío de una trama tipo 67

Try

'Si la cola de transmisión no esta llena almacena la orden de envío

If n_tramas_cola <> 2 Then

'Guarda parámetros en un vector para introducirlos despues en la trama

d_vect_otros_par(0) = Tb_par_1.Text

d_vect_otros_par(1) = Tb_par_2.Text

d_vect_otros_par(2) = Tb_par_3.Text

d_vect_otros_par(3) = Tb_par_4.Text

d_vect_otros_par(4) = Tb_par_5.Text

d_vect_otros_par(5) = Tb_par_6.Text

d_vect_otros_par(6) = Tb_par_7.Text

d_vect_otros_par(7) = Tb_par_8.Text

d_vect_otros_par(8) = Tb_par_9.Text

Page 182: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

d_vect_otros_par(9) = Tb_par_10.Text

d_vect_otros_par(10) = Tb_par_11.Text

d_vect_otros_par(11) = Tb_par_12.Text

d_vect_otros_par(12) = Tb_par_13.Text

d_vect_otros_par(13) = Tb_par_14.Text

d_vect_otros_par(14) = Tb_par_15.Text

d_vect_otros_par(15) = Tb_par_16.Text

d_vect_otros_par(16) = Tb_par_17.Text

d_vect_otros_par(17) = Tb_par_18.Text

d_vect_otros_par(18) = Tb_par_19.Text

d_vect_otros_par(19) = Tb_par_20.Text

cola_txon(n_tramas_cola, 0) = 67

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 67: demasiadas tramas en el buffer"

End If

Catch

MessageBox.Show("Los parámetros deben ser números")

End Try

actualiza_form()

End Sub

Private Sub B_envio_68_1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_envio_68_1.Click, B_envio_68_2.Click

'Manda a la cola de transmisión la orden de envío de una trama tipo 68

If sender Is B_envio_68_1 Then

tipo_trama2 = 1

ElseIf sender Is B_envio_68_2 Then

tipo_trama2 = 2

End If

'Si la cola de transmisión no esta llena almacena la orden de envío

If n_tramas_cola <> 2 Then

cola_txon(n_tramas_cola, 0) = 68

cola_txon(n_tramas_cola, 1) = tipo_trama2

n_tramas_cola += 1

Else

sb1string = "Imposible enviar trama 68: demasiadas tramas en el buffer"

Page 183: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End If

actualiza_form()

End Sub

Private Sub Cb11_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb11.SelectedIndexChanged

'Actualiza s_graf_1_var al cambiar la eleccion de la primera variable a representar

s_aux = Cb11.Text

s_graf_1_var(0) = s_aux

'Actualiza rep_hist_rap al cambiar la eleccion de la primera variable a representar

WaveformPlot1.LineColor = Green

WaveformPlot1.PointColor = Green

Select Case s_aux

Case "Idc1"

rep_hist_rap(0) = 0

Case "Idc2"

rep_hist_rap(0) = 1

Case "Idc3"

rep_hist_rap(0) = 2

Case "Idc4"

rep_hist_rap(0) = 3

Case "Idc5"

rep_hist_rap(0) = 4

Case "Vc1"

rep_hist_rap(0) = 5

Case "Vc2"

rep_hist_rap(0) = 6

Case "Vc3"

rep_hist_rap(0) = 7

Case "Vc4"

rep_hist_rap(0) = 8

Case "Ia"

rep_hist_rap(0) = 9

Case "Ib"

rep_hist_rap(0) = 10

Case "Ic"

rep_hist_rap(0) = 11

Case "Va"

rep_hist_rap(0) = 12

Page 184: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "Vb"

rep_hist_rap(0) = 13

Case "Vc"

rep_hist_rap(0) = 14

Case "Pw"

rep_hist_rap(0) = 15

Case "Qw"

rep_hist_rap(0) = 16

Case "fdp"

rep_hist_rap(0) = 17

Case "MR1"

rep_hist_rap(0) = 18

Case "MR2"

rep_hist_rap(0) = 19

Case "MR3"

rep_hist_rap(0) = 20

Case "MR4"

rep_hist_rap(0) = 21

Case "MR5"

rep_hist_rap(0) = 22

Case "MR6"

rep_hist_rap(0) = 23

Case "MR7"

rep_hist_rap(0) = 24

Case "MR8"

rep_hist_rap(0) = 25

Case Else

rep_hist_rap(0) = 255

WaveformPlot1.LineColor = Transparent

WaveformPlot1.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_1(2, tam_graf_1 - 1)

End Sub

Private Sub cb12_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb12.SelectedIndexChanged

'Actualiza s_graf_1_var al cambiar la eleccion de la segunda variable a representar

s_aux = cb12.Text

s_graf_1_var(1) = s_aux

Page 185: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Actualiza rep_hist_rap al cambiar la eleccion de la segunda variable a representar

WaveformPlot2.LineColor = Red

WaveformPlot2.PointColor = Red

Select Case s_aux

Case "Idc1"

rep_hist_rap(1) = 0

Case "Idc2"

rep_hist_rap(1) = 1

Case "Idc3"

rep_hist_rap(1) = 2

Case "Idc4"

rep_hist_rap(1) = 3

Case "Idc5"

rep_hist_rap(1) = 4

Case "Vc1"

rep_hist_rap(1) = 5

Case "Vc2"

rep_hist_rap(1) = 6

Case "Vc3"

rep_hist_rap(1) = 7

Case "Vc4"

rep_hist_rap(1) = 8

Case "Ia"

rep_hist_rap(1) = 9

Case "Ib"

rep_hist_rap(1) = 10

Case "Ic"

rep_hist_rap(1) = 11

Case "Va"

rep_hist_rap(1) = 12

Case "Vb"

rep_hist_rap(1) = 13

Case "Vc"

rep_hist_rap(1) = 14

Case "Pw"

rep_hist_rap(1) = 15

Case "Qw"

rep_hist_rap(1) = 16

Case "fdp"

rep_hist_rap(1) = 17

Page 186: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "MR1"

rep_hist_rap(1) = 18

Case "MR2"

rep_hist_rap(1) = 19

Case "MR3"

rep_hist_rap(1) = 20

Case "MR4"

rep_hist_rap(1) = 21

Case "MR5"

rep_hist_rap(1) = 22

Case "MR6"

rep_hist_rap(1) = 23

Case "MR7"

rep_hist_rap(1) = 24

Case "MR8"

rep_hist_rap(1) = 25

Case Else

rep_hist_rap(1) = 255

WaveformPlot2.LineColor = Transparent

WaveformPlot2.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_1(2, tam_graf_1 - 1)

End Sub

Private Sub Cb13_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb13.SelectedIndexChanged

'Actualiza s_graf_1_var al cambiar la eleccion de la tercera variable a representar

s_aux = Cb13.Text

s_graf_1_var(2) = s_aux

'Actualiza rep_hist_rap al cambiar la eleccion de la tercera variable a representar

WaveformPlot3.LineColor = DarkOrange

WaveformPlot3.PointColor = DarkOrange

Select Case s_aux

Case "Idc1"

rep_hist_rap(2) = 0

Case "Idc2"

rep_hist_rap(2) = 1

Case "Idc3"

Page 187: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_rap(2) = 2

Case "Idc4"

rep_hist_rap(2) = 3

Case "Idc5"

rep_hist_rap(2) = 4

Case "Vc1"

rep_hist_rap(2) = 5

Case "Vc2"

rep_hist_rap(2) = 6

Case "Vc3"

rep_hist_rap(2) = 7

Case "Vc4"

rep_hist_rap(2) = 8

Case "Ia"

rep_hist_rap(2) = 9

Case "Ib"

rep_hist_rap(2) = 10

Case "Ic"

rep_hist_rap(2) = 11

Case "Va"

rep_hist_rap(2) = 12

Case "Vb"

rep_hist_rap(2) = 13

Case "Vc"

rep_hist_rap(2) = 14

Case "Pw"

rep_hist_rap(2) = 15

Case "Qw"

rep_hist_rap(2) = 16

Case "fdp"

rep_hist_rap(2) = 17

Case "MR1"

rep_hist_rap(2) = 18

Case "MR2"

rep_hist_rap(2) = 19

Case "MR3"

rep_hist_rap(2) = 20

Case "MR4"

rep_hist_rap(2) = 21

Case "MR5"

rep_hist_rap(2) = 22

Page 188: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "MR6"

rep_hist_rap(2) = 23

Case "MR7"

rep_hist_rap(2) = 24

Case "MR8"

rep_hist_rap(2) = 25

Case Else

rep_hist_rap(2) = 255

WaveformPlot3.LineColor = Transparent

WaveformPlot3.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_1(2, tam_graf_1 - 1)

End Sub

Private Sub Cb21_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb21.SelectedIndexChanged

'Actualiza s_graf_2_var al cambiar la eleccion de la primera variable a representar

s_aux = Cb21.Text

s_graf_2_var(0) = s_aux

'Actualiza rep_hist_rap al cambiar la eleccion de la primera variable a representar

WaveformPlot5.LineColor = Green

WaveformPlot5.PointColor = Green

Select Case s_aux

Case "Idc1"

rep_hist_rap(3) = 0

Case "Idc2"

rep_hist_rap(3) = 1

Case "Idc3"

rep_hist_rap(3) = 2

Case "Idc4"

rep_hist_rap(3) = 3

Case "Idc5"

rep_hist_rap(3) = 4

Case "Vc1"

rep_hist_rap(3) = 5

Case "Vc2"

rep_hist_rap(3) = 6

Case "Vc3"

Page 189: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_rap(3) = 7

Case "Vc4"

rep_hist_rap(3) = 8

Case "Ia"

rep_hist_rap(3) = 9

Case "Ib"

rep_hist_rap(3) = 10

Case "Ic"

rep_hist_rap(3) = 11

Case "Va"

rep_hist_rap(3) = 12

Case "Vb"

rep_hist_rap(3) = 13

Case "Vc"

rep_hist_rap(3) = 14

Case "Pw"

rep_hist_rap(3) = 15

Case "Qw"

rep_hist_rap(3) = 16

Case "fdp"

rep_hist_rap(3) = 17

Case "MR1"

rep_hist_rap(3) = 18

Case "MR2"

rep_hist_rap(3) = 19

Case "MR3"

rep_hist_rap(3) = 20

Case "MR4"

rep_hist_rap(3) = 21

Case "MR5"

rep_hist_rap(3) = 22

Case "MR6"

rep_hist_rap(3) = 23

Case "MR7"

rep_hist_rap(3) = 24

Case "MR8"

rep_hist_rap(3) = 25

Case Else

rep_hist_rap(3) = 255

WaveformPlot5.LineColor = Transparent

WaveformPlot5.PointColor = Transparent

Page 190: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_2(2, tam_graf_2 - 1)

End Sub

Private Sub Cb22_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb22.SelectedIndexChanged

'Actualiza s_graf_2_var al cambiar la eleccion de la segunda variable a representar

s_aux = Cb22.Text

s_graf_2_var(1) = s_aux

'Actualiza rep_hist_rap al cambiar la eleccion de la segunda variable a representar

WaveformPlot7.LineColor = Red

WaveformPlot7.PointColor = Red

Select Case s_aux

Case "Idc1"

rep_hist_rap(4) = 0

Case "Idc2"

rep_hist_rap(4) = 1

Case "Idc3"

rep_hist_rap(4) = 2

Case "Idc4"

rep_hist_rap(4) = 3

Case "Idc5"

rep_hist_rap(4) = 4

Case "Vc1"

rep_hist_rap(4) = 5

Case "Vc2"

rep_hist_rap(4) = 6

Case "Vc3"

rep_hist_rap(4) = 7

Case "Vc4"

rep_hist_rap(4) = 8

Case "Ia"

rep_hist_rap(4) = 9

Case "Ib"

rep_hist_rap(4) = 10

Case "Ic"

rep_hist_rap(4) = 11

Case "Va"

Page 191: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_rap(4) = 12

Case "Vb"

rep_hist_rap(4) = 13

Case "Vc"

rep_hist_rap(4) = 14

Case "Pw"

rep_hist_rap(4) = 15

Case "Qw"

rep_hist_rap(4) = 16

Case "fdp"

rep_hist_rap(4) = 17

Case "MR1"

rep_hist_rap(4) = 18

Case "MR2"

rep_hist_rap(4) = 19

Case "MR3"

rep_hist_rap(4) = 20

Case "MR4"

rep_hist_rap(4) = 21

Case "MR5"

rep_hist_rap(4) = 22

Case "MR6"

rep_hist_rap(4) = 23

Case "MR7"

rep_hist_rap(4) = 24

Case "MR8"

rep_hist_rap(4) = 25

Case Else

rep_hist_rap(4) = 255

WaveformPlot7.LineColor = Transparent

WaveformPlot7.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_2(2, tam_graf_2 - 1)

End Sub

Private Sub Cb23_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb23.SelectedIndexChanged

'Actualiza s_graf_2_var al cambiar la eleccion de la tercera variable a representar

s_aux = Cb23.Text

Page 192: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

s_graf_2_var(2) = s_aux

'Actualiza rep_hist_rap al cambiar la eleccion de la tercera variable a representar

WaveformPlot8.LineColor = DarkOrange

WaveformPlot8.PointColor = DarkOrange

Select Case s_aux

Case "Idc1"

rep_hist_rap(5) = 0

Case "Idc2"

rep_hist_rap(5) = 1

Case "Idc3"

rep_hist_rap(5) = 2

Case "Idc4"

rep_hist_rap(5) = 3

Case "Idc5"

rep_hist_rap(5) = 4

Case "Vc1"

rep_hist_rap(5) = 5

Case "Vc2"

rep_hist_rap(5) = 6

Case "Vc3"

rep_hist_rap(5) = 7

Case "Vc4"

rep_hist_rap(5) = 8

Case "Ia"

rep_hist_rap(5) = 9

Case "Ib"

rep_hist_rap(5) = 10

Case "Ic"

rep_hist_rap(5) = 11

Case "Va"

rep_hist_rap(5) = 12

Case "Vb"

rep_hist_rap(5) = 13

Case "Vc"

rep_hist_rap(5) = 14

Case "Pw"

rep_hist_rap(5) = 15

Case "Qw"

rep_hist_rap(5) = 16

Case "fdp"

Page 193: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_rap(5) = 17

Case "MR1"

rep_hist_rap(5) = 18

Case "MR2"

rep_hist_rap(5) = 19

Case "MR3"

rep_hist_rap(5) = 20

Case "MR4"

rep_hist_rap(5) = 21

Case "MR5"

rep_hist_rap(5) = 22

Case "MR6"

rep_hist_rap(5) = 23

Case "MR7"

rep_hist_rap(5) = 24

Case "MR8"

rep_hist_rap(5) = 25

Case Else

rep_hist_rap(5) = 255

WaveformPlot8.LineColor = Transparent

WaveformPlot8.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_2(2, tam_graf_2 - 1)

End Sub

Private Sub Cb31_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb31.SelectedIndexChanged

'Actualiza s_graf_3_var al cambiar la eleccion de la primera variable a representar

s_aux = Cb31.Text

s_graf_3_var(0) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la primera variable a representar

WaveformPlot6.LineColor = Green

WaveformPlot6.PointColor = Green

Select Case s_aux

Case "ML1"

rep_hist_len(0) = 26

Case "ML2"

rep_hist_len(0) = 27

Page 194: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case "ML3"

rep_hist_len(0) = 28

Case "ML4"

rep_hist_len(0) = 29

Case "ML5"

rep_hist_len(0) = 30

Case "ML6"

rep_hist_len(0) = 31

Case "ML7"

rep_hist_len(0) = 32

Case "ML8"

rep_hist_len(0) = 33

Case Else

rep_hist_len(0) = 255

WaveformPlot6.LineColor = Transparent

WaveformPlot6.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_3(2, tam_graf_3 - 1)

End Sub

Private Sub Cb32_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb32.SelectedIndexChanged

'Actualiza s_graf_3_var al cambiar la eleccion de la segunda variable a representar

s_aux = Cb32.Text

s_graf_3_var(1) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la segunda variable a representar

WaveformPlot9.LineColor = Red

WaveformPlot9.PointColor = Red

Select Case s_aux

Case "ML1"

rep_hist_len(1) = 26

Case "ML2"

rep_hist_len(1) = 27

Case "ML3"

rep_hist_len(1) = 28

Case "ML4"

rep_hist_len(1) = 29

Case "ML5"

Page 195: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_len(1) = 30

Case "ML6"

rep_hist_len(1) = 31

Case "ML7"

rep_hist_len(1) = 32

Case "ML8"

rep_hist_len(1) = 33

Case Else

rep_hist_len(1) = 255

WaveformPlot9.LineColor = Transparent

WaveformPlot9.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_3(2, tam_graf_3 - 1)

End Sub

Private Sub Cb33_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb33.SelectedIndexChanged

'Actualiza s_graf_3_var al cambiar la eleccion de la tercera variable a representar

s_aux = Cb33.Text

s_graf_3_var(2) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la tercera variable a representar

WaveformPlot10.LineColor = DarkOrange

WaveformPlot10.PointColor = DarkOrange

Select Case s_aux

Case "ML1"

rep_hist_len(2) = 26

Case "ML2"

rep_hist_len(2) = 27

Case "ML3"

rep_hist_len(2) = 28

Case "ML4"

rep_hist_len(2) = 29

Case "ML5"

rep_hist_len(2) = 30

Case "ML6"

rep_hist_len(2) = 31

Case "ML7"

Page 196: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

rep_hist_len(2) = 32

Case "ML8"

rep_hist_len(2) = 33

Case Else

rep_hist_len(2) = 255

WaveformPlot10.LineColor = Transparent

WaveformPlot10.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_3(2, tam_graf_3 - 1)

End Sub

Private Sub Cb41_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb41.SelectedIndexChanged

'Actualiza s_graf_4_var al cambiar la eleccion de la primera variable a representar

s_aux = Cb41.Text

s_graf_4_var(0) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la primera variable a representar

WaveformPlot4.LineColor = Green

WaveformPlot4.PointColor = Green

Select Case s_aux

Case "ML1"

rep_hist_len(3) = 26

Case "ML2"

rep_hist_len(3) = 27

Case "ML3"

rep_hist_len(3) = 28

Case "ML4"

rep_hist_len(3) = 29

Case "ML5"

rep_hist_len(3) = 30

Case "ML6"

rep_hist_len(3) = 31

Case "ML7"

rep_hist_len(3) = 32

Case "ML8"

rep_hist_len(3) = 33

Case Else

rep_hist_len(3) = 255

Page 197: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

WaveformPlot4.LineColor = Transparent

WaveformPlot4.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_4(2, tam_graf_4 - 1)

End Sub

Private Sub cb42_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb42.SelectedIndexChanged

'Actualiza s_graf_4_var al cambiar la eleccion de la segunda variable a representar

s_aux = cb42.Text

s_graf_4_var(1) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la segunda variable a representar

WaveformPlot12.LineColor = Red

WaveformPlot12.PointColor = Red

Select Case s_aux

Case "ML1"

rep_hist_len(4) = 26

Case "ML2"

rep_hist_len(4) = 27

Case "ML3"

rep_hist_len(4) = 28

Case "ML4"

rep_hist_len(4) = 29

Case "ML5"

rep_hist_len(4) = 30

Case "ML6"

rep_hist_len(4) = 31

Case "ML7"

rep_hist_len(4) = 32

Case "ML8"

rep_hist_len(4) = 33

Case Else

rep_hist_len(4) = 255

WaveformPlot12.LineColor = Transparent

WaveformPlot12.PointColor = Transparent

End Select

Page 198: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Inicializamos el vector con los datos

ReDim d_grafica_4(2, tam_graf_4 - 1)

End Sub

Private Sub Cb43_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb43.SelectedIndexChanged

'Actualiza s_graf_4_var al cambiar la eleccion de la tercera variable a representar

s_aux = Cb43.Text

s_graf_4_var(2) = s_aux

'Actualiza rep_hist_len al cambiar la eleccion de la tercera variable a representar

WaveformPlot11.LineColor = DarkOrange

WaveformPlot11.PointColor = DarkOrange

Select Case s_aux

Case "ML1"

rep_hist_len(5) = 26

Case "ML2"

rep_hist_len(5) = 27

Case "ML3"

rep_hist_len(5) = 28

Case "ML4"

rep_hist_len(5) = 29

Case "ML5"

rep_hist_len(5) = 30

Case "ML6"

rep_hist_len(5) = 31

Case "ML7"

rep_hist_len(5) = 32

Case "ML8"

rep_hist_len(5) = 33

Case Else

rep_hist_len(5) = 255

WaveformPlot11.LineColor = Transparent

WaveformPlot11.PointColor = Transparent

End Select

'Inicializamos el vector con los datos

ReDim d_grafica_4(2, tam_graf_4 - 1)

End Sub

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick

Page 199: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Si la cola de transmisión no está vacía, envía una trama

If n_tramas_cola > 0 Then vacia_cola()

End Sub

Private Sub Cb14_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb14.SelectedIndexChanged

'Establece la escala del eje X de la gráfica 1 en función del intervalo elegido por el usuario

tiempo_graf_1 = Cb14.Text

Select Case tiempo_graf_1

Case 5

tam_graf_1 = 300

Case 10

tam_graf_1 = 600

Case 20

tam_graf_1 = 1200

Case 30

tam_graf_1 = 1800

Case 60

tam_graf_1 = 3600

Case Else

tam_graf_2 = 300

End Select

ReDim d_grafica_1(2, tam_graf_1 - 1)

End Sub

Private Sub cb24_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb24.SelectedIndexChanged

'Establece la escala del eje X de la gráfica 2 en función del intervalo elegido por el usuario

tiempo_graf_2 = cb24.Text

Select Case tiempo_graf_2

Case 5

tam_graf_2 = 300

Case 10

tam_graf_2 = 600

Case 20

tam_graf_2 = 1200

Case 30

tam_graf_2 = 1800

Case 60

tam_graf_2 = 3600

Page 200: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case Else

tam_graf_2 = 300

End Select

ReDim d_grafica_2(2, tam_graf_2 - 1)

End Sub

Private Sub Cb34_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb34.SelectedIndexChanged

'Establece la escala del eje X de la gráfica 3 en función del intervalo elegido por el usuario

tiempo_graf_3 = Cb34.Text

Select Case tiempo_graf_3

Case 30

tam_graf_3 = 180

Case 60

tam_graf_3 = 360

Case 90

tam_graf_3 = 540

Case 120

tam_graf_3 = 720

Case 150

tam_graf_3 = 900

Case Else

tam_graf_3 = 180

End Select

ReDim d_grafica_3(2, tam_graf_3 - 1)

End Sub

Private Sub Cb44_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb44.SelectedIndexChanged

'Establece la escala del eje X de la gráfica 4 en función del intervalo elegido por el usuario

tiempo_graf_4 = Cb44.Text

Select Case tiempo_graf_4

Case 30

tam_graf_4 = 180

Case 60

tam_graf_4 = 360

Case 90

tam_graf_4 = 540

Case 120

tam_graf_4 = 720

Page 201: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 150

tam_graf_4 = 900

Case Else

tam_graf_4 = 180

End Select

ReDim d_grafica_4(2, tam_graf_4 - 1)

End Sub

Private Sub B_exp_hist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_exp_hist.Click

'Exporta a una hoja EXCEL los datos de las gráficas seleccionadas

If Cb_grafica_1.Checked = True Then

elige_fichero_guardar(1)

exporta_graf_1()

End If

If Cb_grafica_2.Checked = True Then

elige_fichero_guardar(2)

exporta_graf_2()

End If

If Cb_grafica_3.Checked = True Then

elige_fichero_guardar(3)

exporta_graf_3()

End If

If Cb_grafica_4.Checked = True Then

elige_fichero_guardar(4)

exporta_graf_4()

End If

End Sub

Private Sub B_imp_hist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_imp_hist.Click

'Importa los datos de hojas EXCEL a las gráficas seleccionadas

Dim dimension As Integer

If Cb_grafica_1.Checked = True Then

elige_fichero_abrir(1)

dimension = abre_hist_excel()

ReDim d_grafica_1(2, dimension - 1)

For iaux1 = 0 To 2

For iaux2 = 0 To dimension - 1

d_grafica_1(iaux1, iaux2) = v_hist_excel(iaux1, iaux2)

Next

rep_hist_rap(iaux1) = v_var_excel(iaux1)

Next

Page 202: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End If

If Cb_grafica_2.Checked = True Then

elige_fichero_abrir(2)

dimension = abre_hist_excel()

ReDim d_grafica_2(2, dimension - 1)

For iaux1 = 0 To 2

For iaux2 = 0 To dimension - 1

d_grafica_2(iaux1, iaux2) = v_hist_excel(iaux1, iaux2)

Next

rep_hist_rap(iaux1 + 3) = v_var_excel(iaux1)

Next

End If

If Cb_grafica_3.Checked = True Then

elige_fichero_abrir(3)

dimension = abre_hist_excel()

ReDim d_grafica_3(2, dimension - 1)

For iaux1 = 0 To 2

For iaux2 = 0 To dimension - 1

d_grafica_3(iaux1, iaux2) = v_hist_excel(iaux1, iaux2)

Next

rep_hist_len(iaux1) = v_var_excel(iaux1)

Next

End If

If Cb_grafica_4.Checked = True Then

elige_fichero_abrir(4)

dimension = abre_hist_excel()

ReDim d_grafica_4(2, dimension - 1)

For iaux1 = 0 To 2

For iaux2 = 0 To dimension - 1

d_grafica_4(iaux1, iaux2) = v_hist_excel(iaux1, iaux2)

Next

rep_hist_len(iaux1 + 3) = v_var_excel(iaux1)

Next

End If

act_leyendas_hist()

flag_act_historico = True

actualiza_form()

End Sub

'//Habilita/deshabilita la actualización de las gráficas a la llegada de nuevos datos

Private Sub Cb_rep_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

Page 203: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Cb_rep_1.CheckedChanged

If Cb_rep_1.Checked = True Then

rep_graf(0) = False

Else

rep_graf(0) = True

End If

End Sub

Private Sub Cb_rep_2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rep_2.CheckedChanged

If Cb_rep_2.Checked = True Then

rep_graf(1) = False

Else

rep_graf(1) = True

End If

End Sub

Private Sub cb_rep_3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rep_3.CheckedChanged

If cb_rep_3.Checked = True Then

rep_graf(2) = False

Else

rep_graf(2) = True

End If

End Sub

Private Sub Cb_rep_4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rep_4.CheckedChanged

If Cb_rep_4.Checked = True Then

rep_graf(3) = False

Else

rep_graf(3) = True

End If

End Sub

Private Sub cbautomatico_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbautomatico.CheckedChanged

'Cambia la variable booleana automatico y habilita/deshabilita el Text Box de intervalo en función del estado del Combo Box asociado

If cbautomatico.Checked Then

automatico = True

Tbintervalo.Enabled = True

Else

Page 204: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

automatico = False

Tbintervalo.Enabled = False

End If

End Sub

Private Sub Tbintervalo_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tbintervalo.TextChanged

'Guarda en una variable el periodo de almacenamiento de datos elegido por el usuario

Try

intervalo_almacenamiento = Tbintervalo.Text

Catch ex As Exception

MessageBox.Show("El intervalo de almacenamiento (segundos) debe ser un número entero")

Tbintervalo.Text = intervalo_almacenamiento

End Try

'intervalo_almacenamiento = Tbintervalo.Text

End Sub

Private Sub B_borrar_mensajes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_borrar_mensajes.Click

'Borra los mensajes del List View

Lvmensajes.Items.Clear()

End Sub

Private Sub B_guardar_mensajes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_guardar_mensajes.Click

Dim fila As Data.DataRow

Dim i, j As Integer

Dim lwItem As ListViewItem

Dim columna As Data.DataColumn

Try

'Actualiza la base de datos con los cambios realizados

For i = 0 To Lvmensajes.Items.Count - 1 ' dbDataSet.Tables(NombreTabla).Rows.Count - 1

lwItem = Lvmensajes.Items(i)

fila = CType(Lvmensajes.Items(i).Tag, Data.DataRow)

fila.BeginEdit()

j = 0

For Each columna In dbDataSet.Tables(NombreTabla).Columns

If j = 0 Then

Page 205: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

If columna.AutoIncrement = False Then

fila(j) = lwItem.Text

End If

Else

If columna.AutoIncrement = False Then

fila(columna.ColumnName) = lwItem.SubItems(j).Text

End If

End If

j += 1

Next

fila.EndEdit()

Next

'

dbDataAdapter.Update(dbDataSet, NombreTabla)

dbDataSet.AcceptChanges()

'

'Escribe el correspondiente mensaje en la pestaña Mensajes

smensaje = "Base de datos guardada en disco duro"

Catch errActualizar As Exception

MsgBox(errActualizar.Message)

End Try

actualiza_form()

End Sub

Private Sub B_exp_par_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_exp_par.Click

'//Guarda los parámetros de calibración en una hoja EXCEL

elige_fichero_guardar(0)

exporta_par()

guarda_par_excel(28)

End Sub

Private Sub B_imp_par_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_imp_par.Click

'Importa los parámetros de calibración de una hoja EXCEL y los presenta en la pestaña correspondiente

elige_fichero_abrir(0)

abre_par_excel()

For iaux2 = 0 To 27

d_vect_par_cal(iaux2) = v_par_excel(0, iaux2)

Page 206: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Next

For iaux2 = 0 To 19

d_vect_otros_par(iaux2) = v_par_excel(1, iaux2)

Next

flag_act_par_cal = True

actualiza_form()

End Sub

'//Establece los rangos de los ejes Y de las gráficas del programa

Private Sub b_rango_y_1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b_rango_y_1.Click

SetRange(YAxis5, "Rango eje Y")

End Sub

Private Sub B_rango_y_2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_rango_y_2.Click

SetRange(YAxis3, "Rango eje Y")

End Sub

Private Sub B_rango_y_3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_rango_y_3.Click

SetRange(YAxis4, "Rango eje Y")

End Sub

Private Sub B_rango_y_4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_rango_y_4.Click

SetRange(YAxis2, "Rango eje Y")

End Sub

Private Sub B_rango_y_osc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B_rango_y_osc.Click

SetRange(YAxis1, "Rango eje Y1")

SetRange(YAxis6, "Rango eje Y2")

SetRange(YAxis7, "Rango eje Y3")

SetRange(YAxis8, "Rango eje Y4")

SetRange(YAxis9, "Rango eje Y5")

SetRange(YAxis10, "Rango eje Y6")

End Sub

'//Cambia la variación de los rangos de las gráficas a Manual o a Automatico en función de los Check Boxes asociados

Private Sub Cb_rango_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rango_1.CheckedChanged

If Cb_rango_1.Checked = False Then

b_rango_y_1.Enabled = True

Page 207: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

WaveformPlot1.CanScaleYAxis = False

WaveformPlot2.CanScaleYAxis = False

WaveformPlot3.CanScaleYAxis = False

Else

b_rango_y_1.Enabled = False

WaveformPlot1.CanScaleYAxis = True

WaveformPlot2.CanScaleYAxis = True

WaveformPlot3.CanScaleYAxis = True

End If

End Sub

Private Sub Cb_rango_2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rango_2.CheckedChanged

If Cb_rango_2.Checked = False Then

B_rango_y_2.Enabled = True

WaveformPlot5.CanScaleYAxis = False

WaveformPlot7.CanScaleYAxis = False

WaveformPlot8.CanScaleYAxis = False

Else

B_rango_y_2.Enabled = False

WaveformPlot5.CanScaleYAxis = True

WaveformPlot7.CanScaleYAxis = True

WaveformPlot8.CanScaleYAxis = True

End If

End Sub

Private Sub Cb_rango_3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rango_3.CheckedChanged

If Cb_rango_3.Checked = False Then

B_rango_y_3.Enabled = True

WaveformPlot6.CanScaleYAxis = False

WaveformPlot9.CanScaleYAxis = False

WaveformPlot10.CanScaleYAxis = False

Else

B_rango_y_3.Enabled = False

WaveformPlot6.CanScaleYAxis = True

WaveformPlot9.CanScaleYAxis = True

WaveformPlot10.CanScaleYAxis = True

End If

End Sub

Private Sub Cb_rango_4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

Page 208: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Cb_rango_4.CheckedChanged

If Cb_rango_4.Checked = False Then

B_rango_y_4.Enabled = True

WaveformPlot4.CanScaleYAxis = False

WaveformPlot12.CanScaleYAxis = False

WaveformPlot11.CanScaleYAxis = False

Else

B_rango_y_4.Enabled = False

WaveformPlot4.CanScaleYAxis = True

WaveformPlot12.CanScaleYAxis = True

WaveformPlot11.CanScaleYAxis = True

End If

End Sub

Private Sub Cb_rango_osc_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cb_rango_osc.CheckedChanged

If Cb_rango_osc.Checked = False Then

B_rango_y_osc.Enabled = True

WaveformPlot13.CanScaleYAxis = False

WaveformPlot14.CanScaleYAxis = False

WaveformPlot15.CanScaleYAxis = False

WaveformPlot16.CanScaleYAxis = False

WaveformPlot17.CanScaleYAxis = False

WaveformPlot18.CanScaleYAxis = False

Else

B_rango_y_osc.Enabled = False

WaveformPlot13.CanScaleYAxis = True

WaveformPlot14.CanScaleYAxis = True

WaveformPlot15.CanScaleYAxis = True

WaveformPlot16.CanScaleYAxis = True

WaveformPlot17.CanScaleYAxis = True

WaveformPlot18.CanScaleYAxis = True

End If

End Sub

'//En la gráfica de la pestaña Osciloscopio muestra o esconde las rejillas de cada uno de los ejes

Private Sub cb_rejilla_x_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_x.CheckedChanged

If cb_rejilla_x.Checked = True Then

XAxis1.MajorDivisions.GridVisible = True

Else

XAxis1.MajorDivisions.GridVisible = False

Page 209: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End If

End Sub

Private Sub cb_rejilla_y_1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_1.CheckedChanged

If cb_rejilla_y_1.Checked = True Then

YAxis1.MajorDivisions.GridVisible = True

Else

YAxis1.MajorDivisions.GridVisible = False

End If

End Sub

Private Sub cb_rejilla_y_2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_2.CheckedChanged

If cb_rejilla_y_2.Checked = True Then

YAxis6.MajorDivisions.GridVisible = True

Else

YAxis6.MajorDivisions.GridVisible = False

End If

End Sub

Private Sub cb_rejilla_y_3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_3.CheckedChanged

If cb_rejilla_y_3.Checked = True Then

YAxis7.MajorDivisions.GridVisible = True

Else

YAxis7.MajorDivisions.GridVisible = False

End If

End Sub

Private Sub cb_rejilla_y_4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_4.CheckedChanged

If cb_rejilla_y_4.Checked = True Then

YAxis8.MajorDivisions.GridVisible = True

Else

YAxis8.MajorDivisions.GridVisible = False

End If

End Sub

Private Sub cb_rejilla_y_5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_5.CheckedChanged

If cb_rejilla_y_5.Checked = True Then

YAxis9.MajorDivisions.GridVisible = True

Page 210: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Else

YAxis9.MajorDivisions.GridVisible = False

End If

End Sub

Private Sub cb_rejilla_y_6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_rejilla_y_6.CheckedChanged

If cb_rejilla_y_6.Checked = True Then

YAxis10.MajorDivisions.GridVisible = True

Else

YAxis10.MajorDivisions.GridVisible = False

End If

End Sub

End Class

Page 211: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.2 Módulo ADONETUtil

Imports System.Data.OleDb

Module ADONETUtil

'//===============================================================================================

'// Funciones para la manipulación de tablas

'//

'// Nota: Modulo original de Guillermo 'guille' Som (http://www.elguille.info/) al que se le ha

'// añadido el procedimiento MostrarCampo

'//===============================================================================================

Friend dbConnection As OleDbConnection

Friend dbDataTable As Data.DataTable

Friend dbDataSet As Data.DataSet

Friend dbDataAdapter As OleDbDataAdapter

'//Cadena con la que conectaremos a la base de datos

Friend CadenaConexion As String

'//Código SQL que usaremos para acceder a la tabla de esa base de datos

Friend CadenaSelect As String

'//Nombre completo de la base de datos (Path incluido)

Friend ArchivoDatos As String

'//Nombre que usaremos para identificar a los datos que cargaremos en el objeto DataAdapter

Friend NombreTabla As String = "Tabla1"

Friend dataTable As Data.DataTable

Public lwItemActual As ListViewItem

Friend Function Conectar(Optional ByVal nombreBaseDatos As String = "", _

Optional ByVal commandString As String = "") As Boolean

If nombreBaseDatos = "" Then

nombreBaseDatos = ArchivoDatos

Page 212: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End If

ArchivoDatos = nombreBaseDatos

If ArchivoDatos = "" Then

Exit Function

End If

'

If CadenaSelect = "" Then

CadenaSelect = "SELECT * FROM Table1"

End If

If commandString = "" Then

commandString = CadenaSelect

End If

CadenaSelect = commandString

'

CadenaConexion = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & ArchivoDatos

'

Try

dbConnection = New OleDbConnection(CadenaConexion)

Catch e As Exception

MessageBox.Show("Error al crear la conexión:" & vbCrLf & e.Message)

Return False

Exit Function

End Try

'

Try

dbConnection.Open()

Catch

MessageBox.Show("Error: No se puede abrir la tabla seleccionada")

Exit Function

End Try

'

dbDataSet = New Data.DataSet

'

dbDataAdapter = New OleDbDataAdapter(CadenaSelect, dbConnection)

'

Dim commandBuilder As New OleDbCommandBuilder(dbDataAdapter)

'

dbDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

'dbDataAdapter.Fill(dbDataSet, NombreTabla)

' Cambio para comprobar que funciona, (20/Jul/02)

' En la versión Architect me da error, pero continua funcionando.

Page 213: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Aunque el error lo da si se pasa una cadena SQL que no es correcta,

' por ejemplo, cuando se inicia la aplicación y se deja el texto por defecto.

Try

dbDataAdapter.Fill(dbDataSet)

NombreTabla = "Table"

Catch ex As Exception

MessageBox.Show("Error en Fill:" & vbCrLf & ex.Message)

End Try

'

Return True

End Function

Friend Function NombresTablas() As String()

Dim nomTablas() As String

dbDataTable = New Data.DataTable

Dim dbNull As System.DBNull

Dim restrictions() As Object = {dbNull, dbNull, dbNull, "TABLE"}

Dim i As Integer

'

If dbConnection Is Nothing Then

dbConnection = New Data.OleDb.OleDbConnection(CadenaConexion)

End If

If dbConnection.State <> ConnectionState.Open Then

dbConnection.Open()

End If

'

dataTable = dbConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, restrictions)

i = dataTable.Rows.Count - 1

If i > -1 Then

ReDim nomTablas(i)

For i = 0 To dataTable.Rows.Count - 1

nomTablas(i) = dataTable.Rows(i).Item("TABLE_NAME").ToString()

Next

End If

'

Return nomTablas

End Function

Friend Function NombresColumnas() As String()

Page 214: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Dim columna As Data.DataColumn

Dim i, j As Integer

Dim nomCol() As String

'

j = dbDataSet.Tables("table").Columns.Count - 1

ReDim nomCol(j)

For i = 0 To j

columna = dbDataSet.Tables("Table").Columns(i)

nomCol(i) = columna.ColumnName

Next

Return nomCol

End Function

Friend Sub AsignarCabeceraLista(ByVal ListView1 As ListView)

Dim columna As Data.DataColumn

Dim i, j As Integer

'

With ListView1

.View = View.Details

.FullRowSelect = True

.GridLines = True

.LabelEdit = False

.HideSelection = False

.Columns.Clear()

End With

'

Dim lasColumnas() As String

lasColumnas = NombresColumnas()

'

If Not lasColumnas Is Nothing Then

For i = 0 To lasColumnas.Length - 1

ListView1.Columns.Add(lasColumnas(i), 100, HorizontalAlignment.Left)

Next

End If

'

End Sub

Friend Sub AsignarCabeceraLista(ByVal ListView1 As ListView, _

ByVal cboCampos As ComboBox)

Dim i As Integer

Page 215: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

AsignarCabeceraLista(ListView1)

cboCampos.Items.Clear()

For i = 0 To ListView1.Columns.Count - 1

cboCampos.Items.Add(ListView1.Columns(i).Text)

Next

'

If cboCampos.Items.Count > 0 Then

cboCampos.SelectedIndex = 0

End If

End Sub

Friend Sub LLenarLista(ByVal unListView As ListView)

Dim i As Integer

Dim lwItem As ListViewItem

Dim fila As Data.DataRow

'

unListView.Items.Clear()

'

'For Each fila In dbDataSet.Tables(NombreTabla).Rows

For Each fila In dbDataSet.Tables("Table").Rows

For i = 0 To unListView.Columns.Count - 1

If i = 0 Then

lwItem = unListView.Items.Add(fila(i).ToString)

lwItem.Tag = fila

Else

lwItem.SubItems.Add(fila(i).ToString)

End If

Next

Next

End Sub

Friend Function NombreBase(ByVal path As String) As String

' Devolver sólo el nombre de la base de datos

Dim i As Integer

'

i = path.LastIndexOf("\")

If i > -1 Then

Return path.Substring(i + 1)

End If

End Function

Page 216: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Public Sub MostrarCampo(ByVal cbcampo As ComboBox, ByVal tbvalor As TextBox)

'====================================================================================

' Descripción: Muestra en el TextBox el valor del campo seleccionado en el ListBox

'

' Creación: 29 / 05 / 2005

'====================================================================================

Dim i As Integer

Try

i = cbcampo.SelectedIndex

If i = 0 Then

tbvalor.Text = lwItemActual.Text

ElseIf i > -1 Then

tbvalor.Text = lwItemActual.SubItems(i).Text

End If

Catch

End Try

End Sub

End Module

Page 217: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.3 Módulo ActToolsUtils

Module ActToolsUtils

'/================================================================================================

'/ Funciones para acttivación/desativación de buttons, textboxs,...

'/================================================================================================

Public conexion_on As Boolean = False

Public boolbnuevoitem, boolbasignar, boolbeliminaritem, boolbguardarbase, boolbreleertabla, booltbvalor, boolcbautomatico, boolcbcampo As Boolean

'Flags para actualización selectiva de la ventana del programa

Public flag_act_comunicacion As Boolean = False

Public flag_act_medidas As Boolean = False

Public flag_act_conexion As Boolean = False

Public flag_act_alarmas As Boolean = False

Public flag_act_osciloscopio As Boolean = False

Public flag_act_historico As Boolean = False

Public flag_act_tabla As Boolean = False

Public flag_act_par_cal As Boolean = False

Public flag_act_estado_conv As Boolean = False

Public Sub activabotonesaccess()

'=============================================================================================

' Descripción: Activa botones para la manipulación de la tabla cuando ésta se abre

'

' Creación: 29 / 05 / 2005

'=============================================================================================

boolbnuevoitem = True

boolbasignar = True

boolbeliminaritem = True

boolbguardarbase = True

boolbreleertabla = True

booltbvalor = True

boolcbautomatico = True

boolcbcampo = True

Page 218: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Activa flag para que el procedimiento actualiza_form() habilite los botones asociados

flag_act_tabla = True

End Sub

Public Sub actualiza(ByVal estado As Boolean)

'=============================================================================================

' Descripción: Activa/Desactiva opciones de configuracion y comunicacion en funcion del

' estado del puerto

'

' Creación: 22 / 04 / 2005

'=============================================================================================

If estado Then

'Cambia mensajes de las barras de estado

sb2string = "Puerto abierto"

sb1string = "Listo para recibir datos"

'Escribe mensaje en pestaña "Mensajes"

smensaje = "Puerto abierto (" & miComPort & "/" & baudios & "/" & paridad & "/" & bitsstop & ")"

'Activa botones

conexion_on = True

Else

'Cambia mensajes de las barras de estado

sb2string = "Sin conexión"

sb1string = ""

'Escribe mensaje en pestaña "Mensajes"

smensaje = "Puerto " & miComPort & " cerrado"

'Desactiva botones

conexion_on = False

End If

'Activa flag para que se hagan efectivas las operaciones anteriores en el procedimiento actualiza_form()

flag_act_conexion = True

End Sub

End Module

Page 219: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.4 Módulo AppSettingsUtils

'//Importa el dominio System.Xml

Imports System.Xml

Module AppSettingsUtils

'//===============================================================================================

'// Funciones para guardar la configuración de la ventana

'//

'// Nota: Modulo completo de Guillermo 'guille' Som (http://www.elguille.info/)

'//===============================================================================================

Public configXml As New XmlDocument

Public Sub cfgSetValue(ByVal seccion As String, _

ByVal clave As String, _

ByVal valor As String)

'

Dim n As XmlNode

n = configXml.SelectSingleNode(seccion & "/add[@key=""" & clave & """]")

If Not n Is Nothing Then

n.Attributes("value").InnerText = valor

End If

End Sub

Public Function cfgGetValue(ByVal seccion As String, _

ByVal clave As String, _

ByVal predeterminado As String) As String

'

Dim n As XmlNode

n = configXml.SelectSingleNode(seccion & "/add[@key=""" & clave & """]")

If Not n Is Nothing Then

Return n.Attributes("value").InnerText

Else

Return predeterminado

End If

End Function

End Module

Page 220: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.5 Módulo CRs232

Imports System.Runtime.InteropServices

Imports System.Text

Imports System.Threading

Imports System.ComponentModel

Imports System.IO

#Region "RS232"

Public Class Rs232 : Implements IDisposable

'=====================================================================================

'

' Module : Rs232

' Description : Class for handling RS232 comunication with VB.Net

' Created : 10/08/2001 - 8:45:25

' Author : Corrado Cavalli ([email protected])

' WebSite : www.codeworks.it/net/index.htm

'

' Notes :

'-----------------------------------------------------------------------------------------------

'

* Revisions *

'

' 02/12/2000 First internal alpha version built on framework beta1

'

' 1st Public release Beta2 (10/08/2001)

'

' Rev.1 (28.02.2002)

' 1. Added ResetDev, SetBreak and ClearBreak to the EscapeCommFunction constants

' 2. Added the overloaded Open routine.

' 3. Added the modem status routines, properties and enum.

' 4. If a read times out, it now returns a EndOfStreamException (instead of a simple Exception).

' 5.Compiled with VS.Net final

' Rev.2 (01.03.2002)

' Added Async support

'

' Rev.3 (07.04.2002)

Page 221: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Minor bugs fixed

'

' Rev.3 (05/05/2002)

' Fixed BuildCommmDCB problem

'

' Rev.4 (24/05/2002)

' Fixed problem with ASCII Encoding truncating 8th bit

'

' Rev.5 (27/05/2002)

' Added IDisposable / Finalize implementation

'

' Rev.6 (14/03/2003)

' Fixed problem on DCB fields Initialization

'

' Rev.7 (26/03/2003)

' Added XON/XOFF support

'

' Rev.8 (12/07/2003)

' Added support to COM port number greater than 4

'

' Rev.9 (15/07/2003)

' Added CommEvent to detect incoming chars/events

' Updated both Tx/Rx method from Non-Ovelapped to Overlapped mode

' Removed unused Async methods and other stuff.

'

' Rev.10 (21/07/2003)

' Fixed incorrect character handling when using EnableEvents()

'

' Rev.11 (12/08/2003)

' Fixed some bugs signaled by users

'

' Rev.12 (01/09/2003)

' Removed AutoReset of internal buffers and added PurgeBuffer() method

'

' Rev.13 (02/09/2003)

' Removed GetLastErrorUse in favour of Win32Exception()

'

' Rev.14 (14/09/2003)

' Added IsPortAvailable() function

' Revised some API declaration

' Fixed problem with Win98/Me OS

Page 222: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' Rev.15 (24/09/2003)

' Fixed bug introduced on Rev.14

'

' Rev.16 (12/10/2003)

' Added SetBreak/ClearBreak() methods

'

' Rev.17 (02/11/2003)

' Fixed field on COMMCONFIG

'

' Rev.18 (03/03/2004)

' Fixed bug: Testing mhRS for <>0 is not correct

'

' Rev.19 (08/04/2004)

' Fixed bug: Fixed bug on DTR property

'

' Rev.20 (12/07/2004)

' CommEvent is no more raised on a secondary thread

' pEventsWatcher now uses a background thread

'

' Rev.21 (24/10/2004)

' EscapeCommFunction declaration fixed

' Pariti enum fixed to Parity

'

' Rev. 22 (05/03/2005)

' Fixed memory leak problem causing program closing

' without any message on some systems.

' Thanks to Ralf Gedrat for testing this scenario

'

' Rev.23 (05/04/2005)

' Fixed bug DisableEvents not working bug

'

' Rev.24 (20/04/2005)

' Fixed memory leak on Read method

' Added InBufferCount property

' IsPortAvailable method is now shared

' Thanks to Jean-Pierre ZANIER for the feedback

'===================================================

'// Class Members

Private mhRS As IntPtr = New IntPtr(0) '// Handle to Com Port

Page 223: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Private miPort As Integer = 1 '// Default is COM1

Private miTimeout As Int32 = 70 '// Timeout in ms

Private miBaudRate As Int32 = 9600

Private meParity As DataParity = 0

Private meStopBit As DataStopBit = 0

Private miDataBit As Int32 = 8

Private miBufferSize As Int32 = 512 '// Buffers size default to 512 bytes

Private mabtRxBuf As Byte() '// Receive buffer

Private meMode As Mode '// Class working mode

Private moThreadTx As Thread

Private moThreadRx As Thread

Private moEvents As Thread

Private miTmpBytes2Read As Int32

Private meMask As EventMasks

Private mbDisposed As Boolean

Private mbUseXonXoff As Boolean

Private mbEnableEvents As Boolean

Private miBufThreshold As Int32 = 1

Private muOvlE As OVERLAPPED

Private muOvlW As OVERLAPPED

Private muOvlR As OVERLAPPED

Private mHE As GCHandle

Private mHR As GCHandle

Private mHW As GCHandle

'----------------------------------------------------------------------------------------

#Region "Enums"

'// Parity Data

Public Enum DataParity

Parity_None = 0

Parity_Odd

Parity_Even

Parity_Mark

End Enum

'// StopBit Data

Public Enum DataStopBit

StopBit_1 = 1

StopBit_2

End Enum

<Flags()> Public Enum PurgeBuffers

Page 224: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

RXAbort = &H2

RXClear = &H8

TxAbort = &H1

TxClear = &H4

End Enum

Private Enum Lines

SetRts = 3

ClearRts = 4

SetDtr = 5

ClearDtr = 6

ResetDev = 7 ' // Reset device if possible

SetBreak = 8 ' // Set the device break line.

ClearBreak = 9 ' // Clear the device break line.

End Enum

'// Modem Status

<Flags()> Public Enum ModemStatusBits

ClearToSendOn = &H10

DataSetReadyOn = &H20

RingIndicatorOn = &H40

CarrierDetect = &H80

End Enum

'// Working mode

Public Enum Mode

NonOverlapped

Overlapped

End Enum

'// Comm Masks

<Flags()> Public Enum EventMasks

RxChar = &H1

RXFlag = &H2

TxBufferEmpty = &H4

ClearToSend = &H8

DataSetReady = &H10

CarrierDetect = &H20

Break = &H40

StatusError = &H80

Ring = &H100

End Enum

#End Region

#Region "Structures"

Page 225: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

<StructLayout(LayoutKind.Sequential, Pack:=1)> Private Structure DCB

Public DCBlength As Int32

Public BaudRate As Int32

Public Bits1 As Int32

Public wReserved As Int16

Public XonLim As Int16

Public XoffLim As Int16

Public ByteSize As Byte

Public Parity As Byte

Public StopBits As Byte

Public XonChar As Char

Public XoffChar As Char

Public ErrorChar As Char

Public EofChar As Char

Public EvtChar As Char

Public wReserved2 As Int16

End Structure

<StructLayout(LayoutKind.Sequential, Pack:=1)> Private Structure COMMTIMEOUTS

Public ReadIntervalTimeout As Int32

Public ReadTotalTimeoutMultiplier As Int32

Public ReadTotalTimeoutConstant As Int32

Public WriteTotalTimeoutMultiplier As Int32

Public WriteTotalTimeoutConstant As Int32

End Structure

<StructLayout(LayoutKind.Sequential, Pack:=8)> Private Structure COMMCONFIG

Public dwSize As Int32

Public wVersion As Int16

Public wReserved As Int16

Public dcbx As DCB

Public dwProviderSubType As Int32

Public dwProviderOffset As Int32

Public dwProviderSize As Int32

Public wcProviderData As Int16

End Structure

<StructLayout(LayoutKind.Sequential, Pack:=1)> Public Structure OVERLAPPED

Public Internal As Int32

Public InternalHigh As Int32

Public Offset As Int32

Public OffsetHigh As Int32

Public hEvent As IntPtr

End Structure

Page 226: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

<StructLayout(LayoutKind.Sequential, Pack:=1)> Private Structure COMSTAT

Dim fBitFields As Int32

Dim cbInQue As Int32

Dim cbOutQue As Int32

End Structure

#End Region

#Region "Constants"

Private Const PURGE_RXABORT As Integer = &H2

Private Const PURGE_RXCLEAR As Integer = &H8

Private Const PURGE_TXABORT As Integer = &H1

Private Const PURGE_TXCLEAR As Integer = &H4

Private Const GENERIC_READ As Integer = &H80000000

Private Const GENERIC_WRITE As Integer = &H40000000

Private Const OPEN_EXISTING As Integer = 3

Private Const INVALID_HANDLE_VALUE As Integer = -1

Private Const IO_BUFFER_SIZE As Integer = 1024

Private Const FILE_FLAG_OVERLAPPED As Int32 = &H40000000

Private Const ERROR_IO_PENDING As Int32 = 997

Private Const WAIT_OBJECT_0 As Int32 = 0

Private Const ERROR_IO_INCOMPLETE As Int32 = 996

Private Const WAIT_TIMEOUT As Int32 = &H102&

Private Const INFINITE As Int32 = &HFFFFFFFF

#End Region

#Region "Win32API"

'// Win32 API

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetCommState(ByVal hCommDev As IntPtr, ByRef lpDCB As DCB) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function GetCommState(ByVal hCommDev As IntPtr, ByRef lpDCB As DCB) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True, CharSet:=CharSet.Auto)> Private Shared Function BuildCommDCB(ByVal lpDef As String, ByRef lpDCB As DCB) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetupComm(ByVal hFile As IntPtr, ByVal dwInQueue As Int32, ByVal dwOutQueue As Int32) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetCommTimeouts(ByVal hFile As IntPtr, ByRef lpCommTimeouts As COMMTIMEOUTS) As Int32

End Function

Page 227: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function GetCommTimeouts(ByVal hFile As IntPtr, ByRef lpCommTimeouts As COMMTIMEOUTS) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function ClearCommError(ByVal hFile As IntPtr, ByRef lpErrors As Int32, ByRef lpComStat As COMSTAT) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function PurgeComm(ByVal hFile As IntPtr, ByVal dwFlags As Int32) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function EscapeCommFunction(ByVal hFile As IntPtr, ByVal ifunc As Int32) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function WaitCommEvent(ByVal hFile As IntPtr, ByRef Mask As EventMasks, ByRef lpOverlap As OVERLAPPED) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function WriteFile(ByVal hFile As IntPtr, ByVal Buffer As Byte(), ByVal nNumberOfBytesToWrite As Integer, ByRef lpNumberOfBytesWritten As Integer, ByRef lpOverlapped As OVERLAPPED) As Integer

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function ReadFile(ByVal hFile As IntPtr, <Out()> ByVal Buffer As Byte(), ByVal nNumberOfBytesToRead As Integer, ByRef lpNumberOfBytesRead As Integer, ByRef lpOverlapped As OVERLAPPED) As Integer

End Function

<DllImport("kernel32.dll", SetlastError:=True, CharSet:=CharSet.Auto)> Private Shared Function CreateFile(ByVal lpFileName As String, ByVal dwDesiredAccess As Integer, ByVal dwShareMode As Integer, ByVal lpSecurityAttributes As Integer, ByVal dwCreationDisposition As Integer, ByVal dwFlagsAndAttributes As Integer, ByVal hTemplateFile As Integer) As IntPtr

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function CloseHandle(ByVal hObject As IntPtr) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Public Shared Function GetCommModemStatus(ByVal hFile As IntPtr, ByRef lpModemStatus As Int32) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetEvent(ByVal hEvent As IntPtr) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True, CharSet:=CharSet.Auto)> Private Shared Function CreateEvent(ByVal lpEventAttributes As IntPtr, ByVal bManualReset As Int32, ByVal bInitialState As Int32, ByVal lpName As String) As IntPtr

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function WaitForSingleObject(ByVal hHandle As IntPtr, ByVal dwMilliseconds As Int32) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function GetOverlappedResult(ByVal hFile As IntPtr, ByRef lpOverlapped As OVERLAPPED, ByRef lpNumberOfBytesTransferred As Int32, ByVal bWait As Int32) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetCommMask(ByVal hFile As IntPtr, ByVal lpEvtMask As Int32) As Int32

End Function

<DllImport("kernel32.dll", SetlastError:=True, CharSet:=CharSet.Auto)> Private Shared Function GetDefaultCommConfig(ByVal

Page 228: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

lpszName As String, ByRef lpCC As COMMCONFIG, ByRef lpdwSize As Integer) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function SetCommBreak(ByVal hFile As IntPtr) As Boolean

End Function

<DllImport("kernel32.dll", SetlastError:=True)> Private Shared Function ClearCommBreak(ByVal hFile As IntPtr) As Boolean

End Function

#End Region

#Region "Events"

Public Event CommEvent As CommEventHandler

#End Region

#Region "Delegates"

Public Delegate Sub CommEventHandler(ByVal source As Rs232, ByVal Mask As EventMasks)

#End Region

Public Property Port() As Integer

'===================================================

'

' Description : Comunication Port

' Created :21/09/2001 - 11:25:49

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miPort

End Get

Set(ByVal Value As Integer)

miPort = Value

End Set

End Property

Public Sub PurgeBuffer(ByVal Mode As PurgeBuffers)

'===================================================

'©2003 ALSTOM FIR S.p.A All rights

reserved

'

' Description : Purge Communication Buffer

Page 229: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Created : 01/09/03 - 10:37:39

' Author : Corrado Cavalli

'

'*Parameters Info*

'

' Notes : This method will clear any character into buffer, use TxAbort/RxAbort

'to terminate any pending overlapped Tx/Rx operation.

'===================================================

If (mhRS.ToInt32 > 0) Then PurgeComm(mhRS, Mode)

End Sub

Public Overridable Property Timeout() As Integer

'===================================================

'

' Description: Comunication timeout in seconds

' Created :21/09/2001 - 11:26:50

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miTimeout

End Get

Set(ByVal Value As Integer)

miTimeout = CInt(IIf(Value = 0, 500, Value))

'// If Port is open updates it on the fly

pSetTimeout()

End Set

End Property

Public Property Parity() As DataParity

'===================================================

'

' Description : Comunication parity

' Created :21/09/2001 - 11:27:15

'

'*Parameters Info*

'

Page 230: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Notes :

'===================================================

Get

Return meParity

End Get

Set(ByVal Value As DataParity)

meParity = Value

End Set

End Property

Public Property StopBit() As DataStopBit

'===================================================

'

' Description: Comunication StopBit

' Created :21/09/2001 - 11:27:37

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return meStopBit

End Get

Set(ByVal Value As DataStopBit)

meStopBit = Value

End Set

End Property

Public Property BaudRate() As Integer

'===================================================

'

' Description: Comunication BaudRate

' Created :21/09/2001 - 11:28:00

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miBaudRate

Page 231: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Get

Set(ByVal Value As Integer)

miBaudRate = Value

End Set

End Property

Public Property DataBit() As Integer

'===================================================

'

' Description : Comunication DataBit

' Created :21/09/2001 - 11:28:20

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miDataBit

End Get

Set(ByVal Value As Integer)

miDataBit = Value

End Set

End Property

Public Property BufferSize() As Integer

'===================================================

'

' Description : Receive Buffer size

' Created :21/09/2001 - 11:33:05

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miBufferSize

End Get

Set(ByVal Value As Integer)

miBufferSize = Value

End Set

Page 232: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Property

Public Overloads Sub Open()

'===================================================

'

' Description : Initializes and Opens comunication port

' Created :21/09/2001 - 11:33:40

'

'*Parameters Info*

'

' Notes :

'===================================================

'// Get Dcb block,Update with current data

Dim uDcb As DCB, iRc As Int32

'// Set working mode

meMode = Mode.Overlapped

Dim iMode As Int32 = Convert.ToInt32(IIf(meMode = Mode.Overlapped, FILE_FLAG_OVERLAPPED, 0))

'// Initializes Com Port

If miPort > 0 Then

Try

'// Creates a COM Port stream handle

mhRS = CreateFile("\\.\COM" & miPort.ToString, GENERIC_READ Or GENERIC_WRITE, 0, 0, OPEN_EXISTING, iMode, 0)

If (mhRS.ToInt32 > 0) Then

'// Clear all comunication errors

Dim lpErrCode As Int32

iRc = ClearCommError(mhRS, lpErrCode, New COMSTAT)

'// Clears I/O buffers

iRc = PurgeComm(mhRS, PurgeBuffers.RXClear Or PurgeBuffers.TxClear)

'// Gets COM Settings

iRc = GetCommState(mhRS, uDcb)

'// Updates COM Settings

Dim sParity As String = "NOEM"

sParity = sParity.Substring(meParity, 1)

'// Set DCB State

Dim sDCBState As String = String.Format("baud={0} parity={1} data={2} stop={3}", miBaudRate, sParity, miDataBit, CInt(meStopBit))

iRc = BuildCommDCB(sDCBState, uDcb)

uDcb.Parity = CByte(meParity)

Page 233: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'// Set Xon/Xoff State

If mbUseXonXoff Then

uDcb.Bits1 = 768

Else

uDcb.Bits1 = 0

End If

iRc = SetCommState(mhRS, uDcb)

If iRc = 0 Then

Dim sErrTxt As String = New Win32Exception().Message

Throw New CIOChannelException("Unable to set COM state " & sErrTxt)

End If

'// Setup Buffers (Rx,Tx)

iRc = SetupComm(mhRS, miBufferSize, miBufferSize)

'// Set Timeouts

pSetTimeout()

'//Enables events if required

If mbEnableEvents Then Me.EnableEvents()

Else

'// Raise Initialization problems

Dim sErrTxt As String = New Win32Exception().Message

Throw New CIOChannelException("Unable to open COM" + miPort.ToString + ControlChars.CrLf + sErrTxt)

End If

Catch Ex As Exception

'// Generica error

Throw New CIOChannelException(Ex.Message, Ex)

End Try

Else

'// Port not defined, cannot open

Throw New ApplicationException("COM Port not defined,use Port property to set it before invoking InitPort")

End If

End Sub

Public Overloads Sub Open(ByVal Port As Integer, ByVal BaudRate As Integer, ByVal DataBit As Integer, ByVal Parity As DataParity, ByVal StopBit As DataStopBit, ByVal BufferSize As Integer)

'===================================================

'

' Description: Opens comunication port (Overloaded method)

' Created :

Page 234: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

21/09/2001 - 11:33:40

'

'*Parameters Info*

'

' Notes :

'===================================================

Me.Port = Port

Me.BaudRate = BaudRate

Me.DataBit = DataBit

Me.Parity = Parity

Me.StopBit = StopBit

Me.BufferSize = BufferSize

Open()

End Sub

Public Sub Close()

'===================================================

'

' Description: Close comunication channel

' Created :21/09/2001 - 11:38:00

'

'*Parameters Info*

'

' Notes :

'===================================================

If mhRS.ToInt32 > 0 Then

If mbEnableEvents = True Then

Me.DisableEvents()

End If

Dim ret As Boolean = CloseHandle(mhRS)

If Not ret Then Throw New Win32Exception

mhRS = New IntPtr(0)

End If

End Sub

ReadOnly Property IsOpen() As Boolean

'===================================================

'

' Description: Returns Port Status

' Created :21/09/2001 - 11:38:51

Page 235: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return CBool(mhRS.ToInt32 > 0)

End Get

End Property

Public Overloads Sub Write(ByVal Buffer As Byte())

'===================================================

'

' Description: Transmit a stream

' Created :21/09/2001 - 11:39:51

'

'*Parameters Info*

' Buffer : Array of Byte() to write

' Notes :

'===================================================

Dim iRc, iBytesWritten As Integer, hOvl As GCHandle

'-----------------------------------------------------------------

muOvlW = New Overlapped

If mhRS.ToInt32 <= 0 Then

Throw New ApplicationException("Please initialize and open port before using this method")

Else

'// Creates Event

Try

hOvl = GCHandle.Alloc(muOvlW, GCHandleType.Pinned)

muOvlW.hEvent = CreateEvent(Nothing, 1, 0, Nothing)

If muOvlW.hEvent.ToInt32 = 0 Then Throw New ApplicationException("Error creating event for overlapped writing")

'// Clears IO buffers and sends data

iRc = WriteFile(mhRS, Buffer, Buffer.Length, 0, muOvlW)

If iRc = 0 Then

If Marshal.GetLastWin32Error <> ERROR_IO_PENDING Then

Throw New ApplicationException("Write command error")

Else

Page 236: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'// Check Tx results

If GetOverlappedResult(mhRS, muOvlW, iBytesWritten, 1) = 0 Then

Throw New ApplicationException("Write pending error")

Else

'// All bytes sent?

If iBytesWritten <> Buffer.Length Then Throw New ApplicationException("Write Error - Bytes Written " & iBytesWritten.ToString & " of " & Buffer.Length.ToString)

End If

End If

End If

Finally

'//Closes handle

CloseHandle(muOvlW.hEvent)

If (hOvl.IsAllocated = True) Then hOvl.Free()

End Try

End If

End Sub

Public Overloads Sub Write(ByVal Buffer As String)

'===================================================

'

' Description : Writes a string to RS232

' Created : 04/02/2002 - 8:46:42

'

'*Parameters Info*

'

' Notes : 24/05/2002 Fixed problem with ASCII Encoding

'===================================================

Dim oEncoder As New System.Text.ASCIIEncoding

Dim oEnc As Encoding = oEncoder.GetEncoding(1252)

'-------------------------------------------------------------

Dim aByte() As Byte = oEnc.GetBytes(Buffer)

Me.Write(aByte)

End Sub

Public Function Read(ByVal Bytes2Read As Integer) As Integer

'===================================================

'

' Description: Read Bytes from Port

' Created :21/09/2001 - 11:41:17

Page 237: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

'*Parameters Info*

' Bytes2Read : Bytes to read from port

' Returns: Number of readed chars

'

' Notes :

'===================================================

Dim iReadChars, iRc As Integer, bReading As Boolean, hOvl As GCHandle

'--------------------------------------------------------------

'// If Bytes2Read not specified uses Buffersize

If Bytes2Read = 0 Then Bytes2Read = miBufferSize

muOvlR = New Overlapped

If mhRS.ToInt32 <= 0 Then

Throw New ApplicationException("Please initialize and open port before using this method")

Else

'// Get bytes from port

Try

hOvl = GCHandle.Alloc(muOvlR, GCHandleType.Pinned)

muOvlR.hEvent = CreateEvent(Nothing, 1, 0, Nothing)

If muOvlR.hEvent.ToInt32 = 0 Then Throw New ApplicationException("Error creating event for overlapped reading")

'// Clears IO buffers and reads data

ReDim mabtRxBuf(Bytes2Read - 1)

iRc = ReadFile(mhRS, mabtRxBuf, Bytes2Read, iReadChars, muOvlR)

If iRc = 0 Then

If Marshal.GetLastWin32Error() <> ERROR_IO_PENDING Then

Throw New ApplicationException("Read pending error")

Else

'// Wait for characters

iRc = WaitForSingleObject(muOvlR.hEvent, miTimeout)

Select Case iRc

Case WAIT_OBJECT_0

'// Some data received...

If GetOverlappedResult(mhRS, muOvlR, iReadChars, 0) = 0 Then

Page 238: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Throw New ApplicationException("Read pending error.")

Else

Return iReadChars

End If

Case WAIT_TIMEOUT

Throw New IOTimeoutException("Read Timeout.")

Case Else

Throw New ApplicationException("General read error.")

End Select

End If

Else

Return (iReadChars)

End If

Finally

'//Closes handle

CloseHandle(muOvlR.hEvent)

If (hOvl.IsAllocated) Then hOvl.Free()

End Try

End If

End Function

Overridable ReadOnly Property InputStream() As Byte()

'===================================================

'

' Description: Returns received data as Byte()

' Created :21/09/2001 - 11:45:06

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return mabtRxBuf

End Get

End Property

Overridable ReadOnly Property InputStreamString() As String

'===================================================

Page 239: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' Description : Return a string containing received data

' Created : 04/02/2002 - 8:49:55

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Dim oEncoder As New System.Text.ASCIIEncoding

Dim oEnc As Encoding = oEncoder.GetEncoding(1252)

'-------------------------------------------------------------

If Not Me.InputStream Is Nothing Then Return oEnc.GetString(Me.InputStream)

End Get

End Property

Public Sub ClearInputBuffer()

'===================================================

'

' Description: Clears Input buffer

' Created :21/09/2001 - 11:45:34

'

'*Parameters Info*

'

' Notes : Gets all character until end of buffer

'===================================================

If mhRS.ToInt32 > 0 Then

PurgeComm(mhRS, PURGE_RXCLEAR)

End If

End Sub

Public WriteOnly Property Rts() As Boolean

'===================================================

'

' Description: Set/Resets RTS Line

' Created :21/09/2001 - 11:45:34

'

'*Parameters Info*

'

Page 240: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Notes :

'===================================================

Set(ByVal Value As Boolean)

If mhRS.ToInt32 > 0 Then

If Value Then

EscapeCommFunction(mhRS, Lines.SetRts)

Else

EscapeCommFunction(mhRS, Lines.ClearRts)

End If

End If

End Set

End Property

Public WriteOnly Property Dtr() As Boolean

'===================================================

'

' Description: Set/Resets DTR Line

' Created :21/09/2001 - 11:45:34

'

'*Parameters Info*

'

' Notes :

'===================================================

Set(ByVal Value As Boolean)

If mhRS.ToInt32 > 0 Then

If Value Then

EscapeCommFunction(mhRS, Lines.SetDtr)

Else

EscapeCommFunction(mhRS, Lines.ClearDtr)

End If

End If

End Set

End Property

Public ReadOnly Property ModemStatus() As ModemStatusBits

'===================================================

'

' Description : Gets Modem status

' Created : 28/02/2002 - 8:58:04

'

'*Parameters Info*

Page 241: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' Notes :

'===================================================

Get

If mhRS.ToInt32 <= 0 Then

Throw New ApplicationException("Please initialize and open port before using this method")

Else

'// Retrieve modem status

Dim lpModemStatus As Int32

If Not GetCommModemStatus(mhRS, lpModemStatus) Then

Throw New ApplicationException("Unable to get modem status")

Else

Return CType(lpModemStatus, ModemStatusBits)

End If

End If

End Get

End Property

Public Function CheckLineStatus(ByVal Line As ModemStatusBits) As Boolean

'===================================================

'

' Description : Check status of a Modem Line

' Created : 28/02/2002 - 10:25:17

'

'*Parameters Info*

'

' Notes :

'===================================================

Return Convert.ToBoolean(ModemStatus And Line)

End Function

Public Property UseXonXoff() As Boolean

'===================================================

'

' Description : Set XON/XOFF mode

' Created : 26/05/2003 - 21:16:18

'

'*Parameters Info*

'

' Notes :

Page 242: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'===================================================

Get

Return mbUseXonXoff

End Get

Set(ByVal Value As Boolean)

mbUseXonXoff = Value

End Set

End Property

Public Sub EnableEvents()

'===================================================

'

' Description : Enables monitoring of incoming events

' Created : 15/07/2003 - 12:00:56

'

'*Parameters Info*

'

' Notes :

'===================================================

If mhRS.ToInt32 <= 0 Then

Throw New ApplicationException("Please initialize and open port before using this method")

Else

If moEvents Is Nothing Then

mbEnableEvents = True

moEvents = New Thread(AddressOf pEventsWatcher)

moEvents.IsBackground = True

moEvents.Start()

End If

End If

End Sub

Public Sub DisableEvents()

'===================================================

'

' Description : Disables monitoring of incoming events

' Created : 15/07/2003 - 12:00:56

'

'*Parameters Info*

'

' Notes :

'===================================================

Page 243: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

If mbEnableEvents = True Then

SyncLock Me

mbEnableEvents = False '// This should kill the thread

End SyncLock

'// Let WaitCommEvent exit...

If muOvlE.hEvent.ToInt32 <> 0 Then SetEvent(muOvlE.hEvent)

moEvents = Nothing

End If

End Sub

Public Property RxBufferThreshold() As Int32

'===================================================

'©2003 www.codeworks.it All rights

reserved

'

' Description : Numer of characters into input buffer

' Created : 16/07/03 - 9:00:57

' Author : Corrado Cavalli

'

'*Parameters Info*

'

' Notes :

'===================================================

Get

Return miBufThreshold

End Get

Set(ByVal Value As Int32)

miBufThreshold = Value

End Set

End Property

Public Shared Function IsPortAvailable(ByVal portNumber As Int32) As Boolean

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Returns true if a specific port number is supported by the system

' Created : 14/09/03 - 17:00:57

' Author : Corrado Cavalli

'

' *Parameters Info*

' portNumber : port number to check

Page 244: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' Notes :

'===================================================

If portNumber <= 0 Then

Return False

Else

Dim cfg As COMMCONFIG

Dim cfgsize As Int32 = Marshal.SizeOf(cfg)

cfg.dwSize = cfgsize

Dim ret As Boolean = GetDefaultCommConfig("COM" + portNumber.ToString, cfg, cfgsize)

Return ret

End If

End Function

Public Sub SetBreak()

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Set COM in break modem

' Created : 12/10/03 - 10:00:57

' Author : Corrado Cavalli

'

' *Parameters Info*

'

'

' Notes :

'===================================================

If mhRS.ToInt32 > 0 Then

If SetCommBreak(mhRS) = False Then Throw New Win32Exception

End If

End Sub

Public Sub ClearBreak()

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Clear COM break mode

' Created : 12/10/03 - 10:02:57

' Author : Corrado Cavalli

'

' *Parameters Info*

'

Page 245: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' Notes :

'===================================================

If mhRS.ToInt32 > 0 Then

If ClearCommBreak(mhRS) = False Then Throw New Win32Exception

End If

End Sub

Public ReadOnly Property InBufferCount() As Int32

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Returns the number of bytes inside Rx buffer

' Created : 20/04/05 - 10:02:57

' Author : Corrado Cavalli/Jean-Pierre ZANIER

'

'

'===================================================

Get

Dim comStat As COMSTAT

Dim lpErrCode As Int32

Dim iRc As Int32

comStat.cbInQue = 0

If mhRS.ToInt32 > 0 Then

iRc = ClearCommError(mhRS, lpErrCode, comStat)

Return comStat.cbInQue

End If

Return 0

End Get

End Property

#Region "Finalize"

Protected Overrides Sub Finalize()

'===================================================

'

' Description : Closes COM port if object is garbage collected and still owns

' COM port reosurces

'

' Created : 27/05/2002 - 19:05:56

Page 246: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'

' *Parameters Info*

'

' Notes :

'===================================================

Try

If Not mbDisposed Then

If mbEnableEvents Then Me.DisableEvents()

Close()

End If

Finally

MyBase.Finalize()

End Try

End Sub

#End Region

#Region "Private Routines"

Private Sub pSetTimeout()

'===================================================

'

' Description: Set comunication timeouts

' Created : 21/09/2001 - 11:46:40

'

'*Parameters Info*

'

' Notes :

'===================================================

Dim uCtm As COMMTIMEOUTS

'// Set ComTimeout

If mhRS.ToInt32 <= 0 Then

Exit Sub

Else

'// Changes setup on the fly

With uCtm

.ReadIntervalTimeout = 0

.ReadTotalTimeoutMultiplier = 0

.ReadTotalTimeoutConstant = miTimeout

.WriteTotalTimeoutMultiplier = 10

.WriteTotalTimeoutConstant = 100

End With

Page 247: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

SetCommTimeouts(mhRS, uCtm)

End If

End Sub

Private Sub pDispose() Implements IDisposable.Dispose

'===================================================

'

' Description : Handles correct class disposing Write

' Created : 27/05/2002 - 19:03:06

'

' *Parameters Info*

'

' Notes :

'===================================================

If (Not mbDisposed AndAlso (mhRS.ToInt32 > 0)) Then

'// Closes Com Port releasing resources

Try

Me.Close()

Finally

mbDisposed = True

'// Suppress unnecessary Finalize overhead

GC.SuppressFinalize(Me)

End Try

End If

End Sub

Private Sub pEventsWatcher()

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Watches for all events raising events when they arrive to the port

' Created : 15/07/03 - 11:45:13

' Author : Corrado Cavalli

'

' *Parameters Info*

'

' Notes :

'===================================================

'// Events to watch

Dim lMask As EventMasks = EventMasks.Break Or EventMasks.CarrierDetect Or EventMasks.ClearToSend Or _

Page 248: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

EventMasks.DataSetReady Or EventMasks.Ring Or EventMasks.RxChar Or EventMasks.RXFlag Or _

EventMasks.StatusError

Dim lRetMask As EventMasks, iBytesRead, iTotBytes, iErrMask As Int32, iRc As Int32, aBuf As New ArrayList

Dim uComStat As COMSTAT

'-----------------------------------

'// Creates Event

muOvlE = New Overlapped

Dim hOvlE As GCHandle = GCHandle.Alloc(muOvlE, GCHandleType.Pinned)

muOvlE.hEvent = CreateEvent(Nothing, 1, 0, Nothing)

If muOvlE.hEvent.ToInt32 = 0 Then Throw New ApplicationException("Error creating event for overlapped reading")

'// Set mask

SetCommMask(mhRS, lMask)

'// Looks for RxChar

While mbEnableEvents = True

WaitCommEvent(mhRS, lMask, muOvlE)

Select Case WaitForSingleObject(muOvlE.hEvent, INFINITE)

Case WAIT_OBJECT_0

'// Event (or abort) detected

If mbEnableEvents = False Then Exit While

If (lMask And EventMasks.RxChar) > 0 Then

'// Read incoming data

ClearCommError(mhRS, iErrMask, uComStat)

If iErrMask = 0 Then

Dim ovl As New Overlapped

Dim hOvl As GCHandle = GCHandle.Alloc(ovl, GCHandleType.Pinned)

ReDim mabtRxBuf(uComStat.cbInQue - 1)

If ReadFile(mhRS, mabtRxBuf, uComStat.cbInQue, iBytesRead, ovl) > 0 Then

If iBytesRead > 0 Then

'// Some bytes read, fills temporary buffer

If iTotBytes < miBufThreshold Then

aBuf.AddRange(mabtRxBuf)

iTotBytes += iBytesRead

End If

'// Threshold reached?, raises event

If iTotBytes >= miBufThreshold Then

'//Copies temp buffer into Rx buffer

ReDim mabtRxBuf(iTotBytes - 1)

aBuf.CopyTo(mabtRxBuf)

'// Raises event

Try

Me.OnCommEventReceived(Me, lMask)

Page 249: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Finally

iTotBytes = 0

aBuf.Clear()

End Try

End If

End If

End If

If (hOvl.IsAllocated) Then hOvl.Free()

End If

Else

'// Simply raises OnCommEventHandler event

Me.OnCommEventReceived(Me, lMask)

End If

Case Else

Dim sErr As String = New Win32Exception().Message

Throw New ApplicationException(sErr)

End Select

End While

'// Release Event Handle

CloseHandle(muOvlE.hEvent)

muOvlE.hEvent = IntPtr.Zero

If (hOvlE.IsAllocated) Then hOvlE.Free()

muOvlE = Nothing

End Sub

#End Region

#Region "Protected Routines"

Protected Sub OnCommEventReceived(ByVal source As Rs232, ByVal mask As EventMasks)

'===================================================

'©2003 www.codeworks.it All rights reserved

'

' Description : Raises CommEvent

' Created : 15/07/03 - 15:09:50

' Author : Corrado Cavalli

'

' *Parameters Info*

'

Page 250: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Notes :

'===================================================

Dim del As CommEventHandler = Me.CommEventEvent

If (Not del Is Nothing) Then

Dim SafeInvoker As ISynchronizeInvoke

Try

SafeInvoker = DirectCast(del.Target, ISynchronizeInvoke)

Catch

End Try

If (Not SafeInvoker Is Nothing) Then

SafeInvoker.Invoke(del, New Object() {source, mask})

Else

del.Invoke(source, mask)

End If

End If

End Sub

#End Region

End Class

#End Region

#Region "Exceptions"

Public Class CIOChannelException : Inherits ApplicationException

'===================================================

'

' Module :CChannellException

' Description: Customized Channell Exception

' Created :17/10/2001 - 10:32:37

'

' Notes :This exception is raised when NACK error found

'===================================================

Sub New(ByVal Message As String)

MyBase.New(Message)

End Sub

Sub New(ByVal Message As String, ByVal InnerException As Exception)

MyBase.New(Message, InnerException)

End Sub

End Class

Public Class IOTimeoutException : Inherits CIOChannelException

Page 251: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'===================================================

'

' Description : Timeout customized exception

' Created : 28/02/2002 - 10:43:43

'

' *Parameters Info*

'

' Notes :

'===================================================

Sub New(ByVal Message As String)

MyBase.New(Message)

End Sub

Sub New(ByVal Message As String, ByVal InnerException As Exception)

MyBase.New(Message, InnerException)

End Sub

End Class

#End Region

Page 252: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.6 Módulo ExcelUtils

Imports System

Imports System.Drawing

Imports System.Reflection

Imports System.Collections

Imports System.ComponentModel

Imports System.Windows.Forms

Imports System.Data

Imports System.Data.OleDb

Module ExcelUtils

'//===============================================================================================

'// Funciones para la manipulación de las hojas EXCEL

'//

'// Nota: Modificación de los ejemplos de la ayuda de Visual Studio .NET

'//===============================================================================================

'//Variables para abrir la hoja de cálculo

Public s_hoja As String

Private m_sConn1 As String

'//Variables para almacenar los datos de las gráficas de la pestaña 'Histórico de medidas'

Public s_var_excel(2) As String

Public v_var_excel(3) As Integer

Public v_hist_excel(2, 299) As Double

Public v_par_excel(1, 27) As Double

Public Sub guarda_osc_excel()

'=============================================================================================

' Descripción: Guarda en una hoja EXCEL los datos contenidos en el vector 'var_osc'

'

' Creación: 18 / 12 / 2005

'=============================================================================================

Page 253: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Dim xlapp As Excel.Application

Dim xllibro As Excel.Workbook

Dim xlhoja1 As Excel.Worksheet

'Crea un nuevo libro de EXCEL

xlapp = CreateObject("Excel.Application")

xllibro = xlapp.Workbooks.Add

'Copia los datos a guardar de var_osc a DataArray (transposición de la tabla)

Dim DataArray(249, 5) As Object

For iaux1 = 0 To 5

For iaux2 = 0 To 249

DataArray(iaux2, iaux1) = var_osc(iaux1, iaux2)

Next

Next

'Añade las cabeceras del libro en la fila 1

xlhoja1 = xllibro.Worksheets(1)

xlhoja1.Range("A1").Value = s_osc_var(0)

xlhoja1.Range("B1").Value = s_osc_var(1)

xlhoja1.Range("C1").Value = s_osc_var(2)

xlhoja1.Range("D1").Value = s_osc_var(3)

xlhoja1.Range("E1").Value = s_osc_var(4)

xlhoja1.Range("F1").Value = s_osc_var(5)

'Añade el código correspondiente a la cabecera en la fila 2

xlhoja1.Range("A2").Value = v_osc_var(0)

xlhoja1.Range("B2").Value = v_osc_var(1)

xlhoja1.Range("C2").Value = v_osc_var(2)

xlhoja1.Range("D2").Value = v_osc_var(3)

xlhoja1.Range("E2").Value = v_osc_var(4)

xlhoja1.Range("F2").Value = v_osc_var(5)

'Transfierelos datos del array al libro comenzando en la celda A3

xlhoja1.Range("A3").Resize(250, 6).Value = DataArray

'Guarda el libro creado

Try

xllibro.SaveAs(s_hoja)

Catch ex As Exception

Page 254: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

MessageBox.Show("No se pudieron guardar los datos")

End Try

xlhoja1 = Nothing

xllibro = Nothing

xlapp.Quit()

xlapp = Nothing

GC.Collect()

End Sub

Public Sub abre_osc_excel()

'=============================================================================================

' Descripción: Extrae los datos guardados en la hoja cuya ruta esta en la variable 's_hoja'

'

' Creación: 18 / 12 / 2005

'=============================================================================================

Try

'Abre la hoja EXCEL

m_sConn1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & s_hoja & ";" & "Extended Properties=""Excel 8.0;HDR=YES"""

Dim conn1 As New System.Data.OleDb.OleDbConnection(m_sConn1)

conn1.Open()

Dim cmd1 As New System.Data.OleDb.OleDbCommand("Select * From [Hoja1$]", conn1)

Dim rdr As OleDbDataReader = cmd1.ExecuteReader

'Lee las filas de una en una hasta el final

Dim i As Integer = 0

Do While rdr.Read()

Dim j As Integer = 0

If i = 0 Then

'Guarda los códigos de las variables almacenadas en el vector v_osc_var

For j = 0 To 5

v_osc_var(j) = rdr.GetValue(j)

Next

Else

'Guarda los datos de la hoja en el vector var_osc

Page 255: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

For j = 0 To 5

var_osc(j, i - 1) = rdr.GetValue(j)

Next

End If

i += 1

Loop

'Cierra la hoja

rdr.Close()

conn1.Close()

Catch ex As Exception

'Muestra un mensaje al usuario si no se pudo extraer los datos de la hoja

MessageBox.Show("No se pudo abrir la hoja de cálculo")

End Try

End Sub

Public Sub act_leyendas()

'=============================================================================================

' Descripción: Actualiza las leyendas de la pestaña osciloscopio según las variables

' importadas

'

' Creación: 18 / 12 / 2005

'=============================================================================================

iaux1 = 0

For iaux1 = 0 To 5

Select Case v_osc_var(iaux1)

Case 0

s_osc_var(iaux1) = "Idc1"

Case 1

s_osc_var(iaux1) = "Idc2"

Case 2

s_osc_var(iaux1) = "Idc3"

Case 3

s_osc_var(iaux1) = "Idc4"

Page 256: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 4

s_osc_var(iaux1) = "Idc5"

Case 5

s_osc_var(iaux1) = "Vc1"

Case 6

s_osc_var(iaux1) = "Vc2"

Case 7

s_osc_var(iaux1) = "Vc3"

Case 8

s_osc_var(iaux1) = "Vc4"

Case 9

s_osc_var(iaux1) = "Ia"

Case 10

s_osc_var(iaux1) = "Ib"

Case 11

s_osc_var(iaux1) = "Ic"

Case 12

s_osc_var(iaux1) = "Va"

Case 13

s_osc_var(iaux1) = "Vb"

Case 14

s_osc_var(iaux1) = "Vc"

Case 15

s_osc_var(iaux1) = "P"

Case 16

s_osc_var(iaux1) = "Q"

Case 17

s_osc_var(iaux1) = "fdp"

Case 18

s_osc_var(iaux1) = "MR1"

Case 19

s_osc_var(iaux1) = "MR2"

Case 20

s_osc_var(iaux1) = "MR3"

Case 21

s_osc_var(iaux1) = "MR4"

Case 22

s_osc_var(iaux1) = "MR5"

Case 23

s_osc_var(iaux1) = "MR6"

Case 24

Page 257: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

s_osc_var(iaux1) = "MR7"

Case 25

s_osc_var(iaux1) = "MR8"

Case 26

s_osc_var(iaux1) = "ML1"

Case 27

s_osc_var(iaux1) = "ML2"

Case 28

s_osc_var(iaux1) = "ML3"

Case 29

s_osc_var(iaux1) = "ML4"

Case 30

s_osc_var(iaux1) = "ML5"

Case 31

s_osc_var(iaux1) = "ML6"

Case 32

s_osc_var(iaux1) = "ML7"

Case 33

s_osc_var(iaux1) = "ML8"

Case Else

s_osc_var(iaux1) = ""

End Select

Next

End Sub

Public Sub guarda_hist_excel(ByVal n_datos As Integer)

'=============================================================================================

' Descripción: Guarda en una hoja EXCEL los datos de la gráfica de la pestaña 'Histórico de

' medidas contenidos en el vector 'v_hist_excel'

'

' Creación: 12 / 01 / 2006

'=============================================================================================

Dim xlapp As Excel.Application

Dim xllibro As Excel.Workbook

Dim xlhoja1 As Excel.Worksheet

'Crea un nuevo libro de EXCEL

xlapp = CreateObject("Excel.Application")

xllibro = xlapp.Workbooks.Add

Page 258: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Copia los datos a guardar de v_hist_excel a DataArray (transposición de la tabla)

Dim DataArray(n_datos - 1, 2) As Object

For iaux1 = 0 To 2

For iaux2 = 0 To n_datos - 1

DataArray(iaux2, iaux1) = v_hist_excel(iaux1, iaux2)

Next

Next

'Añade las cabeceras del libro en la fila 1

xlhoja1 = xllibro.Worksheets(1)

xlhoja1.Range("A1").Value = s_var_excel(0)

xlhoja1.Range("B1").Value = s_var_excel(1)

xlhoja1.Range("C1").Value = s_var_excel(2)

'Añade el código correspondiente a la cabecera en la fila 2

xlhoja1.Range("A2").Value = v_var_excel(0)

xlhoja1.Range("B2").Value = v_var_excel(1)

xlhoja1.Range("C2").Value = v_var_excel(2)

'Guarda número de datos guardados (necesario para importar los datos posteriormente)

xlhoja1.Range("D2").Value = n_datos

'Transfierelos datos del array al libro comenzando en la celda A3

xlhoja1.Range("A3").Resize(n_datos, 3).Value = DataArray

'Guarda el libro creado

Try

xllibro.SaveAs(s_hoja)

Catch ex As Exception

MessageBox.Show("No se pudieron guardar los datos")

End Try

xlhoja1 = Nothing

xllibro = Nothing

xlapp.Quit()

xlapp = Nothing

GC.Collect()

End Sub

Page 259: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Public Sub exporta_graf_1()

'Prepara vectores para guardar los datos

ReDim v_hist_excel(2, tam_graf_1 - 1)

For iaux1 = 0 To 2

s_var_excel(iaux1) = s_graf_1_var(iaux1)

v_var_excel(iaux1) = rep_hist_rap(iaux1)

For iaux2 = 0 To tam_graf_1 - 1

v_hist_excel(iaux1, iaux2) = d_grafica_1(iaux1, iaux2)

Next

Next

'Guarda los datos en una hoja EXCEL

guarda_hist_excel(tam_graf_1)

End Sub

Public Sub exporta_graf_2()

'Prepara vectores para guardar los datos

ReDim v_hist_excel(2, tam_graf_2 - 1)

For iaux1 = 0 To 2

s_var_excel(iaux1) = s_graf_2_var(iaux1)

v_var_excel(iaux1) = rep_hist_rap(iaux1 + 3)

For iaux2 = 0 To tam_graf_2 - 1

v_hist_excel(iaux1, iaux2) = d_grafica_2(iaux1, iaux2)

Next

Next

'Guarda los datos en una hoja EXCEL

guarda_hist_excel(tam_graf_2)

End Sub

Public Sub exporta_graf_3()

'Prepara vectores para guardar los datos

ReDim v_hist_excel(2, tam_graf_3 - 1)

For iaux1 = 0 To 2

s_var_excel(iaux1) = s_graf_3_var(iaux1)

v_var_excel(iaux1) = rep_hist_len(iaux1)

For iaux2 = 0 To tam_graf_3 - 1

v_hist_excel(iaux1, iaux2) = d_grafica_3(iaux1, iaux2)

Next

Next

Page 260: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Guarda los datos en una hoja EXCEL

guarda_hist_excel(tam_graf_3)

End Sub

Public Sub exporta_graf_4()

'Prepara vectores para guardar los datos

ReDim v_hist_excel(2, tam_graf_4 - 1)

For iaux1 = 0 To 2

s_var_excel(iaux1) = s_graf_4_var(iaux1)

v_var_excel(iaux1) = rep_hist_len(iaux1 + 3)

For iaux2 = 0 To tam_graf_4 - 1

v_hist_excel(iaux1, iaux2) = d_grafica_4(iaux1, iaux2)

Next

Next

'Guarda los datos en una hoja EXCEL

guarda_hist_excel(tam_graf_4)

End Sub

Public Function abre_hist_excel() As Integer

'=============================================================================================

' Descripción: Extrae los datos guardados en la hoja cuya ruta esta en la variable 's_hoja'

'

' Creación: 18 / 12 / 2005

'=============================================================================================

Try

'Abre la hoja EXCEL

m_sConn1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & s_hoja & ";" & "Extended Properties=""Excel 8.0;HDR=YES"""

Dim conn1 As New System.Data.OleDb.OleDbConnection(m_sConn1)

conn1.Open()

Dim cmd1 As New System.Data.OleDb.OleDbCommand("Select * From [Hoja1$]", conn1)

Dim rdr As OleDbDataReader = cmd1.ExecuteReader

'Lee las filas de una en una hasta el final

Dim i As Integer = 0

Do While rdr.Read()

Page 261: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Dim j As Integer = 0

If i = 0 Then

'Guarda los códigos de las variables almacenadas en el vector v_osc_var

For j = 0 To 3

v_var_excel(j) = rdr.GetValue(j)

Next

ReDim v_hist_excel(2, v_var_excel(3))

Else

'Guarda los datos de la hoja en el vector var_osc

For j = 0 To 2

v_hist_excel(j, i - 1) = rdr.GetValue(j)

Next

End If

i += 1

Loop

'Cierra la hoja

rdr.Close()

conn1.Close()

Return v_var_excel(3)

Catch ex As Exception

'Muestra un mensaje al usuario si no se pudo extraer los datos de la hoja

MessageBox.Show("No se pudo abrir la hoja de cálculo")

End Try

End Function

Public Sub act_leyendas_hist()

'=============================================================================================

' Descripción: Actualiza las leyendas de la pestaña Histórico de medidas atendiendo a las

' variables (importadas)

'

' Creación: 14 / 01 / 2006

'=============================================================================================

Page 262: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

iaux1 = 0

For iaux1 = 0 To 2

Select Case rep_hist_rap(iaux1)

Case 0

s_graf_1_var(iaux1) = "Idc1"

Case 1

s_graf_1_var(iaux1) = "Idc2"

Case 2

s_graf_1_var(iaux1) = "Idc3"

Case 3

s_graf_1_var(iaux1) = "Idc4"

Case 4

s_graf_1_var(iaux1) = "Idc5"

Case 5

s_graf_1_var(iaux1) = "Vc1"

Case 6

s_graf_1_var(iaux1) = "Vc2"

Case 7

s_graf_1_var(iaux1) = "Vc3"

Case 8

s_graf_1_var(iaux1) = "Vc4"

Case 9

s_graf_1_var(iaux1) = "Ia"

Case 10

s_graf_1_var(iaux1) = "Ib"

Case 11

s_graf_1_var(iaux1) = "Ic"

Case 12

s_graf_1_var(iaux1) = "Va"

Case 13

s_graf_1_var(iaux1) = "Vb"

Case 14

s_graf_1_var(iaux1) = "Vc"

Case 15

s_graf_1_var(iaux1) = "P"

Case 16

s_graf_1_var(iaux1) = "Q"

Case 17

s_graf_1_var(iaux1) = "fdp"

Case 18

s_graf_1_var(iaux1) = "MR1"

Page 263: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 19

s_graf_1_var(iaux1) = "MR2"

Case 20

s_graf_1_var(iaux1) = "MR3"

Case 21

s_graf_1_var(iaux1) = "MR4"

Case 22

s_graf_1_var(iaux1) = "MR5"

Case 23

s_graf_1_var(iaux1) = "MR6"

Case 24

s_graf_1_var(iaux1) = "MR7"

Case 25

s_graf_1_var(iaux1) = "MR8"

Case Else

s_graf_1_var(iaux1) = ""

End Select

Next

iaux1 = 0

For iaux1 = 0 To 2

Select Case rep_hist_rap(iaux1 + 3)

Case 0

s_graf_2_var(iaux1) = "Idc1"

Case 1

s_graf_2_var(iaux1) = "Idc2"

Case 2

s_graf_2_var(iaux1) = "Idc3"

Case 3

s_graf_2_var(iaux1) = "Idc4"

Case 4

s_graf_2_var(iaux1) = "Idc5"

Case 5

s_graf_2_var(iaux1) = "Vc1"

Case 6

s_graf_2_var(iaux1) = "Vc2"

Case 7

s_graf_2_var(iaux1) = "Vc3"

Case 8

s_graf_2_var(iaux1) = "Vc4"

Case 9

Page 264: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

s_graf_2_var(iaux1) = "Ia"

Case 10

s_graf_2_var(iaux1) = "Ib"

Case 11

s_graf_2_var(iaux1) = "Ic"

Case 12

s_graf_2_var(iaux1) = "Va"

Case 13

s_graf_2_var(iaux1) = "Vb"

Case 14

s_graf_2_var(iaux1) = "Vc"

Case 15

s_graf_2_var(iaux1) = "P"

Case 16

s_graf_2_var(iaux1) = "Q"

Case 17

s_graf_2_var(iaux1) = "fdp"

Case 18

s_graf_2_var(iaux1) = "MR1"

Case 19

s_graf_2_var(iaux1) = "MR2"

Case 20

s_graf_2_var(iaux1) = "MR3"

Case 21

s_graf_2_var(iaux1) = "MR4"

Case 22

s_graf_2_var(iaux1) = "MR5"

Case 23

s_graf_2_var(iaux1) = "MR6"

Case 24

s_graf_2_var(iaux1) = "MR7"

Case 25

s_graf_2_var(iaux1) = "MR8"

Case Else

s_graf_2_var(iaux1) = ""

End Select

Next

iaux1 = 0

For iaux1 = 0 To 2

Select Case rep_hist_len(iaux1)

Page 265: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 26

s_graf_3_var(iaux1) = "ML1"

Case 27

s_graf_3_var(iaux1) = "ML2"

Case 28

s_graf_3_var(iaux1) = "ML3"

Case 29

s_graf_3_var(iaux1) = "ML4"

Case 30

s_graf_3_var(iaux1) = "ML5"

Case 31

s_graf_3_var(iaux1) = "ML6"

Case 32

s_graf_3_var(iaux1) = "ML7"

Case 33

s_graf_3_var(iaux1) = "ML8"

Case Else

s_graf_3_var(iaux1) = ""

End Select

Next

iaux1 = 0

For iaux1 = 0 To 2

Select Case rep_hist_len(iaux1 + 3)

Case 26

s_graf_4_var(iaux1) = "ML1"

Case 27

s_graf_4_var(iaux1) = "ML2"

Case 28

s_graf_4_var(iaux1) = "ML3"

Case 29

s_graf_4_var(iaux1) = "ML4"

Case 30

s_graf_4_var(iaux1) = "ML5"

Case 31

s_graf_4_var(iaux1) = "ML6"

Case 32

s_graf_4_var(iaux1) = "ML7"

Case 33

s_graf_4_var(iaux1) = "ML8"

Case Else

Page 266: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

s_graf_4_var(iaux1) = ""

End Select

Next

End Sub

Public Sub exporta_par()

'//Prepara vectores para guardar los datos

For iaux1 = 0 To 27

v_par_excel(0, iaux1) = d_vect_par_cal(iaux1)

Next

For iaux1 = 0 To 19

v_par_excel(1, iaux1) = d_vect_otros_par(iaux1)

Next

End Sub

Public Sub guarda_par_excel(ByVal n_datos As Integer)

'=============================================================================================

' Descripción: Guarda en una hoja EXCEL los datos de la pestaña 'Parámetros contenidos en el

' vector 'v_par_excel'

'

' Creación: 7 / 02 / 2006

'=============================================================================================

Dim xlapp As Excel.Application

Dim xllibro As Excel.Workbook

Dim xlhoja1 As Excel.Worksheet

'Crea un nuevo libro de EXCEL

xlapp = CreateObject("Excel.Application")

xllibro = xlapp.Workbooks.Add

'Copia los datos a guardar de v_par_excel a DataArray (transposición de la tabla)

Dim DataArray(n_datos - 1, 2) As Object

For iaux1 = 0 To 1

For iaux2 = 0 To n_datos - 1

DataArray(iaux2, iaux1) = v_par_excel(iaux1, iaux2)

Next

Page 267: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Next

'Añade las cabeceras del libro en la fila 1

xlhoja1 = xllibro.Worksheets(1)

xlhoja1.Range("A1").Value = "Parámetros calibración"

xlhoja1.Range("B1").Value = "Otros parámetros"

'Transfierelos datos del array al libro comenzando en la celda A2

xlhoja1.Range("A2").Resize(n_datos, 2).Value = DataArray

'Guarda el libro creado

Try

xllibro.SaveAs(s_hoja)

Catch ex As Exception

MessageBox.Show("No se pudieron guardar los datos")

End Try

'Cierra el libro

xlhoja1 = Nothing

xllibro = Nothing

xlapp.Quit()

xlapp = Nothing

GC.Collect()

End Sub

Public Sub abre_par_excel()

'=============================================================================================

' Descripción: Extrae los datos guardados en la hoja cuya ruta esta en la variable 's_hoja'

'

' Creación: 7 / 02 / 2006

'=============================================================================================

'Try

'Abre la hoja EXCEL

m_sConn1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & s_hoja & ";" & "Extended Properties=""Excel 8.0;HDR=YES"""

Dim conn1 As New System.Data.OleDb.OleDbConnection(m_sConn1)

conn1.Open()

Dim cmd1 As New System.Data.OleDb.OleDbCommand("Select * From [Hoja1$]", conn1)

Page 268: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Dim rdr As OleDbDataReader = cmd1.ExecuteReader

'Lee las filas de una en una hasta el final

Dim i As Integer = 0

Do While rdr.Read()

Dim j As Integer = 0

For j = 0 To 1

v_par_excel(j, i) = rdr.GetValue(j)

Next

i += 1

Loop

'Cierra la hoja

rdr.Close()

conn1.Close()

End Sub

End Module

Page 269: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.7 Módulo Rs232Utils

Module Rs232Utils

'//===============================================================================================

'// Funciones para la configuración y control del puerto serie

'//===============================================================================================

'//Variables para almacenar la configuración de comunicación establecida por el usuario

Public miComPort, baudios, bitsstop, paridad As Integer

Public itimeout As Integer = 50

Public itimeout_ant As Integer = 25

Public ranura_tx As Integer = 100

Public ranura_tx_ant As Integer = 100

Public Sub estableceparametros(ByVal rb_com_1 As RadioButton, ByVal rb_115200 As RadioButton, ByVal rb_57600 As RadioButton, ByVal rb_4800 As RadioButton, ByVal rb_9600 As RadioButton, ByVal rb_38400 As RadioButton, ByVal rb_sinparidad As RadioButton, ByVal rb_par As RadioButton, ByVal rb_1 As RadioButton, ByVal rb_2 As RadioButton)

'=============================================================================================

' Descripción: Guarda en las variables correspondientes los valores de los parámetros de

' la comunicación serie.

'

' Creación: 15 / 06 / 2005

'=============================================================================================

If rb_com_1.Checked = True Then

miComPort = 1

Else

miComPort = 2

End If

If rb_115200.Checked = True Then

baudios = 115200

ElseIf rb_57600.Checked = True Then

baudios = 57600

ElseIf rb_4800.Checked = True Then

baudios = 4800

Page 270: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

ElseIf rb_9600.Checked = True Then

baudios = 9600

ElseIf rb_38400.Checked = True Then

baudios = 38400

End If

If rb_sinparidad.Checked = True Then

paridad = 0

ElseIf rb_par.Checked = True Then

paridad = 2

Else

paridad = 1

End If

If rb_1.Checked = True Then

bitsstop = 1

ElseIf rb_2.Checked = True Then

bitsstop = 2

Else

bitsstop = 3

End If

End Sub

Public Sub crea_conexion_Rs232(ByVal mors232 As Rs232)

'=============================================================================================

' Descripción: Configura la conexión por el puerto serie para su posterior apertura

'

' Creación: 15 / 06 / 2005

'=============================================================================================

With mors232

.Port = miComPort

.BaudRate = baudios

.DataBit = 8

.StopBit = bitsstop

'.Timeout = itimeout

.Timeout = 400

'Configuracion de paridad

If paridad = 0 Then

Page 271: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

.Parity = Rs232.DataParity.Parity_None

Else

If paridad = 1 Then

.Parity = Rs232.DataParity.Parity_Odd

Else

.Parity = Rs232.DataParity.Parity_Even

End If

End If

End With

End Sub

End Module

Page 272: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.8 Módulo RxUtils

Imports proyecto9.TablaUtils

Imports NationalInstruments.Analysis

Imports System.Math

Module RxUtils

'//==========================================================

'// Funciones para el tratamiento de las tramas recibidas

'//==========================================================

Public arraybyte2(5) As Byte

Public arraybyte(5) As Byte

Public automatico As Boolean = False

Public sb1string, sb2string As String

Public flag1, flag2, flag3, flag4, flag5, flag6, flag7, flag8, flag9, flag10, flag11, flag12, flag13, flag14, flag15, flag16 As Boolean

Public estadostring As String = ""

Public tiempoactual, fechaactual, smensaje As String

Public arraydoublemedidasrx(25), arraydouble_medidas_lentas(7) As Double

'Variables auxiliares

Public dato, scanal As String

Public iaux1, iaux2 As Integer

Public crc_trama As Byte

'Variables para la representación gráfica de datos en la pestaña Osciloscopio

Public codigo As Integer

Public var_osc(5, 249) As Double

'Variable para la recepción de la trama 1

Public flag_comunicacion As Boolean = False

'Variable para la recepción de la trama 16

Public flag_estado_con() As Boolean = {False, False, False, False}

'Variables para la recepción de la trama 64

Public s_graf_1_var(2), s_graf_2_var(2), s_graf_3_var(2), s_graf_4_var(2) As String

Public rep_hist_rap() As Integer = {255, 255, 255, 255, 255, 255}

Public rep_hist_len() As Integer = {255, 255, 255, 255, 255, 255}

Page 273: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Public tam_graf_1 As Integer = 300

Public tam_graf_2 As Integer = 300

Public tam_graf_3 As Integer = 180

Public tam_graf_4 As Integer = 180

Public short_dato As Short = 0

Public tiempo_graf_1 As Integer = 5

Public tiempo_graf_2 As Integer = 5

Public tiempo_graf_3 As Integer = 30

Public tiempo_graf_4 As Integer = 30

'Variables para la represntación gráfica de las variables en la pestaña Histórico de Medidas

Public d_grafica_1(2, 299), d_grafica_2(2, 299), d_grafica_3(2, 179), d_grafica_4(2, 179) As Double

Public rep_graf() As Boolean = {True, True, True, True}

Public momentoactual As DateTime

Public intervalo_almacenamiento As Integer = 5

Public e As System.EventArgs

Function calcula_CRC() As Byte

'=====================================================================

' Descripción: Calcula el CRC-8 del vector arraybyte2

' Creación: 8 /07 / 2005

'

' Notas:

'=====================================================================

Dim bituno As Integer

Dim flag1 As Boolean = False

Dim flag2 As Boolean = False

Dim flag3 As Boolean = False

Dim ind As Integer

Dim indicebit As Integer = 0

Dim bresto As Byte = 0

ind = 0

Do While flag1 = False

'Busca el siguiente bit a 1 o el final de los bytes objeto del cálculo del CRC

Do While flag2 = False And flag3 = False

Select Case indicebit

Page 274: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 0

If arraybyte2(ind) And 128 Then

bituno = 0

flag2 = True

End If

Case 1

If arraybyte2(ind) And 64 Then

bituno = 1

flag2 = True

End If

Case 2

If arraybyte2(ind) And 32 Then

bituno = 2

flag2 = True

End If

Case 3

If arraybyte2(ind) And 16 Then

bituno = 3

flag2 = True

End If

Case 4

If arraybyte2(ind) And 8 Then

bituno = 4

flag2 = True

End If

Case 5

If arraybyte2(ind) And 4 Then

bituno = 5

flag2 = True

End If

Case 6

If arraybyte2(ind) And 2 Then

bituno = 6

flag2 = True

End If

Case 7

If arraybyte2(ind) And 1 Then

bituno = 7

flag2 = True

End If

End Select

Page 275: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

indicebit += 1

'Si se llega al ultimo bit de un byte

If indicebit = 8 Then

ind += 1

indicebit = 0

End If

If ind = arraybyte2.Length Then

flag3 = True

End If

Loop

If flag3 = True And flag2 = False Then

'Si se ha salido del bucle porque hemos llegado al último bit sin encontrar un bit a "1" entonces CRC=0

bresto = 0

flag1 = True

Else

'Si se ha salido del bucle porque hemos llegado al último bit y éste es igual a "1" entonces CRC=1

If flag3 = True And flag2 = True Then

bresto = 1

flag1 = True

Else

'Si se ha encontrado un bit a "1" sin llegar al último bit

If ind = arraybyte2.Length - 1 And indicebit > 0 Then

'Si el bit a "1" estaba en el ultimo byte de los datos éste byte es el CRC

bresto = arraybyte2(arraybyte2.Length - 1)

flag1 = True

Else

'Realiza la división de modulo 2

If indicebit = 0 Then

arraybyte2(ind) = arraybyte2(ind) Xor 7

End If

If indicebit = 1 Then

arraybyte2(ind) = arraybyte2(ind) Xor 3

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 128

End If

If indicebit = 2 Then

arraybyte2(ind) = arraybyte2(ind) Xor 1

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 192

End If

If indicebit = 3 Then

Page 276: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 224

End If

If indicebit = 4 Then

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 112

End If

If indicebit = 5 Then

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 56

End If

If indicebit = 6 Then

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 28

End If

If indicebit = 7 Then

arraybyte2(ind + 1) = arraybyte2(ind + 1) Xor 14

End If

flag2 = False

End If

End If

End If

Loop

Return bresto

End Function

Public Sub rec_trama_32(ByVal buf As Byte(), ByVal lvtabla As ListView)

'===========================================================================

' Descripción: Si la trama es correcta actualiza los flags de estado

' Creación: 2 /07 / 2005

'

' Notas: Guarda los datos en la tabla si está seleccionado el automático

'===========================================================================

Dim columna As Integer

'//Comprueba que el número de datos es igual a 1 (trama de "Estado y Alarmas")

If buf(1) <> 6 Or buf(2) <> 0 Then

sb1string = "Trama(32) recibida errónea"

smensaje = "Recibida trama tipo 32 errónea: Campo tamaño incorrecto"

Else

'Copia el array que contiene la trama y añadimos 8 ceros al final para el cálculo del CRC

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Page 277: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Next

crc_trama = calcula_CRC()

'Comprueba que el checksum y el CRC son correctos

If crc_trama <> 0 Then

sb1string = "Trama(32) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 32 errónea: CRC incorrecto"

Else

'//Actualiza los flags

'// Octeto 1

If buf(3) And 1 Then

flag1 = True

estadostring = "1" & estadostring

Else

flag1 = False

estadostring = "0" & estadostring

End If

If buf(3) And 2 Then

flag2 = True

estadostring = "1" & estadostring

Else

flag2 = False

estadostring = "0" & estadostring

End If

If buf(3) And 4 Then

flag3 = True

estadostring = "1" & estadostring

Else

flag3 = False

estadostring = "0" & estadostring

End If

If buf(3) And 8 Then

flag4 = True

estadostring = "1" & estadostring

Else

flag4 = False

estadostring = "0" & estadostring

End If

If buf(3) And 16 Then

flag5 = True

estadostring = "1" & estadostring

Page 278: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Else

flag5 = False

estadostring = "0" & estadostring

End If

If buf(3) And 32 Then

flag6 = True

estadostring = "1" & estadostring

Else

flag6 = False

estadostring = "0" & estadostring

End If

If buf(3) And 64 Then

flag7 = True

estadostring = "1" & estadostring

Else

flag7 = False

estadostring = "0" & estadostring

End If

If buf(3) And 128 Then

flag8 = True

estadostring = "1" & estadostring

Else

flag8 = False

estadostring = "0" & estadostring

End If

'// Octeto 2

If buf(4) And 1 Then

flag9 = True

estadostring = "1" & estadostring

Else

flag9 = False

estadostring = "0" & estadostring

End If

If buf(4) And 2 Then

flag10 = True

estadostring = "1" & estadostring

Else

flag10 = False

estadostring = "0" & estadostring

End If

If buf(4) And 4 Then

Page 279: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

flag11 = True

estadostring = "1" & estadostring

Else

flag11 = False

estadostring = "0" & estadostring

End If

If buf(4) And 8 Then

flag12 = True

estadostring = "1" & estadostring

Else

flag12 = False

estadostring = "0" & estadostring

End If

If buf(4) And 16 Then

flag13 = True

estadostring = "1" & estadostring

Else

flag13 = False

estadostring = "0" & estadostring

End If

If buf(4) And 32 Then

flag14 = True

estadostring = "1" & estadostring

Else

flag14 = False

estadostring = "0" & estadostring

End If

If buf(4) And 64 Then

flag15 = True

estadostring = "1" & estadostring

Else

flag15 = False

estadostring = "0" & estadostring

End If

If buf(4) And 128 Then

flag16 = True

estadostring = "1" & estadostring

Else

flag16 = False

estadostring = "0" & estadostring

End If

Page 280: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

sb1string = "Trama de avisos y errores recibida correctamente"

flag_act_alarmas = True

'smensaje = "Recibida trama tipo 32 correcta"

indice_trama_bloque = 0

flag_primer_paso = True

tamaño_trama = 0

'Guarda los datos en la tabla si la opción fué activada por el usuario

If automatico Then

'Calcula la fecha, hora, minutos y segundos de cuando se recibió la trama para introducirlos en la tabla

momentoactual = Now

fechaactual = momentoactual.Today

tiempoactual = momentoactual.Hour & ":"

If momentoactual.Minute < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Minute & ":"

If momentoactual.Second < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Second

'Introduce los nuevos datos en la tabla

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Estado y Alarmas"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = estadostring

Escribe_campo(Basignar, e, dato, columna)

'smensaje = "Recibida trama tipo 0 correcta (datos almacenados en la base de datos)"

End If

End If

End If

Page 281: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

tamaño_trama = 0

End Sub

Public Sub rec_trama_64(ByVal buf As Byte(), ByVal lvtabla As ListView)

'===========================================================================

' Descripción: Si la trama es correcta muestra los datos en el formulario.

' Creación: 2 /07 / 2005

'

' Notas: Guarda los datos en la tabla si esta seleccionado el automatico.

'==========================================================================

Dim columna As Integer

'Comprueba que el campo 'size' es correcto

If buf(1) <> 56 Or buf(2) <> 0 Then

sb1string = "Trama (64) recibida errónea"

smensaje = "Recibida trama tipo 64 errónea: Campo número de datos incorrecto"

Else

'Copia el array que contiene la trama y añadimos 8 ceros al final para el cálculo del CRC

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

'Comprueba que el CRC es correcto

If crc_trama <> 0 Then

sb1string = "Trama (64) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 64 errónea: CRC incorrecto"

Else

'Guarda los datos recibidos en un vector para su posterior visualización en el formulario

For iaux1 = 0 To 4

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato / 1000

Next

For iaux1 = 5 To 8

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

Page 282: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato / 100

Next

For iaux1 = 9 To 11

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato / 1000

Next

For iaux1 = 12 To 14

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato / 10

Next

For iaux1 = 15 To 16

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato

Next

For iaux1 = 17 To 17

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato / 10000

Next

For iaux1 = 18 To 25

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydoublemedidasrx(iaux1) = short_dato

Next

sb1string = "Trama 64 recibida correctamente"

flag_act_medidas = True

Page 283: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

flag_act_historico = True

'Guarda los datos recibidos en los correspondientes vectores para su representación gráfica

For iaux1 = 0 To 2

If rep_hist_rap(iaux1) <> 255 And rep_graf(0) = True Then

For iaux2 = 0 To tam_graf_1 - 2

d_grafica_1(iaux1, iaux2) = d_grafica_1(iaux1, iaux2 + 1)

Next

d_grafica_1(iaux1, tam_graf_1 - 1) = arraydoublemedidasrx(rep_hist_rap(iaux1))

End If

If rep_hist_rap(iaux1 + 3) <> 255 And rep_graf(1) = True Then

For iaux2 = 0 To tam_graf_2 - 2

d_grafica_2(iaux1, iaux2) = d_grafica_2(iaux1, iaux2 + 1)

Next

d_grafica_2(iaux1, tam_graf_2 - 1) = arraydoublemedidasrx(rep_hist_rap(iaux1 + 3))

End If

Next

'Guarda datos en tabla si la opción fué activada por el usuario

If automatico And Now.Subtract(momentoactual).Seconds >= intervalo_almacenamiento Then

Try

'Calcula la fecha, hora, minutos y segundos de cuando se recibió la trama para introducirlos en la tabla

momentoactual = Now

fechaactual = momentoactual.Today

tiempoactual = momentoactual.Hour & ":"

If momentoactual.Minute < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Minute & ":"

If momentoactual.Second < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Second

'Introduce los nuevos datos en la tabla

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

Page 284: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Idc1 (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(0)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Idc2 (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(1)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Idc3 (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(2)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

Page 285: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Idc4 (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(3)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Idc5 (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(4)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vc1 (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(5)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Page 286: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vc2 (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(6)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vc3 (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(7)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vc4 (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(8)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

Page 287: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Ia (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(9)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Ib (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(10)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Ic (A)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(11)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

Page 288: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Va (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(12)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vb (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(13)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Vc (V)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(14)

Escribe_campo(Basignar, e, dato, columna)

Page 289: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "P (W)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(15)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "Q (W)"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(16)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "fdp"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

Page 290: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

dato = arraydoublemedidasrx(17)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR1"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(18)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR2"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(19)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR3"

Escribe_campo(Basignar, e, dato, columna)

Page 291: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

columna = 4

dato = arraydoublemedidasrx(20)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR4"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(21)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR5"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(22)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR6"

Page 292: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(23)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR7"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(24)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "MR8"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydoublemedidasrx(25)

Escribe_campo(Basignar, e, dato, columna)

smensaje = "Recibida trama tipo 64 correcta (datos almacenados en la base de datos)"

Catch ex As Exception

MessageBox.Show("La tabla debe tener, al menos, 5 columnas")

automatico = False

flag_act_automatico = True

End Try

Page 293: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End If

End If

End If

tamaño_trama = 0

End Sub

Public Sub rec_trama_65(ByVal buf As Byte(), ByVal lvtabla As ListView)

'===========================================================================

' Descripción: Si la trama es correcta muestra los datos en el formulario.

' Creación: 20 / 12 / 2005

'

' Notas: Guarda los datos en la tabla si esta seleccionado el automatico.

'==========================================================================

Dim columna As Integer

'Comprueba que el campo 'size' es correcto

If buf(1) <> 20 Or buf(2) <> 0 Then

sb1string = "Trama (65) recibida errónea"

smensaje = "Recibida trama tipo 65 errónea: Campo número de datos incorrecto"

Else

'Copia el array que contiene la trama y añadimos 8 ceros al final para el cálculo del CRC

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

'Comprueba que el CRC es correcto

If crc_trama <> 0 Then

sb1string = "Trama (65) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 65 errónea: CRC incorrecto"

Else

'Guarda los datos recibidos en un vector para su posterior visualización en el formulario

For iaux1 = 0 To 7

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

arraydouble_medidas_lentas(iaux1) = short_dato

Next

Page 294: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

sb1string = "Trama 65 recibida correctamente"

flag_act_medidas = True

flag_act_historico = True

'Guarda los datos recibidos en los correspondientes vectores para su representación gráfica

For iaux1 = 0 To 2

If rep_hist_len(iaux1) <> 255 And rep_graf(2) = True Then

For iaux2 = 0 To tam_graf_3 - 2

d_grafica_3(iaux1, iaux2) = d_grafica_3(iaux1, iaux2 + 1)

Next

d_grafica_3(iaux1, tam_graf_3 - 1) = arraydouble_medidas_lentas(rep_hist_len(iaux1) - 26)

End If

If rep_hist_len(iaux1 + 3) <> 255 And rep_graf(3) = True Then

For iaux2 = 0 To tam_graf_4 - 2

d_grafica_4(iaux1, iaux2) = d_grafica_4(iaux1, iaux2 + 1)

Next

d_grafica_4(iaux1, tam_graf_4 - 1) = arraydouble_medidas_lentas(rep_hist_len(iaux1 + 3) - 26)

End If

Next

'Guarda datos en tabla si la opción fué activada por el usuario

If automatico And Now.Subtract(momentoactual).Seconds >= intervalo_almacenamiento Then

'Calcula la fecha, hora, minutos y segundos de cuando se recibió la trama para introducirlos en la tabla

momentoactual = Now

fechaactual = momentoactual.Today

tiempoactual = momentoactual.Hour & ":"

If momentoactual.Minute < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Minute & ":"

If momentoactual.Second < 10 Then

tiempoactual = tiempoactual & "0"

End If

tiempoactual = tiempoactual & momentoactual.Second

'Introduce los nuevos datos en la tabla

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Page 295: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML1"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(0)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML2"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(1)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML3"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(2)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

Page 296: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML4"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(3)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML5"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(4)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML6"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(5)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

Page 297: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML7"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(6)

Escribe_campo(Basignar, e, dato, columna)

Crea_fila(Bnuevoitem, e, lvtabla)

columna = 1

dato = fechaactual

Escribe_campo(Basignar, e, dato, columna)

columna = 2

dato = tiempoactual

Escribe_campo(Basignar, e, dato, columna)

columna = 3

dato = "ML8"

Escribe_campo(Basignar, e, dato, columna)

columna = 4

dato = arraydouble_medidas_lentas(7)

Escribe_campo(Basignar, e, dato, columna)

smensaje = "Recibida trama tipo 65 correcta (datos almacenados en la base de datos)"

End If

End If

End If

sb1string = "Trama(65) recibida bien"

tamaño_trama = 0

End Sub

Public Sub rec_trama_66(ByVal buf As Byte())

'===========================================================================

' Descripción: Trata la trama de Parámetros de calibración recibida

' Creación: 21 / 12 / 2005

'

Page 298: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Notas:

'==========================================================================

'Comprueba que el campo 'size' es correcto

If buf(1) <> 60 Or buf(2) <> 0 Then

sb1string = "Trama (66) recibida errónea"

smensaje = "Recibida trama tipo 66 errónea: Campo número de datos incorrecto"

Else

'Copia el array que contiene la trama y añadimos 8 ceros al final para el cálculo del CRC

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

'Comprueba que el CRC es correcto

If crc_trama <> 0 Then

sb1string = "Trama (66) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 66 errónea: CRC incorrecto"

Else

'Guarda los datos recibidos en un vector para su posterior visualización en el formulario

For iaux1 = 0 To 27

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

d_vect_par_cal(iaux1) = short_dato * 0.001

Next

sb1string = "Trama 66 recibida correctamente"

smensaje = "Recibida trama tipo 66 correcta"

End If

End If

sb1string = "Trama(66) recibida bien"

tamaño_trama = 0

'Actualiza text boxes de la pestaña Parámetros de calibración

flag_act_par_cal = True

End Sub

Page 299: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Public Sub rec_trama_67(ByVal buf As Byte())

'===========================================================================

' Descripción: Trata la trama de Otros parámetros recibida

' Creación: 21 / 12 / 2005

'

' Notas:

'==========================================================================

'Comprueba que el campo 'size' es correcto

If buf(1) <> 44 Or buf(2) <> 0 Then

sb1string = "Trama (67) recibida errónea"

smensaje = "Recibida trama tipo 67 errónea: Campo número de datos incorrecto"

Else

'Copia el array que contiene la trama y añadimos 8 ceros al final para el cálculo del CRC

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

'Comprueba que el CRC es correcto

If crc_trama <> 0 Then

sb1string = "Trama (67) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 67 errónea: CRC incorrecto"

Else

'Guarda los datos recibidos en un vector para su posterior visualización en el formulario

For iaux1 = 0 To 19

short_dato = buf(((iaux1 + 1) * 2) + 2)

short_dato = short_dato << 8

short_dato = short_dato + buf(((iaux1 + 1) * 2) + 1)

d_vect_otros_par(iaux1) = short_dato * 0.001

Next

sb1string = "Trama 67 recibida correctamente"

smensaje = "Recibida trama tipo 67 correcta"

End If

End If

sb1string = "Trama(67) recibida bien"

tamaño_trama = 0

Page 300: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

'Actualiza text boxes de la pestaña Parámetros de calibración

flag_act_par_cal = True

End Sub

Public Sub decisor_trama(ByVal array As Byte(), ByVal lvtabla As ListView)

'===================================================================================================

' Descripción: En función del primer byte de la trama recibida ejecuta la funcion correspondiente

'

' Creación: 18 / 12 / 2005

'===================================================================================================

Select Case array(0)

Case 1

rec_trama_1(array)

Case 2

rec_trama_2(array)

Case 16

rec_trama_16(array)

Case 32

rec_trama_32(array, lvtabla)

Case 64

rec_trama_64(array, lvtabla)

Case 65

rec_trama_65(array, lvtabla)

Case 66

rec_trama_66(array)

Case 67

rec_trama_67(array)

Case 129

rec_trama_129(array)

Case Else

sb1string = "Trama incorrecta: byte de tipo erróneo"

End Select

End Sub

Public Sub rec_trama_1(ByVal buf As Byte())

'===========================================================================================================

' Descripción: Muestra los mensajes asociados a la recepción de una trama de Comprobación de comunicación

Page 301: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

' Creación: 18 / 12 / 2005

'

' Notas:

'===========================================================================================================

If buf(1) = 6 And buf(2) = 0 And buf(3) = 2 And buf(4) = 0 And buf(5) = 60 Then

sb1string = "Comunicación con el DSP activa y confirmada"

flag_comunicacion = True

flag_act_comunicacion = True

Else

sb1string = "Error en recepcion de trama tipo 1"

End If

End Sub

Public Sub rec_trama_2(ByVal buf As Byte())

'===================================================================================================

' Descripción: Escribe en el historico el mensaje correspondiente a la recepción de una trama

' de Errores en la comunicación

' Creación: 18 / 12 / 2005

'

' Notas:

'===================================================================================================

If buf(1) = 6 And buf(2) = 0 And buf(4) = 0 Then

'Comprueba que el CRC es correcto

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

If crc_trama <> 0 Then

sb1string = "Trama recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 2 errónea: CRC incorrecto"

Else

Select Case buf(3)

Case 1

smensaje = "DSP: Error en el tamaño de trama recibida"

Case 2

smensaje = "DSP: Error en cálculo de CRC"

Page 302: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 3

smensaje = "DSP: Error en rango del parámetro recibido"

Case 4

smensaje = "DSP: Buffer de recepción desbordado"

Case Else

smensaje = "Error en trama tipo 2 (error desconocido)"

End Select

End If

Else

sb1string = "Error en recepcion de trama tipo 2"

smensaje = "Error en recepcion de trama tipo 2"

End If

End Sub

Public Sub rec_trama_16(ByVal buf As Byte())

'===================================================================================================

' Descripción: Escribe en el historico el mensaje correspondiente a la recepción de una trama

' de Estado

' Creación: 18 / 12 / 2005

'

' Notas:

'===================================================================================================

If buf(1) = 6 And buf(2) = 0 And buf(4) = 0 Then

'Comprueba que el CRC es correcto

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

If crc_trama <> 0 Then

sb1string = "Trama recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 16 errónea: CRC incorrecto"

Else

For iaux1 = 0 To 3

flag_estado_con(iaux1) = False

Next

Select Case buf(3)

Case 1

flag_estado_con(0) = True

Page 303: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 2

flag_estado_con(1) = True

Case 3

flag_estado_con(2) = True

Case 4

flag_estado_con(3) = True

Case Else

smensaje = "Error trama tipo 16: Estado desconocido"

End Select

flag_act_estado_conv = True

End If

Else

sb1string = "Error en recepcion de trama tipo 16"

smensaje = "Error en recepcion de trama tipo 16"

End If

End Sub

Public Sub rec_trama_129(ByVal buf As Byte())

'===================================================================================================

' Descripción: Guarda en el vector var_osc los datos del canal recibido

' Creación: 18 / 12 / 2005

'

' Notas:

'===================================================================================================

If buf(1) = 250 And buf(2) = 1 And buf(3) <> 0 And buf(3) < 7 Then

'Comprueba que el CRC es correcto

ReDim arraybyte2(buf.Length)

For ind2 = 0 To buf.Length - 1

arraybyte2(ind2) = buf(ind2)

Next

crc_trama = calcula_CRC()

If crc_trama <> 0 Then

sb1string = "Trama (129) recibida errónea: Error en CRC"

smensaje = "Recibida trama tipo 129 errónea: CRC incorrecto"

Else

scanal = buf(3)

sb1string = "Trama (129) recibida correctamente"

smensaje = "Recibida trama tipo 129 correcta. Datos del canal " & scanal & " recibidos"

Page 304: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

obten_vector_datos(buf)

flag_act_osciloscopio = True

End If

Else

sb1string = "Error en recepcion de trama tipo 129"

smensaje = "Error en recepcion de trama tipo 129"

End If

End Sub

Public Sub obten_vector_datos(ByVal buf As Byte())

'===================================================================================================

' Descripción: Almacena los datos en el vector var_osc tra aplicar el factor de multiplicacion

' Creación: 18 / 12 / 2005

'

' Notas:

'===================================================================================================

indice1 = buf(3)

codigo = v_osc_var(indice1 - 1)

If codigo < 5 Or (codigo > 8 And codigo < 12) Then

divisor = 1000

ElseIf codigo > 4 And codigo < 9 Then

divisor = 100

ElseIf codigo > 11 And codigo < 15 Then

divisor = 10

Else

divisor = 1

End If

For iaux1 = 0 To 249

indice2 = iaux1 * 2 + 5

short_dato = buf(indice2 + 1)

short_dato = short_dato << 8

short_dato = short_dato + buf(indice2)

var_osc(indice1 - 1, iaux1) = short_dato / divisor

Next

End Sub

Page 305: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

End Module

Page 306: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.9 Módulo TablaUtils

Imports proyecto9.ADONETUtil

Module TablaUtils

Public flag_act_automatico As Boolean = False

'//===============================================================================================

'// Funciones para añadir datos a la tabla

'//===============================================================================================

Public Sub Crea_fila(ByVal sender As System.Object, ByVal e As System.EventArgs, ByVal lvtabla As ListView)

'=============================================================================================

' Descripción: Añade una nueva fila al final de la tabla

' Creación: 18 /07 / 2005

'

' Notas:

'=============================================================================================

Dim fila As Data.DataRow

Dim i As Integer

Dim lwItem As ListViewItem

Dim columna As Data.DataColumn

fila = dbDataSet.Tables(NombreTabla).NewRow

fila.BeginEdit()

For i = 0 To dbDataSet.Tables(NombreTabla).Columns.Count - 1

columna = dbDataSet.Tables(NombreTabla).Columns(i)

'Debug.WriteLine(columna.DataType.ToString)

If columna.AutoIncrement = False Then

Select Case columna.DataType.ToString

Case "System.String"

fila(i) = columna.ColumnName

Case "System.Boolean"

fila(i) = False

Case "System.Byte", "System.SByte"

Page 307: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

fila(i) = CByte(0)

Case "System.Char"

fila(i) = " "c

Case "System.DateTime", "System.TimeSpam"

fila(i) = Now

Case "System.Decimal", "System.Double", "System.Single"

fila(i) = 0

Case Else

If columna.DataType.ToString.IndexOf("System.Int") > -1 Then

fila(i) = 0

ElseIf columna.DataType.ToString.IndexOf("System.UInt") > -1 Then

fila(i) = 0

End If

End Select

End If

Next

fila.EndEdit()

'Añade la fila a la tabla

dbDataSet.Tables(NombreTabla).Rows.Add(fila)

'Muestra la nueva fila en el ListView

For i = 0 To lvtabla.Columns.Count - 1

If i = 0 Then

lwItem = lvtabla.Items.Add(fila(i).ToString)

lwItem.Tag = fila

Else

lwItem.SubItems.Add(fila(i).ToString)

End If

Next

lwItemActual = lwItem

End Sub

Public Sub Escribe_campo(ByVal sender As Object, ByVal e As System.EventArgs, ByVal dato As String, ByVal columna As Integer)

'=============================================================================================

' Descripción: Asigna al ListView el campo modificado

' Creación: 18 / 07 / 2005

'

' Notas:

'===========================================================================================

Page 308: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

==

Dim i As Integer

i = columna

If i = 0 Then

lwItemActual.Text = dato

ElseIf i > -1 Then

lwItemActual.SubItems(i).Text = dato

End If

End Sub

End Module

Page 309: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

III.10 Módulo TxUtils

Module TxUtils

'//===============================================================================================

'// Funciones para la generación de la trama a enviar

'//===============================================================================================

Public tipo_trama2, tipo_trama1 As Integer

Public datobytem, datobytel As Byte

Public array_trama() As Byte

Public cola_txon(1, 1) As Integer

Public s_aux As String

'Variables para generar las tramas 66 y 67

Public d_vect_par_cal(27) As Double

Public d_vect_otros_par(19) As Double

'Variables para generar la trama 128

Public v_osc_var() As Integer = {255, 255, 255, 255, 255, 255, 200}

Public s_osc_var(6) As String

Public i_canal_disparo As Integer = 0

Public i_tipo_flanco As Integer = 1

Public d_nivel_disparo As Double = 10.1

Public i_nivel_disparo As Integer = 99

Public exponente() As Integer = {3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 1, 1, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3}

Public Function convierte_byte_a_entero(ByVal octeto As Byte) As Integer

'=============================================================================================

' Descripción: Convierte un byte en un integer

' Creación: 2 / 07 / 2005

'

' Notas:

'=============================================================================================

Page 310: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Dim entero As Integer = 0

If octeto And 1 Then entero += 1

If octeto And 2 Then entero += 2

If octeto And 4 Then entero += 4

If octeto And 8 Then entero += 8

If octeto And 16 Then entero += 16

If octeto And 32 Then entero += 32

If octeto And 64 Then entero += 64

If octeto And 128 Then entero += 128

Return entero

End Function

Public Sub genera_trama(ByVal tipo_trama1 As Integer, ByVal tipo_trama2 As Integer)

'=============================================================================================

' Descripción: Genera la trama cuyo tipo se le pasa como parámetro

' Creación: 18 / 12 / 2005

'

' Notas:

'=============================================================================================

Dim byte_crc, divisor As Integer

'En función del tipo de trama introduce la cabecera y los bytes de datos

Select Case tipo_trama1

Case 1

array_trama(0) = 1

array_trama(1) = 6

array_trama(2) = 0

array_trama(3) = 1

array_trama(4) = 0

byte_crc = 5

Case 8

array_trama(0) = 8

array_trama(1) = 6

array_trama(2) = 0

Select Case tipo_trama2

Case 1

array_trama(3) = 1

Case 2

array_trama(3) = 2

Page 311: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 3

array_trama(3) = 3

End Select

array_trama(4) = 0

byte_crc = 5

Case 66

array_trama(0) = 66

array_trama(1) = 60

array_trama(2) = 0

For iaux1 = 0 To 27

iaux2 = d_vect_par_cal(iaux1) * 1000

array_trama(iaux1 * 2 + 3) = iaux2 And 255

array_trama(iaux1 * 2 + 4) = (iaux2 And 65280) >> 8

Next

byte_crc = 59

'Actualiza text boxes de la pestaña Parámetros de calibración

flag_act_par_cal = True

Case 67

array_trama(0) = 67

array_trama(1) = 44

array_trama(2) = 0

For iaux1 = 0 To 19

iaux2 = d_vect_otros_par(iaux1) * 1000

array_trama(iaux1 * 2 + 3) = iaux2 And 255

array_trama(iaux1 * 2 + 4) = (iaux2 And 65280) >> 8

Next

byte_crc = 43

'Actualiza text boxes de la pestaña Parámetros de calibración

flag_act_par_cal = True

Case 68

array_trama(0) = 68

array_trama(1) = 6

array_trama(2) = 0

Select Case tipo_trama2

Case 1

array_trama(3) = 1

Page 312: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

Case 2

array_trama(3) = 2

End Select

array_trama(4) = 0

byte_crc = 5

Case 128

array_trama(0) = 128

array_trama(1) = 24

array_trama(2) = 0

array_trama(3) = v_osc_var(0)

array_trama(4) = 0

array_trama(5) = v_osc_var(1)

array_trama(6) = 0

array_trama(7) = v_osc_var(2)

array_trama(8) = 0

array_trama(9) = v_osc_var(3)

array_trama(10) = 0

array_trama(11) = v_osc_var(4)

array_trama(12) = 0

array_trama(13) = v_osc_var(5)

array_trama(14) = 0

array_trama(15) = i_canal_disparo

array_trama(16) = 0

array_trama(17) = i_tipo_flanco

array_trama(18) = 0

'Introduce nivel de disparo (dos bytes)

If i_canal_disparo <> 0 Then

i_nivel_disparo = d_nivel_disparo * 10

Else

i_nivel_disparo = 0

End If

'convierte_a_byte(i_nivel_disparo)

array_trama(19) = i_nivel_disparo And 255

array_trama(20) = (i_nivel_disparo And 65280) >> 8

'Introduce ancho de ventana (dos bytes)

array_trama(21) = v_osc_var(6) And 255

array_trama(22) = (v_osc_var(6) And 65280) >> 8

byte_crc = 23

Page 313: ANEXO III. Código del programabibing.us.es/proyectos/abreproy/11199/fichero/Volumen+I...ANEXO III. Código del programa III.1 Módulo Form1 '//Importa el dominio System.Xml Imports

n_var_osc = 6

End Select

'Introduce CRC en la trama

ReDim arraybyte2(array_trama.Length - 1)

'Copia el array que contiene la trama y añadimos 8 ceros al final

For iaux2 = 0 To array_trama.Length - 1

arraybyte2(iaux2) = array_trama(iaux2)

Next

arraybyte2(array_trama.Length - 1) = 0

array_trama(byte_crc) = calcula_CRC()

End Sub

End Module