Frustrated Modbus


Results 1 to 21 of 21

Threaded View

  1. #18
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default Re: Frustrated Modbus

    Ok
    New puzzle for ya all. This may be too much code for you to go over. But I am going to attach it anyway. This program is only to interrupt receive a modbus frame and detect the end of the modbus frame, then echo it back out the tx line. It seems to be working kinda, however I am only receiving 4 bytes of information back no matter what size of modbus frame I send. I put this line of code in to display my length variable which is the variable that determines how many bytes are transmitted out of the pic.
    Serout2 LCD,16468,[12,dec length]
    Length is displaying as zero. I think somewhere I am having a problem incrementing my length variable. I am still sifting through the code but I thought I would post it for anyone that is bored.
    Oh ya, I realize that the Serout2 command is a time eater but I am manually sending the ModBus frames from my Pc using MBPoll. When I first wrote the program I did not have the Serout2 command in there and still had the same problem.
    Thanks
    Shawn
    Attached Files Attached Files

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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