Help Topics
Demo Setup Modbus TCP

This demo shows the connection to a Modbus PLC via Modbus TCP (ethernet connection).

Equipment Needed Settings
Ethernet Modbus PLC Unit Number 1, on 192.168.1.100 , port 502
  Data at 30001,30002,30003

Summary of Steps:

Settings - Select Tag Module and PLC Interface in Select Module Wizard

On Setup Tools, click Select Module Wizard

Click Next

Select Agent Mode, Click Next
Note for this demo, the Agent Mode is used but on a real job, End User System would be used with a dongle. 

Select Tag System, click Next

Click PLC Interfaces ON, select PLC Interface #1 as Modbus TCP, click MocrScan Interface Off, click Next.

Click Next

Click Finish

Settings - Setup PLC Interface Settings

On Setup Tools, click PLC Interface link

Click IP Setup Button.

Select station 1, and click Setup.

Enter 192.168.1.100, click OK.
Click OK,
Click OK.
Note: Do not use the Map dialog on this window to setup PLC details up - this is done automatically when tags and lines are edited in Version 5.

Settings - Set Tag to access PLC locations

Setup for Input 1, at address 30001
Station Type = PLC:Modbus PLC
Station = 1 192.168.1.100
Data Type = 3 XXXX
Word = 1

Setup for Input 2, at address 30002
Station Type = PLC:Modbus PLC
Station = 1 192.168.1.100
Data Type = 3 XXXX
Word = 2

Setup for Input 3, at address 30003
Station Type = PLC:Modbus PLC
Station = 1 192.168.1.100
Data Type = 3 XXXX
Word = 3

Supported Data Locations

Location Read Command Write Command
0xxxx (coils) 0x01 0x05
1xxxx (input) 0x02 N/A (read only)
3xxxx (input register) 0x04 N/A (read only)
4xxxx (holding register) 0x03 0x06

Note on Modbus Locations:

The MicroScan tag dialogs allow you to enter an address such as Input Reg Word 1, that would actually be 30001.
But some PLC documentation gives the addresses in terms of the modbus protocol which is all zero referenced (i.e starts at zero) - so when you enter a modbus address, one may need to be added to counter for this value. If 30001 is entered in the dialog, it actually means that Input Register 0 is being sent out in the protocol message. For 2100-A16 a modbus address is given such as 30001, 30002 and these are the values that should actually be used.