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 40 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 Offline
    G Offline
    glennPattonWork3
    wrote on last edited by
    #1

    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

    Mircea NeacsuM J L C S 10 Replies Last reply
    0
    • G glennPattonWork3

      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

      Mircea NeacsuM Offline
      Mircea NeacsuM Offline
      Mircea Neacsu
      wrote on last edited by
      #2

      What I normally do is to use a terminal emulation program to send commands "by hand" and see what's going on. If I have to spy on two devices talking serially, I use two COM ports to capture each side of the dialog.

      Mircea

      G 1 Reply Last reply
      0
      • Mircea NeacsuM Mircea Neacsu

        What I normally do is to use a terminal emulation program to send commands "by hand" and see what's going on. If I have to spy on two devices talking serially, I use two COM ports to capture each side of the dialog.

        Mircea

        G Offline
        G Offline
        glennPattonWork3
        wrote on last edited by
        #3

        That was my first though but I haven't done to much serial port work since Win 8, Win10 & Win11 I have not attacked in the same depth. The blessed tool I used to use won't work on Win11 (I also don't have Admin so problems!)

        Mircea NeacsuM 1 Reply Last reply
        0
        • G glennPattonWork3

          That was my first though but I haven't done to much serial port work since Win 8, Win10 & Win11 I have not attacked in the same depth. The blessed tool I used to use won't work on Win11 (I also don't have Admin so problems!)

          Mircea NeacsuM Offline
          Mircea NeacsuM Offline
          Mircea Neacsu
          wrote on last edited by
          #4

          I use Termite: a simple RS232 terminal[^] and wcom32[^]. Both work fine in W11.

          Mircea

          C G 2 Replies Last reply
          0
          • Mircea NeacsuM Mircea Neacsu

            I use Termite: a simple RS232 terminal[^] and wcom32[^]. Both work fine in W11.

            Mircea

            C Offline
            C Offline
            crapcoder670
            wrote on last edited by
            #5

            I really like Realterm. You can really do the nuts and bolts of serial comms with it.

            Mike HankeyM 1 Reply Last reply
            0
            • C crapcoder670

              I really like Realterm. You can really do the nuts and bolts of serial comms with it.

              Mike HankeyM Offline
              Mike HankeyM Offline
              Mike Hankey
              wrote on last edited by
              #6

              Need to add that to Free Tools[^]

              I don't think before I open my mouth, I like to be as surprised a everyone else. PartsBin an Electronics Part Organizer - Release Version 1.1.0 JaxCoder.com Latest Article: SimpleWizardUpdate

              C 1 Reply Last reply
              0
              • G glennPattonWork3

                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

                J Offline
                J Offline
                jschell
                wrote on last edited by
                #7

                Been a long time since I did serial ports but to be fair you are describing a problem with the device and not the port. Which is what I remember. Devices were all odd. Even worse if one had to code to a spec rather than the actual device.

                glennPattonWork3 wrote:

                Combined with the lack of Vis Studio .NET beyond version 2003

                Not sure why that matters? The serial port code itself is going to be different when you move up?

                G 1 Reply Last reply
                0
                • Mircea NeacsuM Mircea Neacsu

                  I use Termite: a simple RS232 terminal[^] and wcom32[^]. Both work fine in W11.

                  Mircea

                  G Offline
                  G Offline
                  glennPattonWork3
                  wrote on last edited by
                  #8

                  Strange, going to have to look at Termite again used it on tried this morning with 11 and it wouldn't install...

                  Mircea NeacsuM 1 Reply Last reply
                  0
                  • G glennPattonWork3

                    Strange, going to have to look at Termite again used it on tried this morning with 11 and it wouldn't install...

                    Mircea NeacsuM Offline
                    Mircea NeacsuM Offline
                    Mircea Neacsu
                    wrote on last edited by
                    #9

                    Just installed it on a new W11 machine and works fine (Termite 3.4)

                    Mircea

                    G 1 Reply Last reply
                    0
                    • Mike HankeyM Mike Hankey

                      Need to add that to Free Tools[^]

                      I don't think before I open my mouth, I like to be as surprised a everyone else. PartsBin an Electronics Part Organizer - Release Version 1.1.0 JaxCoder.com Latest Article: SimpleWizardUpdate

                      C Offline
                      C Offline
                      crapcoder670
                      wrote on last edited by
                      #10

                      I added it to tools.

                      1 Reply Last reply
                      0
                      • G glennPattonWork3

                        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

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        Yep ... There are query functions and commands. I spent a lot of time making sure the scale was "centered", "not moving", not in an "error state", etc. A button for "Weigh Now" instead of polling blindly erased a lot of "issues".

                        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                        G 1 Reply Last reply
                        0
                        • J jschell

                          Been a long time since I did serial ports but to be fair you are describing a problem with the device and not the port. Which is what I remember. Devices were all odd. Even worse if one had to code to a spec rather than the actual device.

                          glennPattonWork3 wrote:

                          Combined with the lack of Vis Studio .NET beyond version 2003

                          Not sure why that matters? The serial port code itself is going to be different when you move up?

                          G Offline
                          G Offline
                          glennPattonWork3
                          wrote on last edited by
                          #12

                          Thing was .NET1.0 had no native serial ports, you had to come up with a method (many and varied my favorite was to use MSCOMM32 imported from Visual Studio 6) which was an ugly way to do it. NET2.0 had a native serial port class which was better/easier.

                          1 Reply Last reply
                          0
                          • Mircea NeacsuM Mircea Neacsu

                            Just installed it on a new W11 machine and works fine (Termite 3.4)

                            Mircea

                            G Offline
                            G Offline
                            glennPattonWork3
                            wrote on last edited by
                            #13

                            Must give it another go!

                            1 Reply Last reply
                            0
                            • L Lost User

                              Yep ... There are query functions and commands. I spent a lot of time making sure the scale was "centered", "not moving", not in an "error state", etc. A button for "Weigh Now" instead of polling blindly erased a lot of "issues".

                              "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                              G Offline
                              G Offline
                              glennPattonWork3
                              wrote on last edited by
                              #14

                              Oh it gets worse. Despite me saying do we need to do it this something will break. An expensive, new set of scales was bought disassembled and made to mimic what worked. Problem was what worked didn't and there was so much trouble is trying to get it working and they were so sensitive they were unusable for Production use. So muggins here cobbled together a Phidget thing (link [Phidgets Inc. - Products for USB Sensing and Control](https://www.phidgets.com/) to get something workable. My Phidget journey is just starting which me luck!!

                              1 Reply Last reply
                              0
                              • G glennPattonWork3

                                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

                                C Offline
                                C Offline
                                Choroid
                                wrote on last edited by
                                #15

                                I need eye surgery for a cataract could you use just one line of Python and be gentle

                                1 Reply Last reply
                                0
                                • G glennPattonWork3

                                  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

                                  S Offline
                                  S Offline
                                  Shmoken99
                                  wrote on last edited by
                                  #16

                                  Check the wires. Can't tell you how many days I wasted on a not quite completely broken ground wire. The only thing worse than no grounding is intermittent grounding.

                                  G 1 Reply Last reply
                                  0
                                  • G glennPattonWork3

                                    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

                                    S Offline
                                    S Offline
                                    Shmoken99
                                    wrote on last edited by
                                    #17

                                    Check the wires. Can't tell you how many days I wasted on a not quite completely broken ground wire. The only thing worse than no grounding is intermittent grounding.

                                    1 Reply Last reply
                                    0
                                    • G glennPattonWork3

                                      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

                                      V Offline
                                      V Offline
                                      vanniaz
                                      wrote on last edited by
                                      #18

                                      Hi, Are you sure that after a zero the tare weight should be zero? Usually the zero command zeroes the NET weight, not the tare

                                      G 1 Reply Last reply
                                      0
                                      • S Shmoken99

                                        Check the wires. Can't tell you how many days I wasted on a not quite completely broken ground wire. The only thing worse than no grounding is intermittent grounding.

                                        G Offline
                                        G Offline
                                        glennPattonWork3
                                        wrote on last edited by
                                        #19

                                        Don't worry, I have checked the ground (& TX, RX) lines multiple times!

                                        1 Reply Last reply
                                        0
                                        • V vanniaz

                                          Hi, Are you sure that after a zero the tare weight should be zero? Usually the zero command zeroes the NET weight, not the tare

                                          G Offline
                                          G Offline
                                          glennPattonWork3
                                          wrote on last edited by
                                          #20

                                          I was going by the garbled instructions I had. A method of Zeroing everything is required. I have contacted the scale manufacturer to try to get some data on how to do it.

                                          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