IFIX VBA Script

Join Date
Dec 2020
Location
Dalarna
Posts
1
Private Sub DataLink70_Click()
'The Comments below have been added automatically.
'Any changes could cause adverse effects to the functionality
'of the Script Authoring Experts.
'WizardName=DataEntry
Dim vntLow As Variant
Dim vntHigh As Variant
Dim intReturn As Integer
Dim blnFetch As Boolean

On Error GoTo ErrorHandler
If blnDataEntryFrmFlag = True Then
Exit Sub
End If
GetFormNumeric
FetchLimits "Fix32.FAST2.701_5_LA01_ST52_BV_MAX.F_CV", vntHigh, vntLow, intReturn
Numeric.GetTheLimits H:=vntHigh, L:=vntLow
blnFetch = True
Numeric.IsAlpha A:=False
Numeric.GetTheVars A:=1, B:="Fix32.FAST2.701_5_LA01_ST52_BV_MAX.F_CV"
Numeric.Show
Exit Sub

ErrorHandler:
HandleError

The bolded and red text is the Datalink Source of a tag which the user is able to write to, but is there a way to make the Datalink Source be like vntDataSource or something like that, so you only have to change the datalink source outside of the VBA and dont have to change in the VBA script?
 
iFix does this with tag substitution.
It's a bit hazy now and I don't have iFix where I am, but you can create files to map your tags to so that the substitution happens. There's also a way to substitute part of the tag name with a parameter passed to an object. If all your motor tags are MOTOR_XXX.Start, Stop, etc... the XXX can be replaced by a parameter passed on.

Have you looked for tag substitution in the help or iFix manual?
 
You have to create a tag group table and then the tags in the script become @@tagname@@.
"Tag Substitution" or "Tag Groups" are indeed the help file entry you are looking for
 

Similar Topics

I have an HMI based on Proficy Ifix 5.5 which contains a header, footer, and main screen. the footer contains a panel of navigating buttons which...
Replies
0
Views
1,358
Hi. I have a Proficy iFIX V5.8 & V5.5 & V3.5. In the iFIX WorkSpace V5.5, V5.8 can open multiple instances of a single picture: OpenPicture &...
Replies
0
Views
3,113
I am trying to simply display a PLC string tag value (text) in a VBA control (msgbox or anything...just to get it working). The following code is...
Replies
2
Views
5,971
I have a Proficy iFIX 5.8 application running on a Win 7 Embedded OS with a touch screen. I am looking for a way to perform a controlled shutdown...
Replies
1
Views
2,816
Regarding Proficy iFIX 5.8...is there a way to access the properties of an object that is located on Picture "A" from the VBA code on Picture...
Replies
6
Views
6,366
Back
Top Bottom