Interfacing with hardware through RS232
-
Hi, My name is Sandeep and I am developing an application in C# .NET, which talks to a piece of hardware. This hardware is called Loop Tester and it is connected to series (loop) of fire detector, smoke detector, etc. I am informed by the Line manager that there is no need to study the hardware. What is needed at the initial stage is to develop a program which talks to piece of hardware, connected through RS232, which forms the communication base of the project. After successfully developing it, I can write the remaining application i.e. add functionalities. I am confused as to how i can start writing the program. I have gone through the article by Tapan Dantre and got some idea. Can anybody help me out?
-
Hi, My name is Sandeep and I am developing an application in C# .NET, which talks to a piece of hardware. This hardware is called Loop Tester and it is connected to series (loop) of fire detector, smoke detector, etc. I am informed by the Line manager that there is no need to study the hardware. What is needed at the initial stage is to develop a program which talks to piece of hardware, connected through RS232, which forms the communication base of the project. After successfully developing it, I can write the remaining application i.e. add functionalities. I am confused as to how i can start writing the program. I have gone through the article by Tapan Dantre and got some idea. Can anybody help me out?
You can use SerialPort class in net framework for communicating with devices that are connected to serial port.
Giorgi Dalakishvili #region signature my articles My blog[^] #endregion
-
Hi, My name is Sandeep and I am developing an application in C# .NET, which talks to a piece of hardware. This hardware is called Loop Tester and it is connected to series (loop) of fire detector, smoke detector, etc. I am informed by the Line manager that there is no need to study the hardware. What is needed at the initial stage is to develop a program which talks to piece of hardware, connected through RS232, which forms the communication base of the project. After successfully developing it, I can write the remaining application i.e. add functionalities. I am confused as to how i can start writing the program. I have gone through the article by Tapan Dantre and got some idea. Can anybody help me out?
I'm not sure what else to say, as RS232 is just a physical communication protocol, which is layer one of the OSI model. The format of the data sent and received is per device, as well as it would be you who needs to implement layer two though seven. To help with layer two through four use a state machine in your back end wrapped around the .NET serial port class. It is good to be safe because serial communication can be prone to transmission errors that can soft lock your application.
-Spacix All your skynet questions[^] belong to solved
-
You can use SerialPort class in net framework for communicating with devices that are connected to serial port.
Giorgi Dalakishvili #region signature my articles My blog[^] #endregion
Thanks for your quick reply. I do have a general idea of how to use SerialPort component for communicating with the deveices that are connected to serial port, but my problem is how to initiate the hardware to perform some function and then read the output from the hardware (loop tester). I have few lines of code written in VB6, which talk to the hardware with which fire detectors are connected in loop. This piece of code initiates the hardware to detect the numbers of devices in loop and then gives them all address (in hexadecimal). If you have some time from your busy schedule and are willing to view the code, I am ready to send you the code and output screen shots so that you have an idea of what i want to write exactly in C#. Let me know if you are interested and forward me your email address so that i can mail you the code . Thanks
-
I'm not sure what else to say, as RS232 is just a physical communication protocol, which is layer one of the OSI model. The format of the data sent and received is per device, as well as it would be you who needs to implement layer two though seven. To help with layer two through four use a state machine in your back end wrapped around the .NET serial port class. It is good to be safe because serial communication can be prone to transmission errors that can soft lock your application.
-Spacix All your skynet questions[^] belong to solved
Thanks for your quick reply. I do have a general idea of how to use SerialPort component for communicating with the deveices that are connected to serial port, but my problem is how to initiate the hardware to perform some function and then read the output from the hardware (loop tester). I have few lines of code written in VB6, which talk to the hardware with which fire detectors are connected in loop. This piece of code initiates the hardware to detect the numbers of devices in loop and then gives them all address (in hexadecimal). If you have some time from your busy schedule and are willing to view the code, I am ready to send you the code and output screen shots so that you have an idea of what i want to write exactly in C#. Let me know if you are interested and forward me your email address so that i can mail you the code . Thanks