Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 330927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:43:37+00:00 2026-05-12T09:43:37+00:00

I got a RS232 signal capture device. and it working great. I need some

  • 0

I got a RS232 signal capture device. and it working great.

I need some help making sense of the data. Basically we bought it because we are dealing a late 80’s machine controller that uses serial communication. We had little luck despite knowing the port parameters.

From the data I dumped machine control is using the break signal as part of it’s protocol. I am having trouble duplicating it using VB and the MSComm. I know to toggle the break signal and on and off. But I am not sure what I am supposed to be doing with it. I am supposed to leave it on for each byte of data I send. Or send a byte of data and then toggle.

Also I am confused how I supposed to receive any data from the controller. Do I toggle a flag when the break is turned on and then when it turned off read the input?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:43:37+00:00Added an answer on May 12, 2026 at 9:43 am

    Michael Burr’s description of the way break works is accurate. Often, “break” signals are sent for significantly longer than one character time.

    These days, “Break” is infrequently used in serial comms, but the most common use is as a ‘cheap’ way of providing packet synchronization. “Break” may be sent before a packet starts, to alert the receiver that a new packet is on the way (and allow it to reset buffers, etc.) or at the end of a packet, to signal that no more data is expected. It’s a kind of ‘meta-character’ in that it allows you to keep the full range of 8 or 7-bit values for packet contents, and not worry about how start or end of packet are delineated.

    To send a break, typically you call SetCommBreak, wait an appropriate period (say, around 2 millseconds at 9600 baud) then call ClearCommBreak. During this time you can’t be sending anything else, of course.

    So, assuming that the protocol requires ‘break’ at the start of the packet, I’d do this (sorry for pseudocode):-

    procedure SendPacket(CommPort port, Packet packet)
    {
        SetCommBreak(port)
        Sleep(2);  // 2 milliseconds - assuming 9600 baud. Pro-rata for others
        ClearCommBreak(port)
    
        foreach(char in packet)
            SendChar(port, char)
    }
    

    Pseudocode for a receiver is more difficult, because you have to make a load of assumptions about the incoming packet format and the API calls used to receive breaks. I’ll write in C this time, and assume the existence of an imaginary function. WaitCommEvent is probably the key to handling incoming Breaks.

    bool ReadCharOrBreak(char *ch); // return TRUE if break, FALSE if ch contains received char
    

    We’ll also assume fixed-length 100 byte packets with “break” sent before each packet.

    void ReadAndProcessPackets()
    {
      char buff[100];
      int count;
    
      count = 0;
    
    while (true)
    {
      char ch;
      if (ReadcharOrBreak(ch))
        count = 0; // start of packet - reset count
      else 
      {
         if (count < 100)
         {
           buff[count++] = ch;
           if (count == 100)
             ProcessPacket(buff);
         }
         else 
           Error("too many bytes rx'd without break")
      } 
    } 
    

    WARNING – totally untested, but should give you the idea…

    For an example of a protocol using Break, check out the DMX-512 stage lighting protocol.

    The start of a packet is signified by
    a Break followed by a “mark” (a
    logical one) known as the “Mark After
    Break” (MAB). The break signals end of
    one packet and the start of the next.
    It causes the receivers to start
    reception. After the break up to 513
    slots are sent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.