Class TFmEscuchar (unit Escuchar) |
Inherits from
TForm
procedure AbrirPuerto1Click(Sender: TObject);
Text File
procedure AbrirPuerto2Click(Sender: TObject);
#Open Port 1
#Abrir el puerto 1
procedure Acercade1Click(Sender: TObject);
# Small help to show the characters of ASCII control
# Pequeña ayuda para mostrar los caracteres de control ASCII
procedure AsciiHexadecimal1Click(Sender: TObject);
# To configure the Show in manner 100% Hexadecimal
# Configurar el Show en modo 100% Hexadecimal
procedure BloqueTlgClick(Sender: TObject);
# Last Port, to control the Lag between characters
# Ultimo Puerto, para controlar el Retraso entre caracteres} {# We activate the control of lag between characters
# Activamos el control de retraso entre caracteres
procedure BorrarPantalla1Click(Sender: TObject);
# To configure the Show in ASCII merged manner and Hexadecimal
# Configurar el Show en modo combinado ASCII y Hexadecimal
procedure CaracteresAscii1Click(Sender: TObject);
# Operation of the Port in Terminal Manner, sending the written characters
for the port selected
# Funcionamiento del Puerto en Modo Terminal, enviando los caracteres escritos
por el puerto seleccionado
procedure CarcteresdeControl1Click(Sender: TObject);
# Proceeding of closing the file
# Procedimiento de cerrar el fichero
procedure Cerrar1Click(Sender: TObject);
# Function - IOresult - returns 0 if the file function is correct
# Funcion -IOresult- devuelve 0 si la función de archivo es correcta
procedure CerrarPuerto1Click(Sender: TObject);
#Open Port 2
#Abrir el puerto 2
procedure CerrarPuerto2Click(Sender: TObject);
#Close Port 1
#Cerrar el puerto 1
procedure ConfigurarPuerto1Click(Sender: TObject);
#To Get the values of the characters to dial in each port
#Coger los valores de los carácteres a escuchar en cada puerto
procedure ConfigurarPuerto2Click(Sender: TObject);
#To update the configuration of the port
#Actualizar la configuración del puerto
procedure Cortar1Click(Sender: TObject);
# To define I send dated as of and hour
# Definir envio de Fecha y hora
procedure CtrlASCIIHexadecimal1Click(Sender: TObject);
# To configure the time of I send of cables
# Configurar el tiempo de envio de telegramas
procedure EditCaracter1Change(Sender: TObject);
#Close Port 2
#Cerrar el Puerto 2
procedure EditTiempoChange(Sender: TObject);
# To cut I send it of Tlg
# Cortar el envio de Tlg
procedure Espaol1Click(Sender: TObject);
# To jump of line each data block received
# Saltar de linea cada bloque de datos recibido
procedure FechayHora1Click(Sender: TObject);
# Jump from 1 line in the file
# Salto de 1 linea en el fichero
procedure FicheroTexto1Click(Sender: TObject);
# To Send Tlg format that we define as Type 1 according to our necessities
# Enviar Tlg formato que definamos como Tipo 1 según nuestras necesidades
procedure FormActivate(Sender: TObject);
# Algoritmo de Marsaglia-Bray
procedure FormClose(Sender: TObject; var Action: TCloseAction);
#Close the Form and exit
#Cerrar el formulario y salir
procedure Hexadecimal1Click(Sender: TObject);
# To configure and to activate the Timer
# Configurar y activar el Timer
procedure MjwKeyPress(Sender: TObject; var Key: Char);
# To alternate the Terminal Manner Menu to Monitor Manner and conversely
# Alternar el Menú de Modo Terminal a Modo Monitor y viceversa
procedure ModoTerminal1Click(Sender: TObject);
procedure Nuevo1Click(Sender: TObject);
#To update the configuration of the port
#Actualizar la configuración del puerto
procedure Polling1Click(Sender: TObject);
Show Caracter ASCII
procedure Port1ReceiveData(Sender: TObject; DataPtr: Pointer;
DataSize: Integer);
# Conditions of beginning in RunTime
# Condiciones de inicio en RunTime
procedure Port2ReceiveData(Sender: TObject; DataPtr: Pointer;
DataSize: Integer);
# Reading proceeding of the port 1 and data processing
# Procedimiento de lectura del puerto 2 y procesamiento de datos
procedure Salir1Click(Sender: TObject);
procedure SEDelayChange(Sender: TObject);
# I send of Polling to a number of given stations
# Envio de Polling a un número de estaciones determinado
procedure SEFrecuenciaChange(Sender: TObject);
# To configure the menus of the program in English
# Configurar los menus del programa en Ingles
procedure Timer1Timer(Sender: TObject);
# Show About window
# Mostrar ventana de Acerca de
procedure TimerDelayTimer(Sender: TObject);
# Lag in the acceptance of characters by the port.
procedure TimerTrocearTimer(Sender: TObject);
# To activate I send it of the file
# Activar el envio del fichero
procedure TlgTest1Click(Sender: TObject);
# To configure the Show in merged manner Characters of Ctrl, ASCII and Hexadecimal
# Configurar el Show en modo combinado Caracteres de Ctrl, ASCII y Hexadecimal
procedure TLGTipo1Click(Sender: TObject);
# Clear screen
# Borrar el visor
procedure TLGTipo2Click(Sender: TObject);
# To Send Tlg format that we define as Type 1 according to our necessities
# Enviar Tlg formato que definamos como Tipo 1 según nuestras necesidades
procedure ClosePort1;
#Open Port 1
#Abrir el puerto 1
procedure ClosePort2;
#Open Port2
#Abrir el puerto 2
procedure ConfiguraEnvio;
# Configuration of time frequency of I send of the Tlg.
procedure EnviaFichero(FileText : String);
# To send a text file
# Enviar un fichero de texto
procedure EnviaPolling;
# To Send Tlg format that we define as Type 2 according to our necessities
# Enviar Tlg formato que definamos como Tipo 2 según nuestras necesidades
procedure OpenPort1;
#Close Port 2
#Cerrar el puerto 2
procedure OpenPort2;
#Close Port 1
#Cerrar el Puerto 1
procedure Pack1;
# Help screen showing the gambling of characters Ascii
# Pantalla de ayuda mostrando el juego de caracteres Ascii
procedure Pack2;
# Package dated as of and Hour
# Paquete de Fecha y Hora
procedure Pack3;
# Package of Tlg Type 1 of example
# Paquete de TLG Tipo 1 de ejemplo
procedure Pack4;
# Package of Tlg Type 2 of example
# Paquete de TLG Tipo 2 de ejemplo
procedure Pack5;
# Package of TLG Test, send the gambling of 255 ASCII Characters
# Paquete de TLG Test, envia el juego de los 255 Caracteres ASCII
procedure Pack6;
# To send a Text File
# Enviar un Fichero de Texto
function RandG(Mean, StdDev: Extended): Extended;
# To Send Tlg format that we define as Type 2 according to our necessities
# Enviar Tlg formato que definamos como Tipo 2 según nuestras necesidades
procedure WriteInMjWinCrt(DataPtr: Pointer; DataSize: Integer);
# Reading proceeding of the port 2 and data processing
# Procedimiento de lectura del puerto 2 y procesamiento de datos
AbrirPuerto1 : TMenuItem;
AbrirPuerto2 : TMenuItem;
Acercade1 : TMenuItem;
Archivo1 : TMenuItem;
AsciiHexadecimal1 : TMenuItem;
Ayuda1 : TMenuItem;
BitBtn1 : TBitBtn;
BloqueTlg : TMenuItem;
BorrarPantalla1 : TMenuItem;
CaracteresAscii1 : TMenuItem;
CarcteresdeControl1 : TMenuItem;
Cerrar1 : TMenuItem;
CerrarPuerto1 : TMenuItem;
CerrarPuerto2 : TMenuItem;
Configurar1 : TMenuItem;
ConfigurarPuerto1 : TMenuItem;
ConfigurarPuerto2 : TMenuItem;
Cortar1 : TMenuItem;
CtrlASCIIHexadecimal1 : TMenuItem;
EditCaracter1 : TEdit;
EditCaracter11 : TEdit;
EditCaracter12 : TEdit;
EditCaracter13 : TEdit;
EditCaracter14 : TEdit;
EditCaracter2 : TEdit;
EditCaracter3 : TEdit;
EditCaracter4 : TEdit;
EditFichero : TEdit;
EditLng : TEdit;
EditTlg : TEdit;
Enviar1 : TMenuItem;
Espaol1 : TMenuItem;
FechayHora1 : TMenuItem;
FicheroTexto1 : TMenuItem;
GBPuerto1 : TGroupBox;
GBPuerto2 : TGroupBox;
GBSend : TGroupBox;
Hexadecimal1 : TMenuItem;
Idioma1 : TMenuItem;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
Label8 : TLabel;
Label9 : TLabel;
MainMenu1 : TMainMenu;
Mjw : TMJWcrt;
ModoTerminal1 : TMenuItem;
N1 : TMenuItem;
N3 : TMenuItem;
Nuevo1 : TMenuItem;
OpenDialog1 : TOpenDialog;
Polling1 : TMenuItem;
Port1 : TCommPortDriver;
Port2 : TCommPortDriver;
Puertos1 : TMenuItem;
RBPuerto1 : TRadioButton;
RBPuerto2 : TRadioButton;
Salir1 : TMenuItem;
ScrollBox1 : TScrollBox;
SEDelay : TSpinEdit;
SEFrecuencia : TSpinEdit;
Timer1 : TTimer;
TimerDelay : TTimer;
TimerTrocear : TTimer;
TlgTest1 : TMenuItem;
TLGTipo1 : TMenuItem;
TLGTipo2 : TMenuItem;
Ver1 : TMenuItem;
Activo : Boolean;
Bloque : Boolean;
C : String;
C1 : Integer;
C11 : Integer;
C12 : Integer;
C13 : Integer;
C14 : Integer;
C2 : Integer;
C3 : Integer;
C4 : Integer;
Car : Char;
ContinuaTlg : Boolean;
Ctrl : Boolean;
Enviar : Boolean;
Fic : Boolean;
Hexa : Boolean;
Ind : Integer;
Lng : Integer;
nPollingActual : Integer;
nPollingMax : Integer;
OutFile : TextFile;
Paquete : String;
PuertoReceive : String;
PuertoUltimo : String;
strFic : String;
Temp : String;
Tlg : String;
Valor : Integer;
procedure AbrirPuerto1Click(Sender: TObject);
Text File
procedure AbrirPuerto2Click(Sender: TObject);
#Open Port 1
#Abrir el puerto 1
procedure Acercade1Click(Sender: TObject);
# Small help to show the characters of ASCII control
# Pequeña ayuda para mostrar los caracteres de control ASCII
procedure AsciiHexadecimal1Click(Sender: TObject);
# To configure the Show in manner 100% Hexadecimal
# Configurar el Show en modo 100% Hexadecimal
procedure BloqueTlgClick(Sender: TObject);
# Last Port, to control the Lag between characters
# Ultimo Puerto, para controlar el Retraso entre caracteres} {# We activate the control of lag between characters
# Activamos el control de retraso entre caracteres
procedure BorrarPantalla1Click(Sender: TObject);
# To configure the Show in ASCII merged manner and Hexadecimal
# Configurar el Show en modo combinado ASCII y Hexadecimal
procedure CaracteresAscii1Click(Sender: TObject);
# Operation of the Port in Terminal Manner, sending the written characters
for the port selected
# Funcionamiento del Puerto en Modo Terminal, enviando los caracteres escritos
por el puerto seleccionado
procedure CarcteresdeControl1Click(Sender: TObject);
# Proceeding of closing the file
# Procedimiento de cerrar el fichero
procedure Cerrar1Click(Sender: TObject);
# Function - IOresult - returns 0 if the file function is correct
# Funcion -IOresult- devuelve 0 si la función de archivo es correcta
procedure CerrarPuerto1Click(Sender: TObject);
#Open Port 2
#Abrir el puerto 2
procedure CerrarPuerto2Click(Sender: TObject);
#Close Port 1
#Cerrar el puerto 1
procedure ConfigurarPuerto1Click(Sender: TObject);
#To Get the values of the characters to dial in each port
#Coger los valores de los carácteres a escuchar en cada puerto
procedure ConfigurarPuerto2Click(Sender: TObject);
#To update the configuration of the port
#Actualizar la configuración del puerto
procedure Cortar1Click(Sender: TObject);
# To define I send dated as of and hour
# Definir envio de Fecha y hora
procedure CtrlASCIIHexadecimal1Click(Sender: TObject);
# To configure the time of I send of cables
# Configurar el tiempo de envio de telegramas
procedure EditCaracter1Change(Sender: TObject);
#Close Port 2
#Cerrar el Puerto 2
procedure EditTiempoChange(Sender: TObject);
# To cut I send it of Tlg
# Cortar el envio de Tlg
procedure Espaol1Click(Sender: TObject);
# To jump of line each data block received
# Saltar de linea cada bloque de datos recibido
procedure FechayHora1Click(Sender: TObject);
# Jump from 1 line in the file
# Salto de 1 linea en el fichero
procedure FicheroTexto1Click(Sender: TObject);
# To Send Tlg format that we define as Type 1 according to our necessities
# Enviar Tlg formato que definamos como Tipo 1 según nuestras necesidades
procedure FormActivate(Sender: TObject);
# Algoritmo de Marsaglia-Bray
procedure FormClose(Sender: TObject; var Action: TCloseAction);
#Close the Form and exit
#Cerrar el formulario y salir
procedure Hexadecimal1Click(Sender: TObject);
# To configure and to activate the Timer
# Configurar y activar el Timer
procedure MjwKeyPress(Sender: TObject; var Key: Char);
# To alternate the Terminal Manner Menu to Monitor Manner and conversely
# Alternar el Menú de Modo Terminal a Modo Monitor y viceversa
procedure ModoTerminal1Click(Sender: TObject);
procedure Nuevo1Click(Sender: TObject);
#To update the configuration of the port
#Actualizar la configuración del puerto
procedure Polling1Click(Sender: TObject);
Show Caracter ASCII
procedure Port1ReceiveData(Sender: TObject; DataPtr: Pointer;
DataSize: Integer);
# Conditions of beginning in RunTime
# Condiciones de inicio en RunTime
procedure Port2ReceiveData(Sender: TObject; DataPtr: Pointer;
DataSize: Integer);
# Reading proceeding of the port 1 and data processing
# Procedimiento de lectura del puerto 2 y procesamiento de datos
procedure Salir1Click(Sender: TObject);
procedure SEDelayChange(Sender: TObject);
# I send of Polling to a number of given stations
# Envio de Polling a un número de estaciones determinado
procedure SEFrecuenciaChange(Sender: TObject);
# To configure the menus of the program in English
# Configurar los menus del programa en Ingles
procedure Timer1Timer(Sender: TObject);
# Show About window
# Mostrar ventana de Acerca de
procedure TimerDelayTimer(Sender: TObject);
# Lag in the acceptance of characters by the port. Some Communications
of industrial type, or where there are Nets and distributing of ports, delay
the continuity of the communication
# Retraso en la recepción de caracteres por el puerto. Algunas comunicaciones
de tipo industrial, o donde hay Redes y repartidores de puertos, retrasan la
continuidad de la comunicación
procedure TimerTrocearTimer(Sender: TObject);
# To activate I send it of the file
# Activar el envio del fichero
procedure TlgTest1Click(Sender: TObject);
# To configure the Show in merged manner Characters of Ctrl, ASCII and Hexadecimal
# Configurar el Show en modo combinado Caracteres de Ctrl, ASCII y Hexadecimal
procedure TLGTipo1Click(Sender: TObject);
# Clear screen
# Borrar el visor
procedure TLGTipo2Click(Sender: TObject);
# To Send Tlg format that we define as Type 1 according to our necessities
# Enviar Tlg formato que definamos como Tipo 1 según nuestras necesidades
procedure ClosePort1;
#Open Port 1
#Abrir el puerto 1
procedure ClosePort2;
#Open Port2
#Abrir el puerto 2
procedure ConfiguraEnvio;
# Configuration of time frequency of I send of the Tlg. 1" := 1000
# Configuración de frecuencia de tiempo de envio del Tlg. 1" := 1000
procedure EnviaFichero(FileText : String);
# To send a text file
# Enviar un fichero de texto
procedure EnviaPolling;
# To Send Tlg format that we define as Type 2 according to our necessities
# Enviar Tlg formato que definamos como Tipo 2 según nuestras necesidades
procedure OpenPort1;
#Close Port 2
#Cerrar el puerto 2
procedure OpenPort2;
#Close Port 1
#Cerrar el Puerto 1
procedure Pack1;
# Help screen showing the gambling of characters Ascii
# Pantalla de ayuda mostrando el juego de caracteres Ascii
procedure Pack2;
# Package dated as of and Hour
# Paquete de Fecha y Hora
procedure Pack3;
# Package of Tlg Type 1 of example
# Paquete de TLG Tipo 1 de ejemplo
procedure Pack4;
# Package of Tlg Type 2 of example
# Paquete de TLG Tipo 2 de ejemplo
procedure Pack5;
# Package of TLG Test, send the gambling of 255 ASCII Characters
# Paquete de TLG Test, envia el juego de los 255 Caracteres ASCII
procedure Pack6;
# To send a Text File
# Enviar un Fichero de Texto
function RandG(Mean, StdDev: Extended): Extended;
# To Send Tlg format that we define as Type 2 according to our necessities
# Enviar Tlg formato que definamos como Tipo 2 según nuestras necesidades
procedure WriteInMjWinCrt(DataPtr: Pointer; DataSize: Integer);
# Reading proceeding of the port 2 and data processing
# Procedimiento de lectura del puerto 2 y procesamiento de datos
AbrirPuerto1 : TMenuItem;
AbrirPuerto2 : TMenuItem;
Acercade1 : TMenuItem;
Archivo1 : TMenuItem;
AsciiHexadecimal1 : TMenuItem;
Ayuda1 : TMenuItem;
BitBtn1 : TBitBtn;
BloqueTlg : TMenuItem;
BorrarPantalla1 : TMenuItem;
CaracteresAscii1 : TMenuItem;
CarcteresdeControl1 : TMenuItem;
Cerrar1 : TMenuItem;
CerrarPuerto1 : TMenuItem;
CerrarPuerto2 : TMenuItem;
Configurar1 : TMenuItem;
ConfigurarPuerto1 : TMenuItem;
ConfigurarPuerto2 : TMenuItem;
Cortar1 : TMenuItem;
CtrlASCIIHexadecimal1 : TMenuItem;
EditCaracter1 : TEdit;
EditCaracter11 : TEdit;
EditCaracter12 : TEdit;
EditCaracter13 : TEdit;
EditCaracter14 : TEdit;
EditCaracter2 : TEdit;
EditCaracter3 : TEdit;
EditCaracter4 : TEdit;
EditFichero : TEdit;
EditLng : TEdit;
EditTlg : TEdit;
Enviar1 : TMenuItem;
Espaol1 : TMenuItem;
FechayHora1 : TMenuItem;
FicheroTexto1 : TMenuItem;
GBPuerto1 : TGroupBox;
GBPuerto2 : TGroupBox;
GBSend : TGroupBox;
Hexadecimal1 : TMenuItem;
Idioma1 : TMenuItem;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
Label8 : TLabel;
Label9 : TLabel;
MainMenu1 : TMainMenu;
Mjw : TMJWcrt;
ModoTerminal1 : TMenuItem;
N1 : TMenuItem;
N3 : TMenuItem;
Nuevo1 : TMenuItem;
OpenDialog1 : TOpenDialog;
Polling1 : TMenuItem;
Port1 : TCommPortDriver;
Port2 : TCommPortDriver;
Puertos1 : TMenuItem;
RBPuerto1 : TRadioButton;
RBPuerto2 : TRadioButton;
Salir1 : TMenuItem;
ScrollBox1 : TScrollBox;
SEDelay : TSpinEdit;
SEFrecuencia : TSpinEdit;
Timer1 : TTimer;
TimerDelay : TTimer;
TimerTrocear : TTimer;
TlgTest1 : TMenuItem;
TLGTipo1 : TMenuItem;
TLGTipo2 : TMenuItem;
Ver1 : TMenuItem;
Activo : Boolean;
Bloque : Boolean;
C : String;
C1 : Integer;
C11 : Integer;
C12 : Integer;
C13 : Integer;
C14 : Integer;
C2 : Integer;
C3 : Integer;
C4 : Integer;
Car : Char;
ContinuaTlg : Boolean;
Ctrl : Boolean;
Enviar : Boolean;
Fic : Boolean;
Hexa : Boolean;
Ind : Integer;
Lng : Integer;
nPollingActual : Integer;
nPollingMax : Integer;
OutFile : TextFile;
Paquete : String;
PuertoReceive : String;
PuertoUltimo : String;
strFic : String;
Temp : String;
Tlg : String;
Valor : Integer;