Follow along with the video below to see how to install our site as a web app on your home screen.
							
						
Nota: This feature currently requires accessing the site using the built-in Safari browser.
Gracias por responder
Tengo 4 surtidores de la misma marca, conectados en serie te digo esto porq es lo q sabemos de la empresa q instalo el sistema esto va conectado a una caja q tiene una tarjeta q tiene 4 entradas
Ya hemos probado eso y no funciona sigue autorizando a los 10 segundos mas o menos y si alzo todas las mangueras de los 4 surtidores tarda hasta 30 segundos en autorizar y va en serie autorizando
Por eso quisiera saber como empezar a realizar un sistema para estos dispositivos como se lee las cadenas q envia pues no lo se en verdad pero me gustaria aprender , si me ayudan con consejos o q leer agradeceria su experiencia
Nota: tengo experiencia en delphi programando por varios años
Gracias por tu tiempo
pero donde puedo conseguir esos manuales y cuales serian, me interesa este tema , si eres tan amable me podrias guiar un poco
Te quedo muy agradecido
Nota : utilizan un programa qUE lee lo que los puertos envian se llama comport o algo asi este envia unas tramas me imagino qUE eso es espiar el lazo de corriente qUE mencionas
      bool activo;
        SerialPort sp = new SerialPort();
        string puerto="COM6";
        
        int maquina = 0;        
        int numero_maquinas = 6;
        string comando="";
private void cambiar_pariedad(System.IO.Ports.Parity p)
        {
            sp.Parity = p;
        }  
private bool abrir_puerto()
        {
            try
            {                               
                sp.BaudRate = 2400;
                sp.DataBits = 8;
                sp.Parity = System.IO.Ports.Parity.None;
                sp.StopBits = StopBits.One;
                sp.PortName = puerto;
                sp.WriteTimeout = 1000;
                sp.ReadTimeout = 1000;
                sp.Open();
                return true;
            }
            catch(Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message,"Error de conexion!",MessageBoxButtons.OK,MessageBoxIcon.Error);
                return false;
            }
        }    
    private string enviar_comando(byte[] machine,byte[] lenght,byte[] gun,byte[]command,byte[] data3,byte[] data2,byte[] data1)
        {
            #region enviar comando--------------------------------------------
            int retardo = 0;
            string resultado = "";
            byte[] datos = new byte[8];
            retardo = clases.funciones.valInt(txt_timeout.Text);
            if (retardo <= 0) retardo = 50;
            datos[0] = machine[0];
            datos[1] = lenght[0];
            datos[2] = gun[0];
            datos[3] = command[0];            
            datos[4] = data1[0];
            datos[5] = data2[0];
            datos[6] = data3[0];
            datos[7] = calcular_checksum(datos);
            //-----------------
            sp.Write(datos, 0, 1);
            pausa(retardo);
            cambiar_pariedad(System.IO.Ports.Parity.Space);
                        
            sp.Write(datos, 1, 7);
            pausa(retardo);
            cambiar_pariedad(System.IO.Ports.Parity.None);
            pausa(retardo);
            #endregion
            #region esperar resultado--------------------------------------------
            //int delay = 20;
            int respuesta = 0;
            string datos_leidos = "";  
            int timeout = 0;
            bool esperar = true;
            while (esperar)
            {
                //pausa(delay);
                while (sp.BytesToRead > 0)
                {
                    respuesta = sp.ReadByte();
                    datos_leidos = datos_leidos + " " + respuesta.ToString("X2");
                }
                if (datos_leidos != "")
                {
                    esperar = false;
                    resultado = datos_leidos; ;
                    return resultado;
                }
                timeout++;
               // pausa(delay);
                if (timeout == 10)
                {
                    resultado = "TimeOut";
                    esperar = false;
                }
                Application.DoEvents();
            }
            sp.DiscardInBuffer();
            sp.DiscardOutBuffer();
            #endregion
            return resultado;
        }
private byte calcular_checksum(byte[] datos)
        {
            byte[] res=new byte[1] {0x00};
            long suma = Convert.ToInt16(datos[0].ToString(), 10) +
                                        Convert.ToInt16(datos[1].ToString(), 10) +
                                        Convert.ToInt16(datos[2].ToString(), 10) +
                                        Convert.ToInt16(datos[3].ToString(), 10) +
                                        Convert.ToInt16(datos[4].ToString(), 10) +
                                        Convert.ToInt16(datos[5].ToString(), 10) +
                                        Convert.ToInt16(datos[6].ToString(), 10);
            suma=256-suma;            
            res = BitConverter.GetBytes(suma);
            return res[0];
        }
 private byte[] seleccionar_comando(int maquina,string accion,int pesos)
        {
                        
            // inicializar datos para el comando
            byte[] datos =new byte[7] {0x00,0x00,0x00,0x00,0x00,0x00,0x00};
            byte[] dato = new byte[1] { 0x00 };
            byte[] machine = new byte[1] { 0x00 };
            byte[] lenght = new byte[1] { 0x00 };
            byte[] gun = new byte[1] { 0x00 };
            byte[] command = new byte[1] { 0x00 };
            byte[] data3 = new byte[1] { 0x00 };
            byte[] data2 = new byte[1] { 0x00 };
            byte[] data1 = new byte[1] { 0x00 };            
            if (maquina == 1) { machine = new byte[1] { 0x01 }; gun = new byte[1] { 0x01 }; }
            if (maquina == 2) { machine = new byte[1] { 0x01 }; gun = new byte[1] { 0x02 }; }
            if (maquina == 3) { machine = new byte[1] { 0x02 }; gun = new byte[1] { 0x01 }; }
            if (maquina == 4) { machine = new byte[1] { 0x02 }; gun = new byte[1] { 0x02 }; }
            if (maquina == 5) { machine = new byte[1] { 0x03 }; gun = new byte[1] { 0x01 }; }
            if (maquina == 6) { machine = new byte[1] { 0x03 }; gun = new byte[1] { 0x02 }; }
            
            if (accion == "PEDIR_ULTIMA_VENTA")
            {
                command[0] = 0x0F ;                
            }
            else if (accion == "ENVIAR_DESPACHO")
            {
                string t_precio = pesos.ToString().PadLeft(4, '0') ;
                command[0] =  0x09 ;
                data1[0] = 0x00;// BitConverter.GetBytes(Convert.ToInt16(t_precio.Substring(0, 2), 16))[0];
                data2[0] = BitConverter.GetBytes(Convert.ToInt16(t_precio.Substring(2, 2), 16))[0];
                data3[0] = BitConverter.GetBytes(Convert.ToInt16(t_precio.Substring(0, 2), 16))[0];
            }
            lenght = new byte[1] { 0x07 };
            datos[0] = machine[0];
            datos[1] = lenght[0];
            datos[2] = gun[0];
            datos[3] = command[0];
            datos[4] = data3[0];
            datos[5] = data2[0];
            datos[6] = data1[0];  
            return datos;
        }
	Son tramas del surtidor wayne obviando los ceros del principio el primer byte es la direccion del surtidor el segundo es un bit verificador que es (255- bit anterior) asi sucesimante los dos siguientes bits son los datos, te cuento que esa parte si la vez bien es facil decifrar.T -> 0000659AFF
R -> 0000659A718E50AF20DF27D8FF
T -> 00006D92FF
R -> 00006D926E9117E820DF27D8FF
T -> 0000758AFF
R -> 0000758A7E815AA520DF27D8FF
T -> 00007D82FF
R -> 00007D82DC2305FA20DF27D8FF
T -> 0000857AFF
R -> 0000857A18E733CC20DF27D8FF
T -> 00000DF2FF
R -> 00000DF26F9017E820DF27D8FF
T -> 000015EAFF
R -> 000015EA0EF10AF520DF27D8FF
Podrías decifrar estas tramas? o decir cuales son las partes de las tramas?