CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    42

    Serial Comm. for more than 1 MB data

    Hi all,
    after a long time. this problem is somewhat related to VB. I am writing code for comm between VB and microcontroller. thru RS232. I use Modbus protocol. but it has limitation of 256 bytes. I have to send 2MB data. So i want to know is there any protocol for that or i have to develop my own protocol.
    Eagerly waiting for reply
    Thanks
    Yogi

  2. #2
    Join Date
    Jul 2005
    Location
    E: 120°.6, N: 31°.3′
    Posts
    795

    Re: Serial Comm. for more than 1 MB data

    Well, if you're using RS232, you may achieve it by send data to serial com port till reach its end.
    Little by little one goes far
    Keep moving.......!
    Nothing is impossible !

  3. #3
    Join Date
    Jan 2006
    Posts
    42

    Re: Serial Comm. for more than 1 MB data

    For selection and specific queries some protocol may be needed. Also the packet sizes and their repectives addresses can vary . So better if i get a protocol .

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Serial Comm. for more than 1 MB data

    MODBus is limited in the packet size. As far as I know, there is no 'standard' for messages that require multiple packets (this is not typically what ModBus) is used for.

    In theory, you could adapt some existing packet protocols to meet your needs.

    BUT, I am REALLY curious WHY you re attempting to do this?????

    [ps: I have done alot of industrial automation, and have NEVER had this type of requirement....]
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  5. #5
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Serial Comm. for more than 1 MB data

    As posted already in another thread here, a real "protocol" is not actually needed.
    All depends of the data type you send. If you send data in a "readable" form like being ASCII characters and numbers to represent names and values, you only have to define an "end-of-transmission" charater like already provided by the ASCII code (hex 04).
    If you send binary data and the number of bytes per block is always the same you don't need a protocol either. You simply count out the bytes.
    Also a thought could be to make a specified pause of say 500msec after each block to let a timer determine end of transmission of a block.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured