0% found this document useful (0 votes)
109 views35 pages

Tutorial Em4 Modbus RS485 Master Millenium Evo Slave en

This tutorial shows how to configure Modbus communication between a Crouzet em4 controller acting as a Modbus master and a Millenium Evo controller acting as a Modbus slave. It describes connecting the hardware, including the required interfaces and communication cable. It then explains how to configure the em4 and Millenium Evo for Modbus communication using their respective programming software, including setting the Modbus address for the slave and function blocks for reading and writing registers and coils. Example programs are provided to demonstrate data exchange between the controllers.

Uploaded by

Rashid Sohail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views35 pages

Tutorial Em4 Modbus RS485 Master Millenium Evo Slave en

This tutorial shows how to configure Modbus communication between a Crouzet em4 controller acting as a Modbus master and a Millenium Evo controller acting as a Modbus slave. It describes connecting the hardware, including the required interfaces and communication cable. It then explains how to configure the em4 and Millenium Evo for Modbus communication using their respective programming software, including setting the Modbus address for the slave and function blocks for reading and writing registers and coils. Example programs are provided to demonstrate data exchange between the controllers.

Uploaded by

Rashid Sohail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

em4 MODBUS RS485 MASTER

WITH
MILLENIUM EVO SLAVE
TUTORIAL

12/04/2018
SUMMARY

• Introduction
• Hardware and software required
• Connecting hardware for use
• Configuring Modbus communication for em4 master and Millenium Evo slave
• Data exchange between em4 and Millenium Evo
– em4 function blocks
Writing words to Millenium Evo with MWOUT
Reading words from Millenium Evo with MWIN
Writing bits to Millenium Evo with MBOUT
Reading bits from Millenium Evo with MBIN
– Millenium Evo function blocks
Millenium Evo XWIN
Millenium Evo XWOUT
Millenium Evo XBIN
Millenium Evo XBOUT
• Example programs

Crouzet Tutorial em4 master Millenium Evo slave April 2018 2


Introduction

This tutorial shows how to set up communication to exchange


words and bits between.

em4 Modbus RS485 Master

and

Millenium Evo Modbus RS485 Slave.

Crouzet Tutorial em4 master Millenium Evo slave April 2018 3


HARDWARE AND SOFTWARE REQUIRED

Crouzet Tutorial em4 master Millenium Evo slave April 2018 4


Hardware and Software Required

Hardware Cables Software


Programming Communication
Crouzet Soft
Version  1.6.00.00
1 em4 1 Millenium Evo
em4 USB cable
Or later
88 980 170

USB Programming
Interface
88 980 110

Communication cable
between em4 and
Modbus RS485-P Modbus RS485 Millenium Evo needs to be
Interface Interface assembled by user

88 980 122 88 980 123

Crouzet Tutorial em4 master Millenium Evo slave April 2018 5


CONNECTING HARDWARE

Crouzet Tutorial em4 master Millenium Evo slave April 2018 6


Connecting hardware – Modbus network system

• Connection between em4 master interface and the slave, Millenium Evo, is done using a modbus
2 wire system:

• em4 master interface


88980122
with polarization

• Slave devices, Millenium


Evo or other Modbus slave
(1) Polarization resistors included with Modbus interface 88980122. Line end included with Modbus interfaces 88980122, 88980123 devices
LT (line end): capacitor 1 nF/10V and resistor 120 ohm/0,25 W in series

Crouzet Tutorial em4 master Millenium Evo slave April 2018 7


Connecting hardware
– Polarised and none polarised interfaces

88980122 Master/Slave interface with polarization


Polarisation is required on Modbus RS485. Polarisation is usually provided
by the master but if it doesn’t a slave or an external device can provide the
polarisation for the network. Use this interface if your network has no
polarisation.

88980123 Master/Slave interface without polarisation


Use this interface if network polarisation as been already provided (by the
master, another slave or an external device)

Crouzet Tutorial em4 master Millenium Evo slave April 2018 8


Connecting hardware

• Cable wirings between the em4 interface 88980122 and the Millenium Evo interface 88980123
(one slave).

em4 88980122 Millenium Evo 88980123


1
2
EOL 3 EOL
B D1 4 B
A D0 5 A
GND 6 GND
7
GND (COMMON) 8

EOL B A GND EOL B A GND

Crouzet Tutorial em4 master Millenium Evo slave April 2018 9


Connecting hardware - Communication Cable

• Communication cable for this example:

Attention:
Concerning connection to GND
and grounded equipment please
refer to the installation sheet
enclosed with the Modbus RS485
Interface

Crouzet Tutorial em4 master Millenium Evo slave April 2018 10


Connecting hardware

• Wiring for em4 Master – Millenium Evo Slave communication

+
24VDC
-

OFF

+ + + +

Modbus RS485-P User assembled cable Modbus RS485


interface interface

Disconnect the power whenever inserting or extracting the em4 Modbus RS485 interface or communication cable!

Reminder of the set-up sequence:


• Insert USB programming interface, power up em4, transfer the associated program
• Insert USB programming interface in Millenium Evo, power up Millenium Evo, transfer the associated program
• Disconnect em4 and Millenium Evo, insert appropriate Modbus RS485 interface in em4 and Millenium Evo, connect assembled
communication cable, then power up em4 and Millenium Evo
Crouzet Tutorial em4 master Millenium Evo slave April 2018 11
CONFIGURING MODBUS COMMUNICATION
em4 MASTER
AND
MILLENIUM EVO SLAVE

Crouzet Tutorial em4 master Millenium Evo slave April 2018 12


Configuring Modbus communication - em4

Open Crouzet Soft and select


your em4 controller.
In order to activate the Modbus
communication click on
COMMUNICATION.
Tick RS485 Modbus Interface,
then tick Modbus Master and set
the Modbus parameters*.
Then click on OK

*Modbus parameters (speed, stop bit, parity


and transmission mode) must be the same
for master and all slaves

Crouzet Tutorial em4 master Millenium Evo slave April 2018 13


Configuring Modbus communication - Millenium Evo

Open Crouzet Soft and select


your Millenium Evo controller.
To set the Modbus parameters
click on COMMUNICATION.

Tick RS485 Modbus Interface,


set Slave number and set
Modbus parameters according to
master setup*.
Then click on OK.

*Modbus parameters (speed, stop bit, parity


and transmission mode) must be the same
for master and all slaves

Crouzet Tutorial em4 master Millenium Evo slave April 2018 14


DATA EXCHANGE BETWEEN em4
AND
MILLENIUM EVO

em4 FUNCTION BLOCKS

Crouzet Tutorial em4 master Millenium Evo slave April 2018 15


Data exchange between em4 and Millenium Evo
– em4 function blocks
Drag and drop the COM 0 functions into your
worksheet.
MWIN COM 0: reads up to 8 words from a 8
consecutive addresses of a slave device. Up
to 16 MWIN COM 0 function blocks can be
used in a program. Read can be time based
or on command
MWOUT COM 0: writes up to 8 words to 8
consecutive addresses of a slave device. Up
to 16 MWOUT COM 0 function blocks cab
used in a program. Write can be time based
or on command.
MBIN COM 0: reads up to 8 consecutive bits
from an address. Up to 16 MBIN COM 0
function blocks can be used in a program.
Read can be time based or on command.
MBOUT COM 0: writes up to 8 consecutive
bits to an address. Up to 16 MBOUT COM 0
function blocks can be used in a program.
Write can be time based or on command.

Crouzet Tutorial em4 master Millenium Evo slave April 2018 16


Writing words to Millenium Evo with MWOUT COM 0

Double click on MWOUT COM 0 function


2 block.
6 1) Select a list of addresses from the list
Address Local collection.
3 2) Select the Slave number of the target
1 device and the type of target device
(select XB/XW for Millenium Evo).

4 3) Select the starting Address of the


XWIN to write.

4) Optional: enter Label, Unit and Digits


for enabled addresses (addresses in
gray if not connected to a function
block)
5) Select the Command sending mode,
5 Triggered (using the command input
of the function block) or Periodic
(using a timing between 1 to 32767
seconds)
6) Click on OK
Crouzet Tutorial em4 master Millenium Evo slave April 2018 17
Reading words from Millenium Evo with MWIN COM 0

Double click on MWIN COM 0 function


2 block.
6 1) Select a list of addresses from the list
Address local collection.
3 2) Select the Slave number of the target
1 device and the type of target device
(select XB/XW for Millenium Evo).

4 3) Enter the starting address of the


XWOUT to read.

4) Optional: enter Label, Init value, Unit


and Digits for enabled addresses
(addresses in gray if not connected to
a function block)
5) Select the Command sending mode,
5 Triggered (using the command input
of the function block) or Periodic
(using a timing between 1 to 32767
seconds)
6) Click on OK
Crouzet Tutorial em4 master Millenium Evo slave April 2018 18
Writing bits to Millenium Evo with MBOUT COM 0

Double click on MBOUT COM0 function


2 block.
6 1) Select a list of addresses from the list
Address local collection.
3 2) Select the Slave number of the target
1 device and the type of target device
(select XB/XW for Millenium Evo).

3) Enter the starting address of the XBIN to


4 write on Millenium Evo. Please note that
only 8 bits are available on Millenium Evo
XBIN (XBIN25-1 1 to XBIN25-1 8)

4) Optional: enter Label, Unit and Digits for


enabled addresses (addresses in gray if
not connected to a function block)

5) Select the Command sending mode,


5 Triggered (using the command input of
the function block) or Periodic (using a
timing between 1 to 32767 seconds)

6) Click on OK

Crouzet Tutorial em4 master Millenium Evo slave April 2018 19


Reading bits from Millenium Evo with MBIN COM 0

Double click on MB IN COM0 function


2 block.
6 1) Select a list of addresses from the list
Address local collection.
3 2) Select the Slave number of the target
1 device and the type of target device
(select XB/XW for Millenium Evo).

3) Enter the starting Address of first bit to


4 be read (XBOUT) from Millenium Evo.
Please note that only 8 bits are available
on Millenium Evo (XBOUT50-1 1 to
XBOUT50-1 8)

4) Optional: enter Label, Init value, Unit and


Digits for enabled addresses (addresses
in gray if not connected to a function
block)
5
5) Select the Command sending mode,
Triggered (using the command input of
the function block) or Periodic (using a
timing between 1 to 32767 seconds)

6) Click on OK
Crouzet Tutorial em4 master Millenium Evo slave April 2018 20
DATA EXCHANGE BETWEEN em4
AND MILLENIUM EVO

MILLENIUM EVO FUNCTION BLOCKS

Crouzet Tutorial em4 master Millenium Evo slave April 2018 21


Data exchange between em4 and Millenium Evo
– Millenium Evo function blocks
Drag and drop the COM 0 functions into your
worksheet.
XWIN COM 0: 8 words on 8 consecutive
addresses available for writing from network
master. Up to 2 XWIN COM 0 can be used in
a program.

XWOUT COM 0: 8 words on 8 consecutive


addresses available for reading from network
master. Up to 2 XWOUT COM 0 function
blocks can be used in a program.

XBIN COM 0: 8 bits available for writing from


network master. Only 1 XBIN COM 0 function
block can be used with Millenium Evo.

XBOUT COM 0: 8 bits available for reading


from network master. Only 1 XBOUT COM 0
function block can be used with Millenium
Evo..

Crouzet Tutorial em4 master Millenium Evo slave April 2018 22


Millenium Evo XWIN COM 0

4 Double click on XWIN COM0 function


block.
1
1) Select an address range from Input
address range.

2 2) Optional: enter Label, Init Value,


Unit and Digits for enabled
addresses (addresses in gray if not
connected to a function block)
3) Select Save on power failure to
save data written to XWIN
addresses in case of power failure.
4) Click on OK

Crouzet Tutorial em4 master Millenium Evo slave April 2018 23


Millenium Evo XWOUT COM 0

3 Double click on XWOUT COM0


function block.
1
1) Select an address range from
Output address range.

2 2) Optional: enter Label, Unit and


Digits for enabled addresses
(addresses in gray if not connected
to a function block)
3) Click on OK

Crouzet Tutorial em4 master Millenium Evo slave April 2018 24


Millenium Evo XBIN COM 0

4 Double click on XBIN COM0 function


block.
1
1) Select an address range from Input
address range.

2 2) Optional: enter Label, Init Value,


Unit and Digits for enabled
addresses (addresses in gray if not
connected to a function block)
3) Select Save on power failure to
save data written to XBIN
addresses in case of power failure
4) Click on OK

Crouzet Tutorial em4 master Millenium Evo slave April 2018 25


Millenium Evo XBOUT COM 0

3 Double click on XBOUT COM0


function block.
1
1) Select an address range from
Output address range.

2 2) Optional: enter Label, Unit and


Digits for enabled addresses
(addresses in gray if not connected
to a function block)
3) Click on OK

Crouzet Tutorial em4 master Millenium Evo slave April 2018 26


WRITING AND READING BITS
ON
MILLENIUM EVO

USING WORDS

Crouzet Tutorial em4 master Millenium Evo slave April 2018 27


Writing and reading bits from Millenium Evo
- using words

• To write and read bits when not using XBIN / XBOUT Blocks it is necessary to use words and
binary/decimal or decimal/binary converters in the em4 program.

em4 program Millenium Evo program

Crouzet Tutorial em4 master Millenium Evo slave April 2018 28


Reading bits from Millenium Evo XBOUT
- with MWIN COM 0
Double click on MWIN COM 0 function
block.
6
2 4 1) Select a list of addresses from the list
Address, Local storage.
2) Select the Slave number of the target
1 3 device and the type of target device
(select Other for Millenium Evo).
3) Optional: enter Label, Init Value, Unit
and Digits for enabled addresses
(addresses are in gray if not
connected to a function block)
4) Enter the address of XBOUT as word
in hexadecimal (address 50 / hex 32)
5
5) Select the Command sending mode,
Triggered (using the command input
of the function block) or Periodic
(using a timing between 1 to 32767
seconds)
6) Click on OK
Crouzet Tutorial em4 master Millenium Evo slave April 2018 29
Writing bits to Millenium Evo XBIN
- with MWOUT COM 0
Double click on MWOUT COM 0 function
block.
6
2 4 1) Select a list of addresses from the list
Address, Local collection.
2) Select the Slave number of the target
1 3 device and the type of target device
(select Other for Millenium Evo).
3) Optional: enter Label, Init Value, Unit
and Digits for enabled addresses
(addresses are in gray if not
connected to a function block)
4) Enter the address of XBIN as word in
hexadecimal (address 25 / hex 19)
5
5) Select the Command sending mode,
Triggered (using the command input
of the function block) or Periodic
(using a timing between 1 to 32767
seconds)
6) Click on OK
Crouzet Tutorial em4 master Millenium Evo slave April 2018 30
EXAMPLE PROGRAMS

Crouzet Tutorial em4 master Millenium Evo slave April 2018 31


Example programs

• Program samples for an em4 master and a Millenium Evo slave to exchange words and bits.
• Two programs for em4 master depending on the RS485 interface used on Millenium Evo.

• Attached programs:
– em4_master_Millenium EVO Slave 88980123_example_program.pm4 for em4
– Millenium EVO Slave_em4_master 88980122_example_program.MEVO for Millenium Evo

Crouzet Tutorial em4 master Millenium Evo slave April 2018 32


Example programs

em4 master program for Millenium Evo with 88980123 interface

em4 MWOUT writes to Millenium Evo XWIN1 the


value of NUM B20
em4 MWIN reads from Millenium Evo XWOUT26 a
value and shows it on display
em4 MBOUT writes a bit to Millenium Evo XBIN
25-1 1 address. Bit can be switched on and off
with A button (works as a toggle switch)
em4 MBIN reads a bit from Millenium Evo XBOUT
50-1 1 address and shows a message on display

Crouzet Tutorial em4 master Millenium Evo slave April 2018 33


Example programs

Millenium Evo slave program

Millenium Evo data coming from NUM B02 is


available for reading on XWOUT 26
Millenium Evo receives data coming from master
on XWIN 1 and shows it on display
Millenium Evo data bit coming from button A is
available for reading on XBOUT 50-1
Millenium Evo receives data bit coming from
master on XBIN 25-1

Crouzet Tutorial em4 master Millenium Evo slave April 2018 34


THANK YOU
FOR YOUR ATTENTION

www.crouzet.com

You might also like