VBA code

Saiyed.mufish

Member
Join Date
May 2012
Location
Gujrat
Posts
14
Sir,
i need to decript the attached vbcode, and i dont know the language wish to know what it does exactly.
i m doing a project of converting 4 no of rsview 32 to one ft view all is done but the alaram and few other things are prety hectic as they are written in Vbo_O


eg: Sub Alarm_Analog(h1, h2)

h1 and h2 goes for my alaram tags and runned through VB. are replicated as a digital hmi tag.
image attaced and the tag goes like this..
VbaExec Alarm_Analog ASH1781A,AT1781A

please help me cause i m not able to get a single alarm in my Ft view SE. there is an option available in FTview as Vba code but dont know how to use it. i did tried to copy paste the same code but it do not work....

its critical as i m having my Factory Acceptance Test day after tomorrow.:eek:

your help is really appreciated.
regards
saiyed mufish.

vba.jpg
 

Attachments

  • E106A.txt
    23.4 KB · Views: 60
  • E107A.txt
    123 bytes · Views: 21
please help me cause i m not able to get a single alarm in my Ft view SE. there is an option available in FTview as Vba code but dont know how to use it. i did tried to copy paste the same code but it do not work....
This tells you what the VBA routine "Sub Alarm_Analog(h1, h2)" does and which tags it needs to operate. h1, h2, and also h3 must be set for YOUR tag, not the current pressure tags h1 = "PSL1790A", h2 = "PT1790A", h3 = "SP_" & h1

Sub Alarm_Analog(h1, h2)
' Generates Alarm Diagnostics Screen for Analog Alarms derived from transmitter input
' Recognises Pressure, Temperature and Level Transmitters and High and Low Trip Functions
' GNH - 5/12/01
On Error GoTo Err_Handler
Dim T1, T2, T3 As Tag
Dim D1 As DigitalTagAlarmCfg
Dim A_Status
A_Status = Array("Shutdown", "Alarm Only", "Control Action", "System Advisory")

m1 = "TRANSIENT or TRANSMITTER FAILURE"
m2 = "GENUINE CONDITION - Check Historical Trend; Check Regulator (if fitted) & Transmitter"
m3 = "GENUINE CONDITION - Check Historical Trend; Check Supply & Transmitter"
m4 = "GENUINE CONDITION - Check Operation (Trend) & Transmitter"
m5 = "GENUINE TRIP - Check Operation (Trend) & Transmitter, Check Overflow Blockage"

' h1 = "PSL1790A"
' h2 = "PT1790A"
h3 = "SP_" & h1
' If UCase(Right(h3, 1)) Like "[A-Z]" Then h3 = Left(h3, (Len(h3) - 1))


Set T1 = gTagDb.GetTag(h1) ' Alarm Tag
Set T2 = gTagDb.GetTag(h2) ' Process Value
Set T3 = gTagDb.GetTag(h3) ' Alarm Setpoint

Did you pass your Factory Acceptance test?
 
Last edited:
This tells you what the VBA routine "Sub Alarm_Analog(h1, h2)" does and which tags it needs to operate. h1, h2, and also h3 must be set for YOUR tag, not the current pressure tags h1 = "PSL1790A", h2 = "PT1790A", h3 = "SP_" & h1


Did you pass your Factory Acceptance test?

Thanks for asking, Actually i failed and i m still working. i faced a new problem alarm are later part and i succeeded in getting all the digital alarms as there is no VB used .
my present problem is my event are not working, event works for simple tag but it wont pop up my display and exit it through event. my knowledge says that its due to emulator.i had attached images regarding it.
i m not pretty sure about it.

i m under intense pressure from my company cause this project cost near bout 7.8 million Indian rupees which is actually more and all the hardware is already procured.
if its not done before November then it will be delayed till march end.
so its kind of hanging knife on my neck.
 
Last edited:

Similar Topics

Hello Every one, I need a help on vba code for getting data from MSSQL server 2014 to display in FTview SE client version 12 . Thanks. Please...
Replies
4
Views
1,805
Hoping for some help on this one, we are running FTVIEW SE distributed on a server. The client file runs fine on this server. We have...
Replies
4
Views
3,731
Hello, it's been a little over a year now that I've been learning citect scada alone in version 7.2, I know how to make pages, synoptics, create...
Replies
4
Views
7,056
Hello guys, can anyone help me with FactoryTalk View Studio. I need to use a Global Object that contains VBA Macros in different displays, but it...
Replies
1
Views
1,673
I have VBA code on a FactorTalk View SE v11 project that reads various PLC tags in a FOR loop. All is good if the PLC tag exist. But for a...
Replies
4
Views
3,551
Back
Top Bottom