Announcement

Collapse
No announcement yet.

Another Productivity 3000 programming flop

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


  • #16
    Originally posted by kewakl View Post
    That is an interesting idea, but some of my arrays are larger than the 200+Kbytes supported by Do-More.
    I do alot of voltage/current measurements on quantities of up to 100 capacitors at a time - over a several hour period. These values are stored in arrays - using a 'sliding window' to minimize the amount of data required. The data that I do store is used to 'prove' a failure and to give engineering a set of data around the fault event - so that they can 'see' what the capacitor was doing for several seconds before and after the event.
    At present, I have no intention to save this data to a database, so it remains local and I copy from dataview to Excel when required. -- another wonder of ethernet!
    As was mentioned we do have plans to add a flash based file system and the utilities needed to manage it remotely. Although truthfully, unless I actually needed the data for my ongoing operation, I wouldn't store it in the controller, I would go to a PC. It is literally less than a 5 minute effort to start streaming data to a file through DMLogger, and we have customers doing similar test applications logging data at 100Hz.

    That said, this may be clear example where P3K is a better choice. In the end, ADC (and Host) is best served for their customers to use the products that fit the needs. One of my favorite sayings here at Host is: "I'd rather apologize to 20% of the customers for what I don't do, than to apologize to 100% for what I did poorly." That phrase is core thinking for us and guides many of our design decisions.

    Comment



    • #17
      BobO,
      Thank you for weighing in.
      I agree with your 20%/100% statement.
      wrt storing the data: I only collect/store it during the cycle and when the next cycle starts, I overwrite it.

      Currently, I have no requirement to maintain this data as this is not a final test.
      I collect data on all of my electrical processes so that I can prove that the process is performing as desired.
      Some people have problems believing that a PLC can read 100 voltage and 100 current measurements 2 to 4 times a second -- and process that data.
      The bottlenecks for my measurement frequency are:
      1. analog card updates 112mS per card update - sampling more frequently will return the same measurement
      2a. saving the measurements locally - I bumped the watchdog timer while shifting arrays - so I reduced my sample count
      2b. total number of measurements to save - the more samples that I attempt to store locally, the longer it takes to shift the array values

      Comment



      • #18
        Originally posted by kewakl View Post
        1. analog card updates 112mS per card update - sampling more frequently will return the same measurement
        Can't comment on analog performance...Host doesn't make analog.

        Originally posted by kewakl View Post
        2a. saving the measurements locally - I bumped the watchdog timer while shifting arrays - so I reduced my sample count
        2b. total number of measurements to save - the more samples that I attempt to store locally, the longer it takes to shift the array values
        For virtually everything I do in embedded development, I avoid data shifting like the plague. Ring buffers work beautifully and completely eliminate the performance hit to large samples. I admittedly know very little about P3K programming, but doing this in Do-more is quite simple, so I would expect P3K can do it as well. I have even gone as far as maintaining running sums...adding to the sum as I add samples, and backing values out as I remove samples...just to keep statistical computations quick.

        We do have some statistical functions built into the MATH box (AVGR, MAXR, MINR, SUMR, STDEVR) but those were not really intended for very large sample sizes. However, it is very easy to do operations like that in program code, and the timeslicing feature of program and task blocks prevents long loop operations from hurting scan time beyond the timeslice you configure. Pretty sweet to be able to churn through 10k samples computing whatever you want and have effectively no bump to scantime.

        But again, choose what works best...I want folks to be informed, but I'm honestly not trying to sell you a Do-more. It's in Host's best interest to have you happy with what you use, even it is means not using our products.

        Comment



        • #19
          Originally posted by BobO View Post
          For virtually everything I do in embedded development, I avoid data shifting like the plague. Ring buffers work beautifully and completely eliminate the performance hit to large samples. I admittedly know very little about P3K programming, but doing this in Do-more is quite simple, so I would expect P3K can do it as well. I have even gone as far as maintaining running sums...adding to the sum as I add samples, and backing values out as I remove samples...just to keep statistical computations quick.
          I didn't do an exhaustive study on saving that data, but shifting arrays seemed to do what I wanted, and it will be easier for others to understand my intent.

          I appreciate all of your comments.
          Last edited by kewakl; 10-23-2014, 08:46 PM.

          Comment



          • #20
            Originally posted by kewakl View Post
            Does this method make a legible print on a respectable paper size?
            -or do you use this to experiment until you find a usable font/paper setting?

            Sometimes it just has to be on paper. For those times, I print landscape 11x17.
            I use a font size based on the print preview of the task.
            You can use standard paper sizes or use the custom sizing to any width, height portrait or landscape. Plus resolution and scaling. I use it when I want to dump the document printout but only want to really printout the X and Y portions. Or just want to have a PDF of the ladder on computer file for reference but not wanting to print it. Many uses, works with all software print to printer command. Just select print with doPDF instead of the real printer.

            Yes I do use it to find a usable font/paper setting. Better this way than wasting paper.
            Attached Files

            Comment

            Working...
            X