For NETCMD$, please refer to the User's Manual for the Host Link command. The example shows you the way for reading the digital I/O, you have to modify the example if you want to access other data.
For READMODBUS and READMB2, check the Modbus mapping table to see where DMs are located in the Modbus address.