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] 4 5 ... 43
31
You can install excel in the PC that running AAHMI, make sure to get a legit copy from Microsoft.
then in AAHMI,
Code: [Select]
        Try
            oXL = New Excel.Application()               ' or New Excel.Application() or CreateObject("Excel.Application")
            oWb = oXL.Workbooks.Add(Type.Missing)       ' Get a new workbook.
            oXL.Visible = True
            oXL.WindowState = Excel.XlWindowState.xlMinimized
            oWs = oWb.Worksheets("Sheet1")
            oWs.Activate()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Next open a DDE conversation and DDE commands.

33
Support Questions / Re: "The path is not of a legal form" error
« on: July 21, 2023, 12:11:13 PM »
Is '.To_App_Reset_Request' a custom string?

Is 'RFID_Security' UDT a Safety class or Standard? and is it set for External Access= Read/Write?

 I may see a problem here:  'RFID_Security' is a UDT. Normally we can have another UDT below it,  but it appears in this case,  that 'AOI_RFID' is an AOI, not a sub UDT, hence their tags are local access.

Can  you export the UDT and AOI, I can test it out.

34
Support Questions / Re: "The path is not of a legal form" error
« on: July 21, 2023, 08:52:22 AM »
I don't have a crystal ball, a little more info would be helpful, copy the code or screenshot...
May be checking for an extra space in the path.

35
Open Discussion / Re: Zombie posts
« on: June 30, 2023, 09:28:38 AM »
All quiet on the western front!

Looked like they did not want to mess with the EnforClerks Jay & Silent Bob.
Oh Wait, new avatar change to Olaf Metal guy.

36
Support Questions / Re: Monitor change in Rockwell PLC
« on: June 20, 2023, 02:30:41 PM »
Yes, you need FactoryTalk AssetCentre.

37
Open Discussion / Re: Zombie War
« on: June 20, 2023, 11:40:27 AM »
It looks like we started a war with the zombies now and they are going hi-tech with AI.
We'll see what happens.

38
Open Discussion / Re: Zombie posts
« on: June 20, 2023, 07:38:48 AM »
In related to this post: https://www.advancedhmi.com/forum/index.php?topic=1823.msg18327#msg18327

Are they going to AI now or some sort? not sure what the removed link was.

39
Open Discussion / Re: Zombie posts
« on: June 15, 2023, 12:21:39 PM »
Great job so far!!


40
Open Discussion / Zombie posts
« on: June 08, 2023, 07:28:38 AM »
Archie,

There are too many zombie posts lately and it's really annoying. 
Can you take a look at the process of creating a new username and see if you can beef it up. 
Have a moderator to kill & ban these types of posts. 
Do not allow a new username the ability to post until at least  a few days later.

41
How to communicate to a 1734-AENT, 1734-AENTR rack with EEIP Ethernet/IP library.

With the current market supply situation, getting a PLC may be an issue for some,
and for a simple job, you may not need to have a PLC, but using just  I/O via Point IO ethernet adapter/coupler 1734-AENT and EEIP ethernet/ip library. 
The EEIP library can be downloaded from Sourceforge web site.
There are sample codes as well as a Youtube video (https://www.youtube.com/watch?v=NLCXnVpDgl4). 

But after following their sample and instruction, I could not get my solution running, and keep getting error:
An unhandled exception of type 'Sres.Net.EEIP.CIPException' occurred in EEIP.dll
Connection failure, General Status Code: 1 Additional Status Code: 789 Invalid segment in connection path.
From what I can see, other people ran into the same  issue.

Below is my actual working solution and its setup:

I set up the AENT with a static IP address, and a rack size of 4 ( AENT + IB8 + OB8E + IB8).
I  set Slot 1 Input bit 3 to be ON, and slot 3 input bit 5 ON.

Code: [Select]
Imports System
Imports Sres.Net.EEIP

Module Program


    Sub Main(args As String())

        ' The Following Hardware Configuration Is used in this example
        '  Allen-Bradley 1734-AENT Ethernet/IP Coupler
        '  Allen-Bradley 1734-IB8 8-Channel Digital Input Module [Input 3 ON]
        '  Allen-Bradley 1734-OB8E 8-Channel Digital Output Module w Status
        '  Allen-Bradley 1734-IB8 8-Channel Digital Input Module [Input 5 ON]

        '  This example also handles a reconnection procedure if the Impicit Messaging has Timed out
        '  (If the Property "LastReceivedImplicitMessage" Is more than one second ago)

        Dim eeipClient As EEIPClient = New EEIPClient()

        Try
            eeipClient.IPAddress = "192.168.10.11"  ' IP address
            eeipClient.TCPPort = &HAF12             ' port 44818

            eeipClient.RegisterSession()

            'From the eds file, the path for the Exclusive Owner Assembly Connection Is:
            '"20 04 24 66 2C 64 2C 65" ( Class 4, Config Assy. 102, Output Assy. 100, Input Assy. 101)
            eeipClient.ConfigurationAssemblyInstanceID = &H66   '102

            ' Parameters from Originator -> Target [OUTput from O=>T for 'Consumsed']
            eeipClient.O_T_InstanceID = &H64    ' Instance ID of the OUTput Assy. 100
            eeipClient.O_T_Length = 1          '#OfOutputModules The Method "Detect_O_T_Length" detect the Length using an UCMM Message
            eeipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit    ' Header Format
            eeipClient.O_T_OwnerRedundant = False
            eeipClient.O_T_Priority = Sres.Net.EEIP.Priority.Scheduled  'implicit msg
            eeipClient.O_T_VariableLength = False
            eeipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point
            eeipClient.RequestedPacketRate_O_T = 100000     ' 500ms is the Standard value

            ' Parameters from Target -> Originator [T Produced to O as Inputs]
            eeipClient.T_O_InstanceID = &H65    '' Instance ID of the INput Assy. 101
            eeipClient.T_O_Length = 11          ' 8-bytes status header + 2In + 1 OutInstance
            eeipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Modeless
            eeipClient.T_O_OwnerRedundant = False
            eeipClient.T_O_Priority = Sres.Net.EEIP.Priority.Scheduled
            eeipClient.T_O_VariableLength = False
            eeipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Multicast
            eeipClient.RequestedPacketRate_T_O = 100000     ' RPI in  500ms is the Standard value

            ' Forward open initiates the Implicit Messaging
            eeipClient.ForwardOpen()

            While Console.ReadKey().Key <> ConsoleKey.Enter

                Dim ReturnedData As Byte() = eeipClient.AssemblyObject.getInstance(&H65)
                Console.WriteLine("State of 1st Input byte: " & ReturnedData(8))
                Console.WriteLine("State of 2nd Output byte: " & ReturnedData(9))
                Console.WriteLine("State of 3rd Input byte: " & ReturnedData(10))

                'eeipClient.O_T_IOData(0) = 3                'Write to Slot 2 Output Bit 0 & 1
                System.Threading.Thread.Sleep(500)

            End While


        Catch ex As Exception
            Console.WriteLine("Exception:" & ex.ToString)

        Finally
            ' Close & Unregister the Session
            eeipClient.ForwardClose()
            eeipClient.UnRegisterSession()
        End Try



    End Sub
End Module



42
Open Discussion / Re: ModbusTCP display value of partial register.
« on: April 28, 2023, 10:41:51 AM »
Looks like you know what you are doing.  Does it work?
A while back I was doing J1587/ J1708  protocol for serial.

43
Support Questions / Re: Program locks up if connection is interrupted
« on: April 23, 2023, 04:32:49 PM »
It appears there is a bug in the timeout of the ping command, anything less than 500 ms will default to 500ms. It will work with multiples of 500 ms.

Are you going to test out the new driver?

Code: [Select]
    Dim PingSender As Ping = New Ping()
    Dim PLCIsConnected As Boolean() = Nothing

    Dim lines() As String = ReadAllLines(".\PLCDevicesList.txt")
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Debug.Print(DateTime.Now())
        Dim i As Integer = 0
        ReDim PLCIsConnected(lines.Count() - 1)
        For Each lineItem In lines
            Dim PingResponse As PingReply = PingSender.Send(lineItem, 500, Encoding.ASCII.GetBytes(1), New PingOptions(64, True))
            If PingResponse.Status = IPStatus.Success Then
                PLCIsConnected(i) = 1
            Else
                PLCIsConnected(i) = 0
            End If
            i = i + 1

        Next
        Debug.Print(DateTime.Now())
    End Sub


Archie,  how about adding a function 'IsConnected' to the driver?  Other drivers I have seen, they all have that  feature.

44
Open Discussion / Re: Floating Numeric display
« on: April 18, 2023, 08:10:42 PM »
With version 3.99y it works fine. Since I have made my application with version 3.99x, it is possible to implement it in an easy way in version 3.99x, to perform readings of double integer and floating numbers, and not have to change all the program I have made to version 3.99y.

Why not let the pro handle it for the unbelievably low price upgrade service for 5 bucks:

https://www.advancedhmi.com/index.php?main_page=product_info&cPath=2&products_id=11

45
Open Discussion / Re: Siemens S7 driver
« on: April 07, 2023, 10:12:03 PM »
I have to work with siemens s7-1500, what is the best easy and reliable way to do it with adhmi, and if possible?.
I think following Archie's steps is the easiest way. Any chance you can show us your way if that is possible.

Pages: 1 2 [3] 4 5 ... 43