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. The Lounge
  3. Well I used to know Serial Ports

Well I used to know Serial Ports

Scheduled Pinned Locked Moved The Lounge
csharppythonhardwaretutorialquestion
23 Posts 12 Posters 42 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.
  • G glennPattonPub

    Hi All, Time for a rant, I know how to get PC's to talk to the outside world given sufficient hardware and info. I am playing with a set of scales that we are abusing for a test rig. The device is a little odd and the timing of it is strange. You send it a 'Z\r\n' to zero it 'beep' (which according to the docs means received & understood) and period of time T it zero's, then reading is made via 'P\r\n' 'beep' and the reading is returned. The reading packet seems to hold the current tare weight, the number of readings made and a total. All we care about is the tare weight. If the unit is zeroed the tare weight according to logic should be 0.00 but no it is not there?? force a zero by the on scale function it returns a 0.00 tare weight? Combined with the lack of Vis Studio .NET beyond version 2003 (.NET 1.5??) means I have to make notes of how the software behaves and do the mods with 2008 all despite having the OK for a new version (2017 possibly needed for compatibility issues) I still don't have it. I'm doing my best with what I have (if some else tells me to use Python I will stick a fork in their eye) Glenn

    E Offline
    E Offline
    englebart
    wrote on last edited by
    #21

    Per Vanniaz’s comment, maybe there is another “T\r\n” Tare command? I could see Z meaning there is nothing on it/initial setup. Empty truck/container/beaker is set on scale, send T to set Tare. Later send P once truck/container/beaker is filled. Documentation rules!

    1 Reply Last reply
    0
    • G glennPattonPub

      Hi All, Time for a rant, I know how to get PC's to talk to the outside world given sufficient hardware and info. I am playing with a set of scales that we are abusing for a test rig. The device is a little odd and the timing of it is strange. You send it a 'Z\r\n' to zero it 'beep' (which according to the docs means received & understood) and period of time T it zero's, then reading is made via 'P\r\n' 'beep' and the reading is returned. The reading packet seems to hold the current tare weight, the number of readings made and a total. All we care about is the tare weight. If the unit is zeroed the tare weight according to logic should be 0.00 but no it is not there?? force a zero by the on scale function it returns a 0.00 tare weight? Combined with the lack of Vis Studio .NET beyond version 2003 (.NET 1.5??) means I have to make notes of how the software behaves and do the mods with 2008 all despite having the OK for a new version (2017 possibly needed for compatibility issues) I still don't have it. I'm doing my best with what I have (if some else tells me to use Python I will stick a fork in their eye) Glenn

      G Offline
      G Offline
      Gary Wheeler
      wrote on last edited by
      #22

      I suggest buying one of these[^]. I still have mine. The TRS-80 Model 100 was fantastic for debugging serial interface stuff.

      Software Zen: delete this;

      1 Reply Last reply
      0
      • G glennPattonPub

        Hi All, Time for a rant, I know how to get PC's to talk to the outside world given sufficient hardware and info. I am playing with a set of scales that we are abusing for a test rig. The device is a little odd and the timing of it is strange. You send it a 'Z\r\n' to zero it 'beep' (which according to the docs means received & understood) and period of time T it zero's, then reading is made via 'P\r\n' 'beep' and the reading is returned. The reading packet seems to hold the current tare weight, the number of readings made and a total. All we care about is the tare weight. If the unit is zeroed the tare weight according to logic should be 0.00 but no it is not there?? force a zero by the on scale function it returns a 0.00 tare weight? Combined with the lack of Vis Studio .NET beyond version 2003 (.NET 1.5??) means I have to make notes of how the software behaves and do the mods with 2008 all despite having the OK for a new version (2017 possibly needed for compatibility issues) I still don't have it. I'm doing my best with what I have (if some else tells me to use Python I will stick a fork in their eye) Glenn

        P Offline
        P Offline
        Peter Shaw
        wrote on last edited by
        #23

        I often use this handy tool to debug serial issues: [Device Monitoring Studio: High-Performance Connections Data Logging & Analyzing Software](https://www.hhdsoftware.com/device-monitoring-studio) Despite the fact that it is a paid for product, thier is a "Free" version that has reduced features, but is perfectly usable for basic serial comms spying. If the scale has a sample program with it for example, just run this, attach to the serial port, then run the demo app and see exactly what it's doing, byte for byte. I've used it many times to do exactly that. In one case I figured out that the "visible" commands I could see, where actually all prefixed by a non visible 0x01 byte, and whoever had put the manual together, had not known this byte was in front, and thus just typed the manual up as "ABC..." rather than "0x01ABC" (I was told when I contacted the devices support team to report my findings.) If you elect to go for the paid version, it does all sorts of neat things like Modbus protocol analysis and lot's of other protocol decoders.

        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