Author Topic: How to use indirect addressed tag in my VB Solution  (Read 1246 times)

Integram01

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to use indirect addressed tag in my VB Solution
« 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to use indirect addressed tag in my VB Solution
« Reply #1 on: June 13, 2022, 10:28:43 AM »
What address are you putting in the PLCAddress*** property?

Integram01

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to use indirect addressed tag in my VB Solution
« Reply #2 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to use indirect addressed tag in my VB Solution
« Reply #3 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

Integram01

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to use indirect addressed tag in my VB Solution
« Reply #4 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to use indirect addressed tag in my VB Solution
« Reply #5 on: June 14, 2022, 08:19:47 AM »
Did you remove the value from PLCAddressValue in your BasicLabl?

Integram01

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to use indirect addressed tag in my VB Solution
« Reply #6 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.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: How to use indirect addressed tag in my VB Solution
« Reply #7 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?