Arduino with advancedHMI

The Modbus library that I used was this one for Modbus over ethernet:
http://code.google.com/p/mudbus/

This does require the use of the Ethernet shield.

I used the "Mb" sketch in the example that came with the Mudbus library.

Avoid using pins 4,10,11,12,and 13 when using the Ethernet shield

Modbus has a weird addressing scheme. It stores values in memory locations referred to as registers. These registers are designated in the example as "Mb.R[0], Mb.R[1]" and so on.

// Section of Code from Example Sketch
Mb.R[0] = analogRead(A0); //pin A0 to Mb.R[0]

Here, a value will be read from the analog pin A0 and stored in Register 0

To access register zero in Advanced HMI the PLC address is 40001
To access register one the address would be 40002 and so on.

I hope this helps!