9 Replies Latest reply on Feb 9, 2015 7:16 AM by Eugene Lee

    manual input processbook

    RaviADM

      how to put data manual by use of processbook...

        • Re: manual input processbook
          zge

          Hi Ravi,

           

          Regarding your question, we need some clarification: By "put data" do you mean writing events to AF Server or PI Data Archive? Is it a Collective?

            • Re: manual input processbook
              RaviADM

              i just want to write some manual input to the AF server and yes it is collective.

              idea is to make an display for maual entery in procesbook by the operator.

                • Re: manual input processbook
                  ilyas

                  Hi Ravi,

                   

                  YOU CAN TRY THESE..ITS FOR ENTERING VALUES USING PI SDK

                  Private Sub Submit1_Click()
                  Dim pipt As PIPoint
                  Dim pidata As pidata
                  Dim srv As Server
                  Dim pt As New PITimeFormat
                  Dim nam As Integer
                  Dim YesOrNoAnswerToMessageBox As String
                  Dim QuestionToMessageBox As String
                  'Code to set target
                  'Set refrences of PI SDK & PI Time
                  On Error GoTo eh
                  
                  
                      Set srv = PISDK.Servers("PIISERVER")     'sET pI sERVER
                      Set pipt = srv.PIPoints("Entry2_M")   ' SETPI TAG
                      Set pidata = pipt.Data
                      
                      QuestionToMessageBox = "Do want to save the value to PI Server?"
                      YesOrNoAnswerToMessageBox = MsgBox(QuestionToMessageBox, vbYesNo, "Save Value to PI Server")
                      If YesOrNoAnswerToMessageBox = vbNo Then
                         MsgBox "Value Not Changed"
                      Else
                       nam = ManualData1.Text
                       pidata.UpdateValue ManualData1.Text, pt, dmInsertDuplicates   ' Update PITag value in Pi server
                       MsgBox "Value saved as :" & nam
                          
                      End If
                      Exit Sub
                  eh:
                  MsgBox Err.Description
                  
                  
                  End Sub
                  

                  Thanks

                  • Re: manual input processbook
                    gachen

                    Hi ravi,

                     

                    If you mean data entry to a PI point, then something like Ilyas suggested would work, and you could use VBA with ProcessBook for data entry.

                     

                    However, you said that you wanted manual entry to AF. Could you clarify on this? AFSDK cannot be directly used with ProcessBook and to do so would require a wrapper to be written. What in AF are you trying to write to?

                    1 of 1 people found this helpful