Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bachphi

Pages: [1] 2 3 ... 43
1
Support Questions / Re: ImageDisplayByValue
« on: January 02, 2024, 09:30:24 AM »
1. ImageDisplayByValue property set Autosize to False.
2. You can change size of image in the property of ImageList.

This is incorrect! Image size is limited to 255x255

2
Support Questions / Re: Please Help a newbie get started - i'm lost
« on: December 22, 2023, 09:36:53 AM »
As Godra said, take some time and learn.
I noticed that you just signed up and immediately asked questions.
In addition, the function of adding a new form is about Microsoft Visual Studio, not AAHMI.
I did a search and there are several links that talk about adding forms.

3
Open Discussion / Re: All I want for this Christmas
« on: December 04, 2023, 02:17:26 PM »
OK, you were not inspired by the 2015 movie.
I know enough about the dragonfly.

Did you know when the dragonfly is flying low, it means it's about to rain and when it's flying higher, it means it's sunny?

4
Open Discussion / Re: All I want for this Christmas
« on: December 04, 2023, 10:49:39 AM »
Dragonfly!  The animated series or the scary one?

5
Open Discussion / Re: ReadUDT Size
« on: December 04, 2023, 10:44:54 AM »
Have you checked the actual string?

6
Open Discussion / Re: ReadUDT Size
« on: December 02, 2023, 08:51:30 PM »
LOL, you realized it's for Codesys PLC, not Rockwell source.

I would trust this guy Ron Beaufort: https://www.plctalk.net/qanda/showthread.php?t=59105

Plus, a string contains ASCII code from 0-255., make more sense than -128-127.

7
Open Discussion / Re: All I want for this Christmas
« on: December 02, 2023, 08:45:40 PM »
Godra,  I was only testing out its capability. You are way far ahead of me.

8
Open Discussion / Re: ReadUDT Size
« on: December 02, 2023, 03:40:37 PM »
If you look at the tag in the PLC, you will see that that the data array index start at 0. So If a custom string length of 20, then you need to have 20-1=19.

Another thing you need to look at is the data type in the PLC is SINT. What is SINT?  is it really equivalent to SByte?
SINT is short integer(0 to255) not signed integer, a SByte is Signed Byte(-128 to 127)

9
Open Discussion / Re: ReadUDT Size
« on: December 02, 2023, 01:53:32 PM »
Aye, your issue was not about the size of the UDT, but rather in the string tag.  Now you can concentrate on finding the fix for it.

10
Open Discussion / All I want for this Christmas
« on: December 01, 2023, 07:34:54 PM »
Is an easier way to read the UDT tags with AAHMI.

My recent experience with node-red is blowing me away with how easy it is to read/subscribe tags including UDT tags.

First, the Tag Browser brings up all tags in the processor, then clicking on the tag that you want to read/subscribe will get it into the Tag list with proper data type automatically defined.


In the 1st screenshot, DTCurrent is a UDT tag that contains date time info  AND a custom string length of 20. The FreeRunning tag is a TIMER. As you can see, in the node-red they are STRUCT type.


In the 2nd screenshot, showing all the atomic data type and the debug data from the two tags



The ethernet driver module that I use is the 'node-red-contrib-cip-st-ethernet-ip'  and on Github: 
https://github.com/st-one-io/node-red-contrib-cip-ethernet-ip

11
Open Discussion / Re: ReadUDT Size
« on: December 01, 2023, 06:36:26 PM »
I normally approach the issue by simplifying,  dividing and conquering.

Can you verify that you can read a simple tag with your custom length of 4?

12
Open Discussion / Re: ReadUDT Size
« on: November 23, 2023, 10:37:26 AM »
That's probably why.  My PLC is a 5370.
Such messy string definition , for ex. STRING_8 can contains up to 24 chars.

I was able to import it into a L330ERMS2, rework the UDT to v2.  then import to my PLC.
It took less than a second to read all tags.
see picture & attached v2.



13
Tips & Tricks / GetTagList into a Treeview
« on: November 19, 2023, 08:35:03 PM »
Courtesy from Archie:
Code: [Select]
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        EthernetIPforCLXCom1.IPAddress = TextBox1.Text
        EthernetIPforCLXCom1.ProcessorSlot = TextBox2.Text

        '* Retreive the tags from the PLC
        Dim AllTags() As AdvancedHMI.Drivers.CLXTag = EthernetIPforCLXCom1.GetTagList

        '* Clear anything in the TreeView
        TreeView1.Nodes.Clear()

        '* Add all tags to the tree view
        For i = 0 To AllTags.Length - 1
            Dim Node As New TreeNode(AllTags(i).TagName)

            If AllTags(i).ArrayElements1 > 0 And AllTags(i).ArrayElements2 <= 0 Then
                Node.Text &= " [" & AllTags(i).ArrayElements1 & "]"
            ElseIf AllTags(i).ArrayElements2 > 0 And AllTags(i).ArrayElements2 <= 0 Then
                Node.Text &= " [" & AllTags(i).ArrayElements1 & "," & AllTags(i).ArrayElements1 & "]"
            ElseIf AllTags(i).ArrayElements3 > 0 Then
                Node.Text &= " [" & AllTags(i).ArrayElements1 & "," & AllTags(i).ArrayElements1 & "," & AllTags(i).ArrayElements3 & "]"
            End If

            '* If the Tag is a UDT, then add the structure name in parentheses
            If (AllTags(i).IsStructure) Then
                Node.Text &= " (" & AllTags(i).UDTStructure.Name & ")"
            End If

            TreeView1.Nodes.Add(Node)

            '* If the Tag is a UDT, then add the structure definition as a tree node
            AddSubNode(Node, AllTags(i).UDTStructure)
        Next
    End Sub


    Private Sub AddSubNode(node As TreeNode, UDTstructure As AdvancedHMI.Drivers.CIP.CLXTemplateObject)
        If UDTstructure IsNot Nothing Then
            For i = 0 To UDTstructure.Members.Count - 1
                Dim SubNode As New TreeNode(UDTstructure.Members(i).Name)
                node.Nodes.Add(SubNode)

                '* If the member is a UDT, then recursively add the UDT structure as a sub node
                AddSubNode(SubNode, UDTstructure.Members(i).SubTemplate)

                '* If the member is an array, then add the element count in brackets
                If UDTstructure.Members(i).ArrayElements > 0 Then
                    SubNode.Text &= " [" & UDTstructure.Members(i).ArrayElements & "]"
                End If

                '* If the member is another UDT, then add the name in parentheses
                If UDTstructure.Members(i).SubTemplate IsNot Nothing Then
                    SubNode.Text &= " (" & UDTstructure.Members(i).SubTemplate.Name & ")"
                End If
            Next
        End If
    End Sub

14
Open Discussion / Re: Coming Soon.....
« on: November 19, 2023, 08:15:37 PM »
From 4.0 which released back in 2010 to 8.0 in 2023 . That's a really big jump.

Will it run straight in pi without installing mono?

15
Open Discussion / Re: ReadUDT Size
« on: November 19, 2023, 08:12:39 PM »
No good , wont import.

Error: Object does not exist.
Import failed - 1 error(s), 0 warning(s) - No changes were made to the project

STRING_16 is built in. No need to include

Pages: [1] 2 3 ... 43