RSView32 tag descriptions

jonsina72

Member
Join Date
Mar 2010
Location
Middlesbrough
Posts
15
Hi all,

I am a necomer to vba and require a bit of help...

is it possible to modify a tag description in the database for alarm purposes via a runtime display

ie.
tag1 description is "Rig x High High Alarm"
I want them to be able to change the rig number on a display so that any alarm relating to the new number will display correctly.

so if rig number was 2345, tag1 alarm would be "Rig 2345 High High Alarm"

I can almost do it via vb using the following but the project needs restarting for it to take effect:

Public Sub tester()
Dim text1 As Tag
Dim text2 As Tag
Set text1 = gProject.TagDb("test1")
Set text2 = gProject.TagDb("test2")
text1.Description = text2.Value
text1.WriteConfiguration
gTagDb.Synchronize
End Sub

where test1 is a digital tag with alarm
and test2 is a string
the routine is called via a pushbutton where the rig number is typed into test2 and then the pushbutton is pressed to update the description for test1.

any help would be greatly appreciated.

Regards,
Jon
 
not to sound desperate, but anyone know how to do this?

I'm guessing that I need to stop & restart the database somehow after the change to update all the descriptions but have no idea how.
 
quick update if anyone can help

Hi all,

I have the following VB code that does what I want EXCEPT I need to restart the project for the alarms in the Alarm Viewer to appear correctly (the Tag Descriptions update immediately in the database).

Public Sub Rig1()
Dim HH As Tag
Dim H As Tag
Dim L As Tag
Dim LL As Tag
Dim FLT As Tag
Dim SENS As Tag
Dim NAME As Tag
Dim TEMP As String

'Setup tags as CP1
Set NAME = gProject.TagDb("R1\NAME")
Set HH = gProject.TagDb("R1\CP1\HH")
Set H = gProject.TagDb("R1\CP1\H")
Set L = gProject.TagDb("R1\CP1\L")
Set LL = gProject.TagDb("R1\CP1\LL")
Set FLT = gProject.TagDb("R1\CP1\FLT")
Set SENS = gProject.TagDb("R1\CP1\NAME")

'Setup High High Alarm Description
TEMP = NAME.Value & " " & HH.Description
HH.Description = TEMP
HH.WriteConfiguration

'Setup High Alarm Description
TEMP = NAME.Value & " " & H.Description
H.Description = TEMP
H.WriteConfiguration

'Setup Low Alarm Description
TEMP = NAME.Value & " " & L.Description
L.Description = TEMP
L.WriteConfiguration

'Setup Low Low Alarm Description
TEMP = NAME.Value & " " & LL.Description
LL.Description = TEMP
LL.WriteConfiguration

'Setup Fault Alarm Description
TEMP = NAME.Value & " " & FLT.Description
FLT.Description = TEMP
FLT.WriteConfiguration

'Setup Sensor Name for Popup
TEMP = NAME.Value & " " & SENS.Description
SENS.Description = TEMP
SENS.InitialValue = TEMP
SENS.WriteConfiguration

'Synchronise database
gProject.TagDb.Synchronize

End Sub


So the question now is does anyone know how to restart the database or alarm database via the VB?

Cheers,
Jon
 

Similar Topics

I have been working on and off with a customer who has a PLC-5/80E that is communicating with five different PCs that are running RSView32 v...
Replies
3
Views
1,728
Hey guys, A new client I'm working with has an older system, running RSView32 with AB SLCs and Logix500. I want to copy the existing project and...
Replies
8
Views
5,060
I was wondering if anyone knew of a way to export a list of tags that are used in each graphic in RSView32.
Replies
4
Views
2,425
Hi guys, I am new to RSView32, I have been requested to redesign an existing SCADA system whereby a SLC 5/04 PLC communicates with multiple...
Replies
6
Views
2,265
dear All , I have created a tag in RSView32. I want to tie it to a bit in binary file (B3)in Rslogix 500. How to do it ? Thanks
Replies
1
Views
1,562
Back
Top Bottom