Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Requirement: get data from sysmex xn-1000 machine to your laptop using rs232 port

problem:
when iam connecting sysmex xn-1000 machine to my laptop through rs232 port. in that machine host indicator shows red color so iam not able to get data from the machine.
sysmex xn-1000 uses ASTM protocol. user manual tells that we have to send an acknowledgement to the sysmex xn-1000 machine when it sends an inquire.
i don't know how and when to send acknowledgement to the sysmex xn-1000 machine.
please help me out.

My Code:

C#
static void Main(string[] args)
        {

            string buff;


            SerialPort port = new SerialPort("COM4", 9600, Parity.None, 8, StopBits.One);
            port.Open();


C#
int data = myPort.BytesToRead;
 byte[] buffer = new byte[data];
Console.WriteLine(BitConverter.ToString(buffer) );
 Console.ReadLine();

}
Posted

1 solution

I really sorry that you have been bound to use such a bad and outdated thing as a serial port. The answers lies somewhere at the other end of your RS-232 cable, where your Sysmex machine is, not your control system computer. You need to address the manufacturer documentation, not us. These are all the device-specific issues.

My only advise is to move all serial communication to a separate thread, especially when you start UI development. In this case, the UI update can be done using UI thread invocation mechanism ("Invoke", "BeginInvoke").

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900