Author Topic: Do-More BRX EthernetIP?  (Read 756 times)

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Do-More BRX EthernetIP?
« on: October 12, 2023, 04:54:31 PM »
AdvancedHMI version 3.99x
Visual Studio Commuinity 2019
Windows 11 OS
Windows PC
Various Automation Direct BRX series PLC's over Ethernet Network

Trying to figure out a possibility to incorporate Advanced HMI with the BRX PLC's without using the ModbusTCP server. Our programs are not designed to use the ModbusTCP Registers, nor do we use the RS-232/485 port. Based on the BRX data sheet, the BRX EthernetIP utilizes the same 44818 port as listed in the Allen Bradley PLC drivers within the AdvancedHMI program.

I'm assuming this would need a custom driver to allow the AdvancedHMI to communicate with the BRX via EthernetIP. Or is passing this type of data not possible with these PLC's without utilizing the ModbusTCP Server.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Do-More BRX EthernetIP?
« Reply #1 on: October 12, 2023, 05:12:15 PM »
Just quickly looking at the BRX Ethernet/IP specification, you can probably use the server and VB code with AdvancedHMI to read the data values. But it will not work using the normal driver/component setup in AdvancedHMI.

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #2 on: October 12, 2023, 06:32:54 PM »
Just quickly looking at the BRX Ethernet/IP specification, you can probably use the server and VB code with AdvancedHMI to read the data values. But it will not work using the normal driver/component setup in AdvancedHMI.

I do apologize but can you elaborate on the use of the server and VB code? All my past experience with AdvacnedHMI was with Allen Bradley at a previous facility, so it was rather seamless. The BRX PLC's and Do-More are new-ish to me. I'm just having some difficulties understanding the process.

I may just create a subroutine to assign the ModbusTCP Registers so I can communicate with AdvancedHMI. We don't plan to run our equipment via AdvancedHMI, but more as a form of troubleshooting. Also as a way to cut down times of opening programs and loading projects for troubleshooting, along with monitoring data; and being able to remove some Engineering only menus in the physical HMI's at the equipment. All of our projects are rather small and very similar to each other. I've tested this in the Do-More simulator but have not had the chance to test it on a live piece of equipment.


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Do-More BRX EthernetIP?
« Reply #3 on: October 12, 2023, 07:41:17 PM »
The normal AdvancedHMI controls work by using PLCAddress properties. These addresses are sent to the PLC to retrieve the data.

The BRX PLC with Ethernet/IP uses Object and instance numbers which the AdvancedHMI drivers do not know how to parse. With the EthernetIPforCLX driver, there are functions you can call through VB that will return data when requesting by Object and InstanceID.

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #4 on: October 12, 2023, 08:10:21 PM »
The normal AdvancedHMI controls work by using PLCAddress properties. These addresses are sent to the PLC to retrieve the data.

The BRX PLC with Ethernet/IP uses Object and instance numbers which the AdvancedHMI drivers do not know how to parse. With the EthernetIPforCLX driver, there are functions you can call through VB that will return data when requesting by Object and InstanceID.

Ahh ok, the ligh bulb finally kicked on. Thank you for clearing that up for me. You the man!

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #5 on: October 13, 2023, 12:44:02 PM »
Well I'm feeling kind of defeated. After 12 hours of beating the keyboard I have come to the conclusion that I am extremely rusty when it comes to VB. So until someone who is more intelligent with VB is willing to grace me with their knowledge, I am going to have to revert back to the ModbusTCP integration into the programs.

This was the best error free thing I could come up with, but of course it does not work and probably not even close to what needs to be done.

Code: [Select]
Public Function GetDataByObjectAndInstanceId(ByVal obj As Object, ByVal instanceId As Integer) As Object
        Dim data As Object = Nothing

        ' Code to retrieve data based on object and instanceId
        If obj.GetType() Is GetType(String) Then
            ' Retrieve data for string object
            data = "Data for string object"
        ElseIf obj.GetType() Is GetType(Integer) Then
            ' Retrieve data for integer object
            data = "Data for integer object"
        End If

        Return data
    End Function

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Do-More BRX EthernetIP?
« Reply #6 on: October 13, 2023, 01:56:04 PM »
From Page 40 of the Chapter 13 , the class ID is 40, Instance 101, attribute 3
Code: [Select]
        EthernetIPforCLXCom1.BeginGetAttributeSingle(4, 101, 3)

The data returned will need to be parsed from bytes:
Code: [Select]
    Private Sub EthernetIPforCLXCom1_DataReceived_1(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom1.DataReceived
        '* Parse the data using e.RawData or e.Values
    End Sub

I would also put some code here to be notified of any errors:
Code: [Select]
    Private Sub EthernetIPforCLXCom1_ComError_3(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles EthernetIPforCLXCom1.ComError

    End Sub

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #7 on: October 13, 2023, 03:01:02 PM »
Here is a link for the page in the manual that Archie referred to: 
https://cdn.automationdirect.com/static/manuals/brxuserm/brxuserm.pdf#page=799

Perhaps, you can use the Molex tools to poke around and see the data as well:
https://tools.molex.com/webdocs/mysst/EIP%20Tool%20v2.6.1.zip
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #8 on: October 15, 2023, 02:47:58 AM »
I appreciate the assistance. Since moving to this new facility, the Automation Direct equipment has been an unexplored territory for me. I have everything defined in the PLC program to establish which data to capture/manipulate through the EtherNet/IP Server/Adapter to define the assembly data for the instance numbers. I need to read/write C Memory, X Inputs, and Y Outputs. I've frequently referred to the manuals as I learn the new systems and programming.

I've used AdvancedHMI previously to create what we called "The God Tool", but it was with solely Allen Bradley components. My troubles are with the AdvancedHMI software and how to configure the drivers to talk with the BRX PLC. I foresee more configuration woes in the future when trying to utilize AdvancedHMI with other forms of equipment we use. I'm always eager to learn new forms of programming but I have not touched VB in many years. So I took a break from just winging it and hit the books again to get back up to speed when it comes to VB.   

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Do-More BRX EthernetIP?
« Reply #9 on: October 15, 2023, 07:56:56 AM »
This is another document that you may find useful for reading data by class/instance/attribute:

https://advancedhmi.com/documentation/index.php/Reading_the_CIP_Identity_of_any_Ethernet/IP_device


bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #10 on: October 15, 2023, 12:05:15 PM »
Do you have an example of SetAttribute?
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Do-More BRX EthernetIP?
« Reply #11 on: October 15, 2023, 03:20:49 PM »
Do you have an example of SetAttribute?
That has not been implemented yet in the driver. This could actually be a show stopper for using Ethernet/IP with the BRX.

Duffas

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Do-More BRX EthernetIP?
« Reply #12 on: October 15, 2023, 09:41:26 PM »
In all reality as nice as it would be to use the EthernetIP for the BRX it's not entirely required. Technically speaking I don't need full access or control of the PLC remotely. The amount of ModbusTCP integration wouldn't be too crazy because there is only a set number of things that would need to be controlled. We are just having an issue with the operators knowing the Maintenance/Engineer passwords for the equipment. That's what I thought about utilizing AdvancedHMI for. That way we could eliminate those screens completely. If an Engineer needs to perform functions on the equipment generally we have our laptops with the project loaded to view bit statuses and on location.

I know the fruits of my labor as well as both of yours haven't produced the results I have been hoping for, but this has still been a fun experience. I've enjoyed re-learning VB as well as learning the Automation Direct side of things. I'll keep tinkering with things and monitor the forums here to see if anything progressing or give any updates.

Again, I thank both of you for your input on this situation.