Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

UCM/Modbus Programming
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Tuesday Jan 31st, 2017 01:03 pm
   PM  Quote  Reply 
1st Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5495
Status: 
Offline

  back to top

Use  Comfigurator version  3.11.12 or above to configure UCM/Modbus. The software can be downloaded from  http://www.cytech.biz/comfigurator.html
A UCM/USB or UCM/Ethernet is required to connect to the computer running Comfigurator.
Run Comfigurator, go to the Modules Tab and right-click on UCMs folder symbol as shown below.


“Scan for All Modules” or “Scan for UCMs” will automatically detect all UCMs including the UCM/Modbus if the ID is set correctly without any conflict with other UCMs.
“Add UCM” allows you to manually add a UCM/Modbus if not currently connected to Comfort, i.e. when doing programming off-line.




The scan results should discover a UCM/Modbus as shown below



Click on the Modbus UCM on the left pane. This brings up the Modbus Configurator as shown below;






UCM Properties
ID                   1 to max for UCM RS485 ID
Name              as in Modules> UCM
Type               Modbus (subtype 27)
Version           UCM/Modbus firmware version eg 7.096

UCM/Modbus Properties
Interface           
RTU(RS485)  or TCP

Baud Rate         
2400, 4800, 9600, 19200, 38400, 76800 (Modbus RTU Only)

Parity                 
Even, Odd, None (Modbus RTU Only)

Master/Slave
Master or Slave. Master will communicate with Modbus Slave.   Slave will communicate with Modbus Master.

Modbus Slave ID 
1 to 247. Modbus ID of Slave when UCM is Master, or Modbus ID of  UCM/Modbus UCM when UCM/Modbus is Slave

Notes on Master/Slave
In general, if Comfort is controlling another Modbus device, UCM/Modbus should be a Master, and the other device should be a Slave. If another device is controling Comfort, then UCM/Modbus should be a Slave and the other device a Master. Modbus Software with GUI functions are normally Masters. One master can be in the same Modbus network with many Modbus Slaves.

For UCM/Modbus as Slave, Modbus to Comfort and Alarm To Modbus Tabs are not applicable. See the section on UCM/Modbus as Server/Slave in this manual. UCM/Modbus can either be Master or Slave at any one time.

Display Settings
Modbus Address Display Format:    Hexadecimal or Decimal
This determines the Modbus Addresses are displayed in Hexadecimal or Decimal format

Last edited on Thursday Mar 30th, 2017 04:59 pm by slychiu



 Posted: Tuesday Jan 31st, 2017 01:27 pm
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5495
Status: 
Offline

  back to top

Modbus/TCP Master Mode

For Modbus/TCP  ignore Baud Rate.

For Modbus/TCP, the Master is also referred to as Client and the Slave is referred to as Server.

The Modbus/TCP Master should set the Target IP and Port to the Modbus Slave which it is communicating with.

For TCP Interface, the ETH03 Universal 1.16 Firmware or above (not ETH03-General) must be used (this is preinstalled in the ETH03 for UCM/Modbus/ETH03).

If TCP is selected in Interface, the link to Comfort Server Manager will be seen as shown below;



Click on  Comfort Server Manager to select the IP address and Port for the ETH03. The screen below should pop up. The  screenshot shows 4 ETH03 devices in the same network, the 2nd  item is ETH03 Universal Firmware version 1.16 with IP address 10.0.0.233, which is the UCM/ETH03 used as Modbus Master and ignore the other ETH03s if present. Click on this line to show the parameters on the right pane. (The next Comfigurator 3.11.11 will allow Comfort Server Manager to be launched directly from the UCM/Modbus screen)

In Transport Protocol select TCP. In Routing Mode, select Server/Client or Client. Port 1001 is the port used by ETH03 – enter any port >= 1001. For Timeout, enter 0 (can ignore as Client Mode does not time out).
Target IP and Port – enter the IP address and Port of the Modbus Slave device. This allows the UCM/Modbus master to talk to the Modbus Slave. Note that the Slave Modbus devices must comply to the Modbus/TCP standard.



Last edited on Thursday Mar 30th, 2017 04:37 pm by slychiu



 Posted: Tuesday Jan 31st, 2017 01:59 pm
   PM  Quote  Reply 
3rd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5495
Status: 
Offline

  back to top



Menu Bar


Write to EEPROM
This writes the configuration  into the UCM/Modbus

Read from EEPROM
This reads the data from UCM/Modbus and displays  the data on screen

Reset to Default
This  clears all the data in the Modbus configuration  to unused, but does not write any data to EEPROM. (after clearing, prompt “Write to eeprom? “ should be seen”)

Get Status
The Get status button causes the UCM/Modbus status to be shown on the status bar on bottom left
"Normal/No error"
"EEPROM missing/faulty"
"EEPROM insufficent capacity"
"EEPROM data invalid"


When the cursor is moved away from the UCM/Modbus screen, Get status is automatically turned off, and when the cursor is on the UCM/Modbus screen the get status function is turned on if Comfigurator is logged in


Modbus Monitor Mode
Modbus Monitor Mode is very useful for testing the Modbus communications
It shows the messages transmitted to and received from Modbus



Last edited on Sunday Apr 9th, 2017 02:53 pm by slychiu



 Posted: Saturday Jan 27th, 2018 11:44 am
   PM  Quote  Reply 
4th Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5495
Status: 
Offline

  back to top

Comfiguring a Modbus system can be complex
The Modbus addressing, Communications modes ie TCP or RTU, Modbus over IP must be understood. For RTU the baud rate and parity must be known, and whether the Modbus device is a Master or Slave and the meaning and usage of the Modbus Registers (Coil, Input Register, Holding Register, Discrete Input

A good introduction is the wikipedia article https://en.wikipedia.org/wiki/Modbus



Software Tools

QModbusMaster is an excellent free software tool for testing UCM/Modbus in Slave Mode. The software can be set up as a Modbus Master to communicate with UCM/Modbus in Slave Mode. It works in RTU and IP modes. 
Download from https://sourceforge.net/projects/qmodmaster/

PyModSlave is a similarly good  free tool for testing UCM/Modbus in Master Mode.  The software can be set up as a Modbus Slave to communicate with UCM/Modbus in Master Mode. It works in RTU and IP modes. 
Download from https://sourceforge.net/projects/pymodslave/files/


Last edited on Saturday Jan 27th, 2018 11:56 am by slychiu



 Current time is 02:30 am
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems