Quantcast
Channel: OSIsoft Users Community
Viewing all 1120 articles
Browse latest View live

Setfocus

$
0
0

I have 20 Textboxes lined up down a screen that operators enter data into one and then have to click on to the next so on and so on. How can I make it where they can down arrow or enter to get to the next one below.

 

The manual says this...

2.0.1.Different Containers Support Different Sets of Extender Properties

Certain extender properties that are made available to objects by the VB container are not supported in VBA in PI ProcessBook. For example, setfocus and gotfocus work with userforms (i.e. dialog boxes) in VB but not in PI ProcessBook VBA. Also, PI ProcessBook does not support the visible property for a commandbutton.  (See the online help for VBA in PI ProcessBook at \\program files\pipc\help\pipbvb.chm for more information. This is also available from inside the VBA editor in ProcessBook.

 

my code is 

 

Public Sub WriteTagValue3RSTM() '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 1

    Dim szTag As String
    Dim szSrv As String
        
    szTag = "33:#3RSTM.ME"
    szSrv = "cpcropi"
    Application.ActiveDisplay.SelectedSymbols.RemoveAll
    Application.ActiveDisplay.Revert
    
    If (box3RSTM.Text >= -100) And (box3RSTM.Text <= 100) Then 'Create upper and lower
            SetPITagValue szSrv, szTag, box3RSTM.Text, Now
            box3RSTM.ForeColor = RGB(0, 0, 0) 'black
            box3RSTM.Text = ""
            box2 = MsgBox("   Test Entered", [vbExclamation], " ")
    Else
            box2 = MsgBox("Out of Range!", [vbExclamation], " ")
            box3RSTM.ForeColor = RGB(0, 0, 0) 'black
            box3RSTM.Text = ""
    End If
  
    
End Sub
 
Public Sub WriteTagValue3STSD() '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 2
    Dim szTag As String
    Dim szSrv As String
        
    szTag = "33:#3STSD.ME"
    szSrv = "cpcropi"
    Application.ActiveDisplay.SelectedSymbols.RemoveAll
    Application.ActiveDisplay.Revert
    
    If (box3STSD.Text >= 0) And (box3STSD.Text <= 100) Then 'Create upper and lower
            SetPITagValue szSrv, szTag, box3STSD.Text, Now
            box3STSD.ForeColor = RGB(0, 0, 0) 'black
            box3STSD.Text = ""
            box2 = MsgBox("   Test Entered", [vbExclamation], " ")
    Else
            box2 = MsgBox("Out of Range!", [vbExclamation], " ")
            box3STSD.ForeColor = RGB(0, 0, 0) 'black
            box3STSD.Text = ""
    End If
  
    
End Sub
 
and I have tried
 
Private Sub box3RSTM_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Me.box3STSD.SetFocus
End Sub
 
and 
 
 
Private Sub Display_Open()
Zoom = "FitAll"
box3STSD.SetFocus
End Sub
Capturemm.JPG
Is this even possible (Attached is my screenshot of part of my screen) my operators complain because they have to click into every box! 
 
 

Createing Totalizer tags from Instantaneous flow points

$
0
0

I am a new PI administrator and need assistance in creating tags to calculate total flow in a 24 hour period using an instantaneous flow meter and calculations.  Once these tags are created, I would also like to set up a report using the calculated information on a daily basis at the same time each day.  I did not find any videos on the You Tube channel that addressed this.  Does anyone have an example or procedure to create these tags?

 

Thanks.

FitAll

$
0
0

I'm looking for a VB Code to display full screen when the file is opened. I tried using this code:

 

Public Sub Display_Open()
    Dim Display As Display
    Set Display = ThisDisplay
    Display.Zoom = "FitAll"

End Sub

 

Though it works but only when I run the Macro manually. But I want the macro to run automatically when the file is opened. 

Sorting Data from the same tag In PI

$
0
0

Hello,

 

I was wondering if it was possible to write a module in PI to enable me to seperate data based on viscosity, temperature, or other variables? Through this particular unit there are various different feeds based on what we are running, so it would nice to be able to see the live trends in PI of each seperate feed without having to export the data to excel and seperating it there. I have been messing around with VBA, but can not get it to work. Any thoughts?

Tool for OPC DA/HDA

$
0
0

Hi Folks,

 

I am looking for a OPC tool which can perform the following functions. Please share your ideas!

 

1.  Able to read the configured  item in the OPC DA/HDA Server and save the configuration of the item into Able to read the item configured in the OPC DA/HDA Server and save the configuration of the item into a csv or text file.

 

2.  Able to read the current value of an item from the OPC Server and save the values into a csv / text file.

 

Thanks!

PIPROPERTIES IN MODULES IN PIACE CALCS.

$
0
0

Hi,

We are trying to pass properties in module database in pi ace calculations, but during debug error is coming as piacebifunction.vb file not found.

I have attached vb.net code screenshot with error screenshot.

Please suggest r we mising something to execute this code.

Thanks & Regards,

iLUSAUD

 

3058.pimdb1.jpg2806.pimdb2.jpg

 

 

Imports System
Imports OSIsoft.PI.ACE
Imports OSIsoft.PI.ACE.PIACEBIFunctions
Imports PISDK
Imports PISDKCommon
Imports System.Object

Public Class ActivePowerCalc
Inherits PIACENetClassModule
'
' Tag Name/VB Variable Name Correspondence Table
' Tag Name VB Variable Name
' ------------------------------------------------------------
'
Public Overrides Sub ACECalculations()
Dim rootmodule As PIModule
Dim sitecode As PIProperty
Dim tempTag As PISDK.PIPoint
Dim taglist As PISDK.PointList
Dim mypisdk As PISDK.PISDK
Dim piserver As PISDK.Server
Dim tagvalue As PISDK.PIValue

Dim myContext As PISDK.PIModule = PIACEBIFunctions.GetPIModuleFromPath(Context)
mypisdk = New PISDK.PISDK
piserver = mypisdk.Servers("PISERVER")

rootmodule = GetPIModuleFromPath(Context)
sitecode = rootmodule.PIProperties("SiteCode")


End Sub

Protected Overrides Sub InitializePIACEPoints()
End Sub

'
' User-written module dependent initialization code
'
Protected Overrides Sub ModuleDependentInitialization()
End Sub

'
' User-written module dependent termination code
'
Protected Overrides Sub ModuleDependentTermination()
End Sub
End Class

 

 

Nested Performance Equations

$
0
0

Hello,

 

I am fairly new to PI, and I am brand new to the forums.  I had a question regarding PI Expression and datasets.  I am working in PI ProcessBook.

 

Currently, I am working on monitoring data to comply with environmental regulations.

 

I have a data set that does a rolling 3 hour average of the data we need to monitor.  The calculation interval is 1m.

I also have a dataset that calculates the timeLT of the same tag.

 

 

tagavg('<tag name>','*-3h','*')

TimeLT('<tag name>', '-1d','*', 1520)/60

 

 

To monitor environmental compliance, what I really need is the TimeLT of the 3 hour average.

 

I tried TimeLT('tagavg('<tag name>','*-3h','*')', '-1d','*', 1520)/60

 

It did not work.  Any help on how to nest expressions or datasets would be appreciated.

 

Thanks

 

Retain tag name & history but change from scanned to calculation tag?

$
0
0

Is it possible to "convert" a scanned PI tag to a calculation tag? 

 

For example, I have a PI tag called FC1200S.  It currently scans a DCS system and has an instrumenttag=FC1200S.PV.  This DCS tag FC1200S is actually a simple calculation (unit conversion from lb/hr to mlb/hr) that I no longer want to perform in the DCS. Is there anyway to keep the FC1200S tag name & history, but change the tag to a performance calculation?

 

Thanks,

Aimee


Iterate through Dataset

$
0
0

In a Processbook display, I have created an ODBC dataset.  The dataset contains approximately 10 columns and 10 rows.  I would like to have all of the information in the dataset displayed in a listbox that is on the display.  How does one step through the values within the dataset?  Or is there a way better way of adding the values of the dataset to the listbox?

 

Thanks

Send notification by email on limit detection using VBA in process book

$
0
0
Hello all, is it possible to send notifications by email on limit detection using VBA in process book ? Thanks in advance for your help.

Linear Scaling

$
0
0

Is there some way implementing Linear Scaling (Shown below) on Raw values received by PI OPC Interface? I understand we can make use of PIPE but I am looking to do it at interface level

 

((MaxEU-MinEU)/(MaxRaw - MinRaw)) * (RawPV - MinRaw) + MinEu

 

Where

MaxEU = Maximum of Scaled Value

MinEU= = Minimum of Scaled Value

MaxRaw = Maximum Raw Value

MinRaw = Minimum Raw Value

RawPV = Raw Process Values that needs scaling

 

Regards

M. Asif

Average calculation for daylight hours

$
0
0

I'm working with data from a solar farm; so many of the point values have values that are useful only during daylight hours. Since points are sampled continuously, when the sun's down we get zero values (no generation). Or other inputs like temperatures are lower, so they don't give a useful reading.

 

How can I sample this data to get an average of values only during daylight hours?

TagTot as event-weighted. Is it possible?

$
0
0

Hi.

 

I need to sum some values in a period in expression. So, I'm using the TagTot function like this:

 

tagtot('my_tag', 't', '*')

 

In this period my tag has this values:

 

30-jun-14 01:00:00 1500

30-jun-14 02:00:00 2500

30-jun-14 05:00:00 6000

 

 

The problem is that I realised that the 'tagtot' function is time-weighted and my tag is an event-weighted. Because of this, the result of the tagtot is not right (1776,205). Using datalink (calculated data > total) I could see that if I use the event-weighted the result is right (10000), but if I use time-weighted the result is the same of the tagtotal (wrong result: 1776,205).

 

 

How can I make tagtot becomes event-weighted? Or, How can I sum values of a event-weighted tag in a period?

 

Thanks in advanced.

Connecting PI Processbook with SQL Server Automatically

$
0
0

Good morning there!

 

Is there any way to immediately sign in to a protected database when opening a PI display?

 

Right now I have PI Calculations performing sql queries and pulling back specific TOP 1 results.  However the database is protected and users have to sign in when opening the display to see the query results.  I'm not sure if there is a way to automate this or am I stuck having to build my VBA code to include opening the database connection performing all of the queries and then refreshing on a set time interval.

 

Any help would be appreciated!

Use PIAdvCalcVal in .net application

$
0
0

Hi,

 

I'm looking a way to use PIAdvCalcVal function from PI Datalink in my .net application (C# or VB.net)

is there any similar function for this?

 

Please help me to find this out

 

 

Thanks in advance,

Wim


Pi Notification NOOB Question

$
0
0

Good morning all,

 

I am running a HP GEN 8 server, with Windows server 2008 R2 OS that was setup by out IT team

 

This is a basic install of a Pi system with Pi Notifications. Everything is installed on this same server.

 

Everything is running fine and dandy with Pi.

 

I have set up PI Notifications on this same server, I have set up some rules with triggers and they run fine. 

 

I have tried to setup email notifications, the server is at our offices in quebec and the client SMTP server is elsewhere in Ontario, their IT have white-listed our outgoing IP (got thru MYIP.net).

 

- when I test the SMTP server configuration I get an error :

 

--------------------
Error
--------------------
From Primary SMTP server: Failure sending mail.
--------------------
OK
--------------------

 

here is the NOOB question - are there any specific server settings that must be done to enable these emails, what am i missing.?
 

FindEq Two Events

$
0
0

Hello,

 

I've attached a picture that may help.  In my system, there is one temperature that is not available in PI.  Therefore, I take samples throughout the week (time is random).  Every other calculation is automated, except for the one manually operated temperature.  The process is fed by two valves that open and close at different times (not consistent).  The picure I've attached is an example from the last day of the valve opens and closures.  I want PI to find when they are both closed so I know when the system was last cleaned.

 

Is there a way to input two events into findeq?

 

Currently, the following is an expression I use in a different process with only one supply valve.

 

PIExpVal("findeq('<tag name>','*','*-48h',""closed"")",'time stamp,0,"server"))

 

 

It may not be possible to include two tags in the same findeq, but is there another way to do it?

 

 

 

 

Attached Images

  • valve pic.png

Specs line on a trend

$
0
0

How can I include two straight lines (Upper and Lower Spec) in a trend? I want to see full range of the variable in the trend and not limited to my specs. I want to track for how long was the variable beyond those specs. It'll be convenient if I have the two lines representing the two specs and don't have to read the scale every time its off the limits.

 

Regards

Joe

Out of order events

$
0
0

I look at the "Snapshot and Archive Stastics" tab in SMT everyday. The count was ~550 (for archive) and kept increasing by couple of tags everyday. I checked the tab this morning and the count showed 20.

 

I also see "Out of order snapshot events" and I am not sure how it is different from "out of order events" (archive).

 

Any assistance is greatly appreciated.

 

Thanks,

Arti

Pi Web Services and WebParts

$
0
0

So, I am trying to play around a little with Web Services (installed) and adding them to WebParts.  I have added the .wsdl file URL in the Web Service Data Sources in WebParts Admin, and that shows me PITimeSeriesService and numerous methods.  When I go to Web Service Datasets- I get errors each time I try to select a service method.  For example, when i try to select GetPIArchiveData I get the following error:

 

Unsupported parameter type 'PIArcDataRequest[]' (parameter'requests').

 

So my question is, what did I miss?  Shouldn't this work if all the methods are found in the previous section?

Viewing all 1120 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>