A guide to using AdvancedHMI with ABB AC500 via ModbusTCP
This was tested with:
Automation builder 1.1.0.835
AdvancedHMI 3.98g
PM554-ETH CPU.
I will just assume that you already have a project and controller set up in Automation builder.
1. In Automation builder, doubleclick "Protocols" in the treeview and click the button "Add protocol.." in the window that pops up.
2. Add the protocol "Modbus TCP/IP Server"
3. Doubleclick the newly added "Modbus_TCP_IP_Server" in the treeview.
4. Tab "Modbus TCP/IP Server Settings" - Set server connections to the number of connections that you want to be able to have active at any time.
5. Tab "Modbus Server Settings" - Choose what type of memory you want to read via Modbus (%M or %R). If you want to use variables with retain, choose %R.
6. Done! Start programing!
To be able to read/write variables via AdvancedHMI, you need to assign the variables to memory (either %M or %R, depending on what you configured the protocol for)
Here's an example of a global variable list:
VAR_GLOBAL
Bit0 AT %RX0.0.0: BOOL; (* 00001 *)
Bit1 AT %RX0.0.1: BOOL; (* 00002 *)
Bit2 AT %RX0.0.2: BOOL; (* 00003 *)
Bit3 AT %RX0.0.3: BOOL; (* 00004 *)
Bit4 AT %RX0.0.4: BOOL; (* 00005 *)
Bit5 AT %RX0.0.5: BOOL; (* 00006 *)
Bit6 AT %RX0.0.6: BOOL; (* 00007 *)
Bit7 AT %RX0.0.7: BOOL; (* 00008 *)
Bit8 AT %RX0.1.0: BOOL; (* 00009 *)
Bit9 AT %RX0.1.1: BOOL; (* 000010 *)
Bit10 AT %RX0.1.2: BOOL; (* 00011 *)
Bit11 AT %RX0.1.3: BOOL; (* 00012 *)
Bit12 AT %RX0.1.4: BOOL; (* 00013 *)
Bit13 AT %RX0.1.5: BOOL; (* 00014 *)
Bit14 AT %RX0.1.6: BOOL; (* 00015 *)
Bit15 AT %RX0.1.7: BOOL; (* 00016 *)
Word0 AT %RW0.0: WORD (* U40001 *)
END_VAR
Note 1: Function code 0 can be used for both reading and writing bits, and function code 4 for reading and writing words.
Note 2: Bits and words overlap. This means that the 16 bits in the above example are the 16 bits of the word.
Note 3: The addressing of the bits and words are offset by 1 when using AdvancedHMI (compared to the manual from ABB)
Note 4: The words are unsigned (0-65535). This means that you need to use the prefix "U" when reading/writing them with AdvancedHMI.
Sidenote: If you want to use variables with retain/persistance, don't forget to configure what part of the memory that should be persistent. This is done by doubleclicking the CPU in the treeview and setting a value for the "End PERSISTENT %RB.x". Note that the column Parameter says "byte", and Type says word (!) Don't ask which it is..
This should also work with the bigger CPU's and ModbusRTU if you have one without ethernet (eCo-versions doesn't support ModbusRTU).