AdvancedHMI Software

General Category => Support Questions => Topic started by: Integram01 on June 13, 2022, 10:22:33 AM

Title: How to use indirect addressed tag in my VB Solution
Post by: Integram01 on June 13, 2022, 10:22:33 AM
Hello,
I am using Controllogix 5000 with AdvanceHMI and trying use indirect addressing from PLC. We have 105 similar robot which are indirectly used in PLC by a pointer. On Advance HMI when i am using the indirectly addressed tag it give me error "PLC Tag not valid". Would anyone be able to help me out if they have used indirect addressing in their project. Thanks.
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Archie on June 13, 2022, 10:28:43 AM
What address are you putting in the PLCAddress*** property?
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Integram01 on June 13, 2022, 02:52:01 PM
My PLC tag is PLC_Force_GO[AGV_Ptr] and i am using the same tag in the VB PLC address property.
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Archie on June 13, 2022, 03:17:31 PM
AdvancedHMI cannot accept that address because it doesn't know how to interpret AGV_Ptr. You can do this by adding a DataSubscriber for AGV_Ptr. In the DataReturned event handler , you can then add this code:

Dim Value as string=EthernetIPForCLXCom1.Read("PLC_Force_GO[" & e.values(0) & "]")
Label1.Text=Value
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Integram01 on June 14, 2022, 07:53:12 AM
Hi Archie,
I tried adding a Datasubscriber as mentioned by still it says "PLC Tag invalid". Please see below the code i used for data subscriber.
CODE:

 Private Sub DataSubscriber1_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber_AGV_Ptr_3_Pass.DataReturned
        Dim Value As String = EthernetIPforCLXCom1.Read("PLC_Force_GO[" & e.Values(0) & "]")
        BasicLabel39.Text = Value
    End Sub
End Class
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Archie on June 14, 2022, 08:19:47 AM
Did you remove the value from PLCAddressValue in your BasicLabl?
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Integram01 on June 14, 2022, 02:30:19 PM
oops. Yes i did now. Looks like i am not getting any error but seems like i cannot communicate with the tag. When i press the button it does nothing on the PLC.
Title: Re: How to use indirect addressed tag in my VB Solution
Post by: Archie on June 14, 2022, 03:01:14 PM
oops. Yes i did now. Looks like i am not getting any error but seems like i cannot communicate with the tag. When i press the button it does nothing on the PLC.
Press a button? On the HMI?