7 Replies Latest reply on Apr 16, 2019 8:19 PM by TimCarmichael

    Linked value/attributes for each piece

    Preverco

      Hello,

       

      In order to record parts on a production line, I have 3 tags for : Length,width and batch Number.

      To know for example, "how many pieces of 4 inches in width are between 5 and 8 feet long"; Is it possible to link 2 or 3 tags/attributes/values to represent one part in order to retrieve statistics with datalink or PI Vision. Should I use event frames for each piece, even if there will be tens per minute or is there another way ?

       

      Regards,

        • Re: Linked value/attributes for each piece
          rschmitz

          Hi Alain,

           

          Depending on how exactly your tags are configured to come in you should be able to do this in DataLink without too much difficulty. You can use the "Calculated Data" function, using the Data Item as your Batch number, with a Filter Expression on your length and Width and a calculation mode of "Count." I drafted up a quick example below where I'm retrieving the number of events (Count) for my sinusoid tag over the previous day, but only when the conditions in my filter expression are being met.

           

           

          Cheers,

          Rob

            • Re: Linked value/attributes for each piece
              Preverco

              Hi Rob,

               

              Thank you for your answer.

              I tried it and it seems working, but as the two tags for length and width do not have the same time stamps, how are they linked by the 'AND' ? (how does it know whether the width of 5' at 10:00 is for the 7" long part just before at 09:59, or the 9" part just after at 10:01?)

               

              i actually want the exact count, not interpolated values.

               

              Cheers,

              Alain

                • Re: Linked value/attributes for each piece
                  rschmitz

                  Alain,

                   

                  Each tag used in the Filter Expression will get an interpolated value at the time the expression is evaluated. The expression is evaluated at every event time for the tag in the Data Item field

                   

                  --Rob

                    • Re: Linked value/attributes for each piece
                      Preverco

                      Hi Rob,

                       

                      As I want a quantity of finite elements (the number of parts), I need the exact count. This instead will give me (I think) an approximate value as it does interpolate, and may 'attach' a length to the width juste before, or just after since the 2 values'time stamps overlap.

                      That is why I am looking for the best way to get the length and width linked by an event frame, or a sort of "compexTag", array, EventPoint,...

                      What can I use to obtain the exact count ?

                       

                      Regards,

                      Alain

                        • Re: Linked value/attributes for each piece
                          rschmitz

                          Ah, so it sounds like the timestamps for the length, width, and batch number don't line up then you made need to use PrevEvent or PrevVal to select for the correct event/timestamp pair.

                           

                          If you want an event frame you'll need to set up an Analysis and have a proper start trigger. The process for which is explained in this youtube series.

                           

                          --Rob

                            • Re: Linked value/attributes for each piece
                              Preverco

                              Yes that's it. We have already set up some event frames and analysis for other things, but I was wondering if the event frames are the best way in this case, since I would have millions of them per year(one or two per second all working week long)

                              1. Is there a maximum number of event frames above witch PI won't be able to maintain good performances?

                              2. What do you think about using EventPoints to line up the timestamps in the case event frames are not usable ?

                               

                              Cheers,

                              Alain

                            • Re: Linked value/attributes for each piece
                              TimCarmichael

                              Yes... late to the party, but may have a solution to the interpolation issue.

                              If the tags are set to step tags, the interpolation should become a moot point; the tags will trend with flat lines.

                              If the tags are NOT step tags, as painful as this may seem, create two new tags as mirrors of the originals, but make them step tags.

                              Then, create analyses that are event triggered for each of the 'original' tags to write the value out to the step tag; backfill if needed to get historical step values.

                              1 of 1 people found this helpful