Skip to main content
Publicación cerrada como "No adecuado para este sitio" por gbianchi, fredyfx, user75901, Pikoh, Carlos Muñoz
se eliminaron 6 caracteres en el cuerpo
Origen Enlace

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

    public static void InitSerialInterface(string puerto, int baudios)
    { 
        mySerialPort.PortName = "COM1";
        mySerialPort.BaudRate = 9600;
        mySerialPort.Parity = Parity.Even;
        mySerialPort.StopBits = StopBits.One;
        mySerialPort.DataBits = 7;
        mySerialPort.Handshake = Handshake.None;
        mySerialPort.DtrEnable = true;
        mySerialPort.RtsEnable = true;
        mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceivedDataReceivedHandler);
        mySerialPort.Open();
    }
    //Este metodo nunca es lanzado :(
    private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
    {
        SerialPort sp = (SerialPort)sender;
        string indata = sp.ReadExisting();
        Console.WriteLine("Data Received:");
        Console.Write(indata);
    }
}

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

    public static void InitSerialInterface(string puerto, int baudios)
    { 
        mySerialPort.PortName = "COM1";
        mySerialPort.BaudRate = 9600;
        mySerialPort.Parity = Parity.Even;
        mySerialPort.StopBits = StopBits.One;
        mySerialPort.DataBits = 7;
        mySerialPort.Handshake = Handshake.None;
        mySerialPort.DtrEnable = true;
        mySerialPort.RtsEnable = true;
        mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
        mySerialPort.Open();
    }
    //Este metodo nunca es lanzado :(
    private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
    {
        SerialPort sp = (SerialPort)sender;
        string indata = sp.ReadExisting();
        Console.WriteLine("Data Received:");
        Console.Write(indata);
    }
}

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

    public static void InitSerialInterface(string puerto, int baudios)
    { 
        mySerialPort.PortName = "COM1";
        mySerialPort.BaudRate = 9600;
        mySerialPort.Parity = Parity.Even;
        mySerialPort.StopBits = StopBits.One;
        mySerialPort.DataBits = 7;
        mySerialPort.Handshake = Handshake.None;
        mySerialPort.DtrEnable = true;
        mySerialPort.RtsEnable = true;
        mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
        mySerialPort.Open();
    }
    //Este metodo nunca es lanzado :(
    private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
    {
        SerialPort sp = (SerialPort)sender;
        string indata = sp.ReadExisting();
        Console.WriteLine("Data Received:");
        Console.Write(indata);
    }
}
se eliminaron 45 caracteres en el cuerpo
Origen Enlace
Pikoh
  • 17.5k
  • 9
  • 41
  • 56

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

private static SerialPort puertoSerial;

    public static void InitSerialInterface(string puerto, int baudios)
{ 
     {  
        mySerialPort.PortName = "COM1";
             mySerialPort.BaudRate = 9600;
             mySerialPort.Parity = Parity.Even;
             mySerialPort.StopBits = StopBits.One;
             mySerialPort.DataBits = 7;
             mySerialPort.Handshake = Handshake.None;
             mySerialPort.DtrEnable = true;
            mySerialPort.RtsEnable = true;
            mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
             mySerialPort.Open();
}
    }
    //Este metodo nunca es lanzado :(
    private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
        {
            SerialPort sp = (SerialPort)sender;
            string indata = sp.ReadExisting();
            Console.WriteLine("Data Received:");
            Console.Write(indata);
        }
}

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

public static void InitSerialInterface(string puerto, int baudios)
{ 
              mySerialPort.PortName = "COM1";
             mySerialPort.BaudRate = 9600;
             mySerialPort.Parity = Parity.Even;
             mySerialPort.StopBits = StopBits.One;
             mySerialPort.DataBits = 7;
             mySerialPort.Handshake = Handshake.None;
             mySerialPort.DtrEnable = true;
            mySerialPort.RtsEnable = true;
            mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
             mySerialPort.Open();
}
       //Este metodo nunca es lanzado :(
private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
        {
            SerialPort sp = (SerialPort)sender;
            string indata = sp.ReadExisting();
            Console.WriteLine("Data Received:");
            Console.Write(indata);
        }

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

    public static void InitSerialInterface(string puerto, int baudios)
    {  
        mySerialPort.PortName = "COM1";
        mySerialPort.BaudRate = 9600;
        mySerialPort.Parity = Parity.Even;
        mySerialPort.StopBits = StopBits.One;
        mySerialPort.DataBits = 7;
        mySerialPort.Handshake = Handshake.None;
        mySerialPort.DtrEnable = true;
        mySerialPort.RtsEnable = true;
        mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
        mySerialPort.Open();
    }
    //Este metodo nunca es lanzado :(
    private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
    {
        SerialPort sp = (SerialPort)sender;
        string indata = sp.ReadExisting();
        Console.WriteLine("Data Received:");
        Console.Write(indata);
    }
}
se eliminaron 10 caracteres en el cuerpo
Origen Enlace

How to read Como leer el puerto serial port (weighing machinebascula) fromdesde c#

i have a problem when i want to read aTengo un problema al querer leer un puerto serial portdesde c# (weighing machineBascula) from c#

the methodel metodo "DataReceivedHandler" never is triggerednunca es lanzado

private static SerialPort puertoSerial;

public static void InitSerialInterface(string puerto, int baudios)
{ 
              mySerialPort.PortName = "COM1";
             mySerialPort.BaudRate = 9600;
             mySerialPort.Parity = Parity.Even;
             mySerialPort.StopBits = StopBits.One;
             mySerialPort.DataBits = 7;
             mySerialPort.Handshake = Handshake.None;
             mySerialPort.DtrEnable = true;
            mySerialPort.RtsEnable = true;
            mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
             mySerialPort.Open();
}
       //THISEste METHODmetodo NEVERnunca triggeredes lanzado :(
private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
        {
            SerialPort sp = (SerialPort)sender;
            string indata = sp.ReadExisting();
            Console.WriteLine("Data Received:");
            Console.Write(indata);
        }

How to read serial port (weighing machine) from c#

i have a problem when i want to read a serial port (weighing machine) from c#

the method "DataReceivedHandler" never is triggered

private static SerialPort puertoSerial;

public static void InitSerialInterface(string puerto, int baudios)
{ 
              mySerialPort.PortName = "COM1";
             mySerialPort.BaudRate = 9600;
             mySerialPort.Parity = Parity.Even;
             mySerialPort.StopBits = StopBits.One;
             mySerialPort.DataBits = 7;
             mySerialPort.Handshake = Handshake.None;
             mySerialPort.DtrEnable = true;
            mySerialPort.RtsEnable = true;
            mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
             mySerialPort.Open();
}
       //THIS METHOD NEVER triggered :(
private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
        {
            SerialPort sp = (SerialPort)sender;
            string indata = sp.ReadExisting();
            Console.WriteLine("Data Received:");
            Console.Write(indata);
        }

Como leer el puerto serial (bascula) desde c#

Tengo un problema al querer leer un puerto serial desde c# (Bascula)

el metodo "DataReceivedHandler" nunca es lanzado

private static SerialPort puertoSerial;

public static void InitSerialInterface(string puerto, int baudios)
{ 
              mySerialPort.PortName = "COM1";
             mySerialPort.BaudRate = 9600;
             mySerialPort.Parity = Parity.Even;
             mySerialPort.StopBits = StopBits.One;
             mySerialPort.DataBits = 7;
             mySerialPort.Handshake = Handshake.None;
             mySerialPort.DtrEnable = true;
            mySerialPort.RtsEnable = true;
            mySerialPort.DataReceived += new SerialDataReceivedEventHandler(mySerialPort_DataReceived);
             mySerialPort.Open();
}
       //Este metodo nunca es lanzado :(
private static void DataReceivedHandler(object sender,SerialDataReceivedEventArgs e)
        {
            SerialPort sp = (SerialPort)sender;
            string indata = sp.ReadExisting();
            Console.WriteLine("Data Received:");
            Console.Write(indata);
        }
título editado
Enlace
Loading
Origen Enlace
Loading