Author Topic: Source for MfgControl.AdvancedHMI.Drivers?  (Read 1769 times)

KevinV

  • Newbie
  • *
  • Posts: 2
    • View Profile
Source for MfgControl.AdvancedHMI.Drivers?
« on: September 28, 2018, 12:48:08 PM »
Building a basic application with drag-and-drop controls and property edits went pretty smoothly, but to get real work done I wanted to be able to do that programmatically.   After some digging into the control code, I eventually found that it was calling ethernetIPforCLXCom.Write().  A bit of common sense (with the help of Intellisense) gave me .Read(), and that was enough to get some basic boolean and integer tags moving...but soon I wanted to look at strings and arrays and UDTs and so on. 

I found the source file AdvancedHMIDrivers/AllenBradley/EthernetIPforCLXCom.vb but was briefly confused to find that this is not the file that contains the source for these methods.  Instead, read and write are in MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX....which is a DLL.  Using Visual Studio's "Go To Definition" takes me to a view of this file generated from metadata (attached), with a lot of juicy methods to call:

Code: [Select]
        public static int GetByteCount(int AbreviatedType);
        public int BeginGetAttributesAll(int classID, int instanceID);
        public int BeginGetAttributeSingle(int classID, int instanceID, int attribute);
        public override int BeginRead(string startAddress, int numberOfElements);
        public int BeginRead(CLXAddressRead address, int numberOfElements);
        public int BeginReadMultiple(Collection<CLXAddressRead> addresses);
        public int BeginReadMultiple(string[] addresses);
        ...

...but, being generated from metadata, this has no method bodies, no comments, and no clues as to how to use these other than the method and parameter names plus whatever trial-and-error can produce.

Am I missing something? Where's the source for this file?  I understand how time-consuming it can be to generate and maintain documentation, but if I had to read the source I'd have a better chance of getting this to work than if I'm just guessing.

Thanks in advance...

dmroeder

  • Global Moderator
  • Full Member
  • *****
  • Posts: 206
    • View Profile
Re: Source for MfgControl.AdvancedHMI.Drivers?
« Reply #1 on: September 28, 2018, 03:38:34 PM »
The source code for the drivers themselves is unavailable.

Check this out:

https://www.advancedhmi.com/documentation/index.php?title=Main_Page

KevinV

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Source for MfgControl.AdvancedHMI.Drivers?
« Reply #2 on: September 28, 2018, 07:33:01 PM »
Thanks for the quick response...I found that page, but don't see class docs for the driver. Where's the data on, for example, BeginReadMultiple?

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Source for MfgControl.AdvancedHMI.Drivers?
« Reply #3 on: September 28, 2018, 09:31:56 PM »
That page has the "Drivers" link which then has the EthernetIPforCLXCom driver link with usage examples, including the BeginReadMultiple method.

Also check the IComComponent Interface link for "Read" , "Write" , etc.
« Last Edit: September 28, 2018, 09:40:21 PM by Godra »