Announcement

Collapse
No announcement yet.

Why can't all projects go this way?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why can't all projects go this way?

    I'm not a great programmer. Ok, not even a good one, but I still need applications. This week I needed an app to read a rotary shaft encoder, do some math based on a few other inputs, and give the user a running result.

    Installing the encoder driver, I noticed that it used the exact same FTDI D2xx USB chip as my Prologix USB converter. Cool, as I had written a control program for my HP distortion analyzer last year using the USB converter.

    Didn't have a clue as to how to do a continuously running task, but looked at the PB examples and found PwrClock that shows how to set up a timer.

    Ok, brought up PBForms and created a screen. Stole the few lines of timer code from PwrClock. Copied the FTDI control code from my previously written app. Bingo, a nice working app in a couple hours to wow my boss and co-workers. Not the big complex stuff some of you do, but it's sure nice to have things just fall together every now and then.

  • #2
    Anything that is "big" enough to impress the boss, is big enough to be proud of.
    "I haven't lost my mind... its backed up on tape... I think??" :D

    Comment


    • #3
      "Good things come in small packages"
      - Mom -
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Well,

        you had a problem, you study it, you put passion on it, you linked different solutions and piece of code to find "the way". That's not a little easy stuff.

        Good job!
        thinBasic programming language
        Win10 64bit - 8GB Ram - i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

        Comment


        • #5
          Ok Morbid curiosity here....
          What encoder? and more importantly what encoder READER??????

          I work with this stuff all the time, so maybe you can help me? or maybe I can help you? depending on areas of "expertise" (or maybe a better word would be "experience" with a subject?)
          Engineer's Motto: If it aint broke take it apart and fix it

          "If at 1st you don't succeed... call it version 1.0"

          "Half of Programming is coding"....."The other 90% is DEBUGGING"

          "Document my code????" .... "WHYYY??? do you think they call it CODE? "

          Comment


          • #6
            Hi Cliff,

            I'm into high resolution. The encoder is a Gurley (Troy, NY) model 7700 if I remember right. It resolves better than 0.001 degrees, though the maximum speed is limited due to all the data coming in. It's also an absolute encoder- it knows where it is after moving a degree or two. What's really neat is their new "VH" decoder. About the size of a little match box and USB 2.0. The whole shootin' match is about $300. They also do linear with basically the same set-up. I can also steer you to some other designs if you PM me.

            For whatever reasons, almost all of my PB programs are written to drive some kind of hardware.

            On my app, I added a data logging routine that works fine, but at high speeds (20 mS/reading) I'm seeing some irregularity with the Windows timer. It might be me though, as my data seems more regular than the value of the timer I'm saving, even though the data collection is driven by the timer. Odd.

            Conrad
            Last edited by Conrad Hoffman; 9 Jul 2008, 09:50 PM. Reason: various sizes of match box

            Comment


            • #7
              Conrad,

              Windows timers vary in quality and resolution. There are several to choose from. I suggest you take a look at http://www.geisswerks.com/ryan/FAQS/timing.html

              Russ
              "There are two novels that can change a bookish fourteen-year old's life: The Lord of the Rings and Atlas Shrugged. One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world. The other, of course, involves orcs." - John Rogers

              Comment


              • #8
                Thanks Russ- I've read some articles on this, but hadn't seen that one. When time allows, I'll try some of the tricks and workarounds. Right now it isn't an issue, but SOP here is to run all systems flat out.

                Comment

                Working...
                X