Proficy iFIX Get Text Database Tag into VBA String Variable

aiki202

Member
Join Date
Aug 2007
Location
Pennsylvania
Posts
178
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 what I have tried with no success:

Where "Fix32.L2.Heartbeat_FromABPLC_Loss_0" is the iFIX Text database tag.

Dim str_DateTimeStamp As String

1st try...
str_DateTimeStamp = Fix32.L2.Heartbeat_FromABPLC_Loss_0.A_CV

2nd try...
str_DateTimeStamp = ReadValue("Fix32.L2.Heartbeat_FromABPLC_Loss_0.A_CV")

The error message I get is #-2147187524
"Field's value not known"

I have the IGS driver setup to communicate to an AB CompactLogix controller. The string data from the PLC looks good in the IGS runtime window. I imported the required IGS tags into the iFIX tag database using the Discovery & Configure utility. I have double checked both and they appear to be setup correctly???

Anyone know what I might am doing wrong?
 
I used the same code today as yesterday but now it is working. This software can certainly cause frustration. Below is some of my code that works in case someone else is having issues in the future (as the help files are really not that helpful IMO).

The 'Fix32.L2.HEARTBEAT_FROMMLPLC_LOSS_0.A_CV' tag is a String tag from Logix 5000 with a length of 30. In the IGS driver it is a Read Only STRING type, and in the iFIX tag database it is a Text type tag with a length of 30.

Private Sub LoadListboxData()

Dim str_DateTimeStamp as String

str_DateTimeStamp = ReadValue("Fix32.L2.HEARTBEAT_FROMMLPLC_LOSS_0.A_CV")
.AddItem (str_DateTimeStamp)
str_DateTimeStamp = ReadValue("Fix32.L2.HEARTBEAT_FROMMLPLC_CONNECT_0.A_CV")
.Column(1, 0) = str_DateTimeStamp

str_DateTimeStamp = ReadValue("Fix32.L2BER.HEARTBEAT_FROMMLPLC_LOSS_1.A_CV")
.AddItem (str_DateTimeStamp)
str_DateTimeStamp = ReadValue("Fix32.L2BER.HEARTBEAT_FROMMLPLC_CONNECT_1.A_CV")
.Column(1, 1) = str_DateTimeStamp

End Sub
 

Similar Topics

Hi I want to press a button on the HMI screen and write to a bit within an Integer within a control logix PLC. The iFix version is 5.5 and using...
Replies
3
Views
2,387
Hello, During runtime I change values of some internal tags (i.e. F_CV of DO tags). And I want them to be saved when I switch runtime off, and...
Replies
10
Views
5,433
Hello All, Can any one assist me with trial version of PROFICY IFIX software as i am new this. Thanks,
Replies
2
Views
1,933
So, Im a wastewater operator and also a digital designer/ web developer and im trying to learn Ifix 6.0 or 5.9 but I cant find any resources to...
Replies
3
Views
1,336
Hello guys, I’m doing some new programming for our WWTP in town. I need to utilize existing SCADA tags for my new programming. I’m used to...
Replies
9
Views
5,427
Back
Top Bottom