Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Interfacing with hardware through RS232

Interfacing with hardware through RS232

Scheduled Pinned Locked Moved C#
csharpquestionhardwarehelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sandeep Ambade
    wrote on last edited by
    #1

    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?

    G S 2 Replies Last reply
    0
    • S Sandeep Ambade

      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?

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • S Sandeep Ambade

        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?

        S Offline
        S Offline
        Spacix One
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • G Giorgi Dalakishvili

          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

          S Offline
          S Offline
          Sandeep Ambade
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • S Spacix One

            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

            S Offline
            S Offline
            Sandeep Ambade
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups