Author Topic: issue with strings / Allen Bradley  (Read 1021 times)

danm

  • Newbie
  • *
  • Posts: 8
    • View Profile
issue with strings / Allen Bradley
« on: September 20, 2022, 03:44:49 PM »
Hello, very new here just downloaded and began playing with this.  I am sure it is something simple but I can not get strings to display using 'basic labels'.  I am connected to an Allen Bradley PLC (control logix) and able to display Booleans and number values but text/strings show nothing? I use KEPWareEX 6 also and can see the tags do have a value by using their client.  I get no errors or "Path Destination Unknown" just no display in the label?
Thank You

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: issue with strings / Allen Bradley
« Reply #1 on: September 20, 2022, 04:01:23 PM »
Path Destination Unknown is an error that comes back from the PLC saying the tag either does not exist or does not have external access rights.

Are they standard strings or Custom Length? Custom Length will not display in a BasicLabel

danm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #2 on: September 21, 2022, 07:26:59 AM »
Hello
  Thanks for the quick response!  I ma not a PLC programmer, I code around them.  I believe they would be considered custom length as they are  defined as "String (char limit 82)" in the documentation I was given.  The format is shown as "ROBOT1LINEABUILD.PRODUCTIONORDERID.DATA/82". I have tried putting it in as "ROBOT1LINEABUILD.PRODUCTIONORDERID.DATA", "ROBOT1LINEABUILD.PRODUCTIONORDERID" and "ROBOT1LINEABUILD.PRODUCTIONORDERID.DATA(82)"  The non strings are displaying fine.  What is the format needed and what control is best to display these inside?  Is there any downloadable help files/system?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: issue with strings / Allen Bradley
« Reply #3 on: September 21, 2022, 09:18:41 AM »
Based on the tag name you gave, I am guessing you are using program scope tags as opposed to controller scope. The program scope tags need to be preceded by PROGRAM:

There is a little bit of documentation on it here:

https://advancedhmi.com/documentation/index.php/EthernetIPforCLXCom

I would say try:

PROGRAM:ROBOT1LINEABUILD.PRODUCTIONORDERID

danm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #4 on: September 21, 2022, 12:12:51 PM »
Again Thank you for the fast response!  I was able to call up our PLC coder and he says they are "Program Scoped" tags. He also said the strings are just 'standard AB strings". I added "Program:" as suggested and the label shows "Path Segment Error (Invald Tag Name)".  I did some searching and found a old code snippet that loops through the tags (posted below) but only shows the 'upper level' tags ('Robot1LineABuild').  Is there a similar snippet that can show all 'levels' of the tags ('Robot1LineABuild.PRODUCTIONORDERID') and help me identify the correct tag name?

Code: [Select]
        Dim t() As MfgControl.AdvancedHMI.Drivers.CLXTag
        t = EthernetIPforCLXCom1.GetTagList(60000)
        Using sw As New System.IO.StreamWriter(".\TagList.txt")
            For i = 0 To t.Length - 1
                sw.WriteLine(t(i).TagName)
            Next
        End Using

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: issue with strings / Allen Bradley
« Reply #5 on: September 21, 2022, 02:03:01 PM »
If it shows Robot1LineABuild, that means the strings are inside a UDT named Robot1LineABuild. You will need the program name in which the tags exist.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile

danm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #7 on: September 22, 2022, 09:09:03 AM »
  I tried to compile the CLXTagList_ComboBox and CLXTagList_TreeView they both create errors "'ArrayElements1' is not a member of 'CLXTag'" and repeat for ArrayElements2/3? I also get a error "'UDTStructure' is not a member of 'CLXTag'"? I downloaded "AdvancedHMIv399xR1.zip" from the site here and have only made changes to it as instructed. I placed them under the AdvancedHMIControls/Controls and did a 'clean solution' followed by 'rebuild solution' using Visual Studio 2022 Enterprise ver 17.3.2
  I also found while searching reference to "ReadUDT" (https://advancedhmi.com/documentation/index.php/ReadUDT) and tried using it but it returns "'ReadUDT' is not a member of 'EthernetIPforCLXCom1'"?
  My end goal is to be able to display some of the factory data live using a projector/large screen connected to a PC


Code: [Select]
Private Sub BasicButton3_Click(sender As Object, e As EventArgs) Handles BasicButton3.Click
        Dim MyStructureInstance As CDS
        MyStructureInstance = EthernetIPforCLXCom1.ReadUDT(Of CDS)("Robot1LineABUILD", 1)
    End Sub

    Public Class CDS 'Common Data Structure
        Public PTS_PalletID As Int32
        Public PTS_ProductionOrderID As String
        Public PTS_InternalOrderID As String
        Public PTS_ItemNumber As String
        Public PTS_ItemName As String
        Public PTS_LotCode As String
        Public PTS_ItemGroup As String
        Public PTS_Barcode As String
        Public PTS_CasesPerPallet As Int32
        Public PTS_ProductType As String
        Public PTS_Quarantine As Boolean
        Public PTS_QuarantineOrderID As String
        Public PTS_TimeStamp As String
        Public PTS_PartialCaseCount As Int32
        Public PTS_Partial As Boolean
        Public PTS_MoverClassification As String
        Public PTS_ReservedSalesOrderID As String
        Public PTS_Destination As String
        Public PTS_Location As String
        Public PTS_State As String
        Public PTS_Notes As String
        Public STP_PalletID As String
        Public STP_Destination As String
        Public STP_ACK As Boolean
        Public STP_NACK As Boolean
    End Class

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: issue with strings / Allen Bradley
« Reply #8 on: September 22, 2022, 02:46:17 PM »
I updated the tag browser to Beta 38 and posted the full source:

https://www.advancedhmi.com/downloads/AdvancedHMIv35TagBrowser399y38.zip

danm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #9 on: September 22, 2022, 03:37:50 PM »
Thank You!! That tag browser works wonderfully.  I found the tag needed for my example.  What would be the correct syntax to use in the 'PLCAddressValue' field to display it? I tried "Robot1LineABUILD(Pallet_Data)PALLETID.data","Robot1LineABUILD("Pallet_Data")PALLETID.data","Robot1LineABUILD.Pallet_Data.PALLETID.data" also the same without the '.data' suffix.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: issue with strings / Allen Bradley
« Reply #10 on: September 22, 2022, 04:06:50 PM »
What is the program the tag resides in (assuming it is a Program Scope tag)?

bachphi

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #11 on: September 22, 2022, 05:22:34 PM »
from his screenshot, it's not program scope tags.

 'PLCAddressValue' = Robot1LineABUILD.PALLETID
« Last Edit: September 22, 2022, 05:26:45 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: issue with strings / Allen Bradley
« Reply #12 on: September 23, 2022, 11:32:36 PM »
Not really sure if this is critical but do pay attention to the upper / lower case letters, so the tag should be Robot1LineABuild.PalletID - exactly as the Tag Browser shows them - and if DATA is to be used then add it as such: Robot1LineABuild.PalletID.DATA.