Nowadays almost all the laptops are not having any serial ports on them. This, in fact, creates a lot of problems for all Automation and electronics engineers as daily we guys have to communicate with external devices over serial communication. Many options are available in the market through which we can convert USB Port on our PC/Laptop to Serial/RS485 port. But we should take utmost care while buying as these converters are not so reliable and can let failure at the site.
Convert Your USB Port in to Many Serial RS232/RS422/RS485 Ports
Today in this post we will discuss about the different type of options available to convert existing USB port in to Serial / RS485 port. Many companies have started manufacturing these converters as these are easy to made and are in much demand due to lack of serial port on new laptops. There are devices available in the market for RS232 to RS485 converter. In fact in this world driven by electronic and automation technologies, we can find out everything to convert the signal and protocol format as per our application demand.
One USb, get up to 16 Serial Ports:-
There is one company "ByteRunner" whose USB to RS485 converters are very popular in the market. The company claims to have even 16 serial ports converter. Yes, that is you can have 16 different comms on your laptop just with their device. All the 16 different comms are individually configurable and separate/different settings can be assigned to them.This USB to Serial Adapter is suitable for remote access, retail and industrial applications, data collection and other applications requiring high-speed RS-232 communication ports.
Moreover, these devices are capable of Speed of Serial port speed up to 230,400 bps or 921,600 bps depending on the model and provide you with features like Full modem control signals & data signals support. So these devices prove to be boon for every automation engineer where we have to daily deal with serial commiunication devices.
One more company named "Logica" also manufactures USB to RS422/Rs485 converter and it allows to convert an output signal RS232 from a PC or another device into an RS485 or RS422 electrical standard. These devices also have the feature of Automation Transmission and Hardware Transmission which makes these devices a versatile equipment for all your communication needs.
Later in coming articles, we will also discuss about the circuit of this Converter and procedure to make it at home. Till then you can subscribe to Automation-Talk by Email to get all latest updates.
Mar 6, 2018
Convert Your USB Port in to Many Serial Ports
Mar 4, 2018
Conzerv Energy Meter EM6436 Modbus Communication and Connection Diagram
Conzerv has a range of EM series Energy meter and there are various different models available for your different need and according to the application. Conzerv Energy meter comes with and without Modbus communication feature, so be sure when selecting Energy Meter according to the application. If you want to communicate it with PLC then make sure that it is MODBUS Enabled.
The EM series Power meters offer complete load management facilities in a compact package. If you like to see more such posts, please subscribe to Automation-Talk by Email.
How to check whether Conzerv Energy meter is MODBUS enabled?
1) First of all, check that terminals 7 and 14 of meter does not have black dot mark, if there is a black dot market on it then it is not MODBUS enabled.
2) Secondly, check that on the front left bottom side RS485 is written and the color of the dot before this, if the color of the dot is white then it is MODBUS enabled and if it is black then it is not MODBUS enabled.
All Conzerv Energy and power meter come with different function keys in the front side for easy set up of the parameters and also some models have TURBO key through which you can directly go to set up mode.
Connection Diagram of Conzerv EM series Energy Meter
NOTE:- Click on the picture for a clear view.
In the above picture, you can see the connection of energy meter. Connect your meter accordingly. The meter has 3 line display and display the parameters sequentially one by one i.e their name and value one by one.
Now the main question is how to communicate Conzerv Energy Meter in MODBUS?
So here is the answer, first of all, make proper hardware connection of MODBUS accordingly that is connect positive of PLC RS485 port with terminal 7 and negative of PLC RS485 port with terminal 14 of Conzerv Energy meter.
Now you have to make PLC program accordingly, generally, in MODBUS we read the parameters like a line to line voltage, frequency, current, power factor etc. Each parameter has its unique address in the energy meter and it has to be read through the query in MODBUS.
Make sure to set the node id, baud rate, parity in yours Conzerv energy meter properly using the setup mode.
You can download the address map of Conzerv Energy meter EM series from here .
Click here to download.
Now the question is How to read data from Conzerv Energy meter in MODBUS using OMRON PLC.
You can review the Omron PLC MODBUS communication from here.
So here is the Data format to read:- 01 03 04 (address - 1) 02
Make sure to subtract 40001 from the address.
Response from energy meter:- 01 03 00 05 0486 9042 4800
Here the value of the parameter in response is 4248, remember that the response of Conzerv Energy meter is always in float, so make sure to convert it accordingly. For example in the above response, the value returned by EM is 4248 in float which is equal to 49.98 in decimal and it is the value of frequency.
So accordingly you can read others parameter too by using the above query format. Hope you like this article and if you do, do not forget to subscribe to Automation-Talk by Email.
Jul 28, 2015
Best MODBUS Polling Software
MODBUS Protocol is widely used Protocol in Industrial Automation in various Application and is a 2 wire system which support 32 slaves and MODBUS RTU's. We have already posted many article on MODBUS Programming and MODBUS connection in various PLC and HMI's.
In this article we will discuss about the MODBUS Poling Software which act as a Modbus Master and is also called as Modbus Master Simulator. Subscribe to Automation-Talk by Email.
The best MODBUS Software which we find good and easy to use is Modbus Poll which help in testing and simulation of MODBUS protocol. This Software is a shareware software from ModbusTools and support several Modbus slaves at the same time as you just have to specify the Modbus slave ID, function, address, size and poll rate in each window. This software is very easy to use and in a click you can change the register value of your slave.
It supports many MODBUS features like Read coil status, Read input status ,Read holding register,Read input registers, Force single coil, Preset single register, Force multiple coils, Preset multiple registers, Mask write register & Read/Write registers .
You must try this very useful MODBUS Software as you can test it Demo version for 30 day's.
The new version of MODBUS Poll is out and is available for Windows 2000/XP, Vista and window 7 Or if you have pre-installed its version 4 then the same key will also work for this new MODBUS Poll ver. 5. It is available in 32 & 64 Bit Version.
Dec 14, 2014
Edit PLC & MODBUS Data using Delta Smart VIEWer Android Application
If you are having a Delta PLC and want to monitor the registers of PLC or want to edit them, then now you can do it by installing Delta Smart Viewer application on you Android Smartphones. With this Android app you can also change MODBUS device settings. This is a very handy and useful application from Delta and support all their PLC, whether its is AH series or DVP. This is very good application if you are monitoring temperature.
Subscribe to Automation-Talk by Email.Image Source: Delta
With Delta Smart VIEWer, automation engineers can monitor and edit PLC and Modbus data via WiFi. Currently this application only support Wi-Fi. The monitored data is shown in run charts and after studying it users can easily and quickly master the current status and recorded trends of the equipment for proper on-site adjustment. And if change is needed he can do it directly from his Android smart phone.
Main Functions of Delta Smart VIEWer:
1. Monitors and edits PLC and Modbus data via Wi-Fi connection.
2. Monitored data is displayed and edited in run charts with clear data trends.
3. Monitored data is saved for adjustment references.
4. Connects Delta PLCs for detailed information via Wi-Fi connection.
5. Allows connection setting and data export/import for easy and fast monitoring
The size of this Android application is 1MB and it can be downloaded from Delta official website or from Google Play store. Currently this Android application works on Android 2.2 to Android 4.2. Link for downloads are given below.
Download from Delta website: Click Here
Download from Google Play: Click Here
How to do target settings in Delta Smart VIEWer
We tried to play with this application on our Android version 4.4.2 Smartphone and it works without error. Once you install this small and helpful application in your Smartphones through above links, you will be shown menu. There just select target setting if this is your first time.
Target setting has three main settings, one for Network, one for Device and last one for Update Interval.
Network: On network setting you will find option for IP, Port, Slave ID. Here just put the entry which you have done at your PLC end. If this setting is incorrect you won't be able to communicate with your PLC.
Device: In device setting you can choose your PLC make and their sub-type. You will see AH series and DVP series option here.
Update Interval: In update interval you can put timing in seconds and minutes. This is update time for your monitored value. Choose as per your need
After you have done above setting, you can now do setting for your register. Choose PLC register which you want to monitor in form of TAG. You can add multiple tags for PLC. Currently this version of Delta Smart viewer supports up to 10 devices (Both PLC and MODBUS device). This application has also facility to export/import profile, which makes it easy to configure other devices with same connection.
Let us know what are your views about this awesome Android application from Delta and if you have used it, do let us know. Hope Delta will bring more advance version of this application and will allow the connectivity also through 3G network.
Aug 6, 2012
How to Configure Modbus Communication in Delta SS2 PLC
Modbus Communication is used in many applications where we need to control VFD from PLC or where we have to read the HMI or SCADA values in PLC. We have seen the Basics of Modbus Communication earlier , also we have understood the Omron PLC Modbus Communication. So we are not going to discuss the basics of Modbus and moving further we will see how to configure Modbus communication in delta PLC.
Understanding the MODBUS Instructions in Delta PLC
In the delta plc we have two instructions for the Modbus communication with any slave. We will consider that Delta PLC is master and there is any other slave device which can be a VFD or HMI. In Modbus communication the Master device always send the query to slave device for reading or writing the registers of Slave Devices. MODWR is the instruction for for writing the MODBUS data.
Syntax :- MODWR S1 S2 N
S1 is the slave address and S2 is the register address of the slave device where we have to write the data and N is the value to write. N can be constant or can be data register address. Let us consider an example - Suppose we want to write to write the H2000 register of slave device with value in D0, slave id is 2. Then we will use the -MODWR K2 H2000 D0.
Reading the Slave data/register in MODBUS Delta PLC :-
For reading the slave register values in Delta Modbus communication we use the instruction MODRD. The syntax is as follows:-
Syntax:- MODRD S1 S2 N
S1 is the Salve address and S2 is the register address of the slave device and N is the number of values to read.
Wiring for Modbus Communication in Delta PLC :-
We have already discussed about the wiring, let us review it once more. In Modbus communication, there are two terminals for on master and slave device. Always connect the + of master with + of slave device and connect - of master with - of slave device.
See :- Delta HMI to Delta PLC Modbus Configuration
We have made a sample program for Delta PLC and delta HMI Modbus communication. You can check it for better understanding.
Download Delta PLC Program
If you like reading our post then don't forget to Subscribe us by email and like us on Facebook.
Oct 4, 2011
Connecting Baldor VS1PF Drive to PC with Help of USB to RS485 Kit
The purpose of this tutorial is to provide a demonstration of connecting a USB to RS485 Cable kit from a Personal Computer to the Baldor VS1PF drive. The VS1PF provides ability to gain traditional energy savings achieved by controlling centrifugal loads with a variable frequency drive while implementing unique algorithms that further reduce energy consumed by your application. There are certain steps which must be follow to achieve this connection. Subscribe to Automation-Talk by Email.
Steps to be followed :-
1. Connect the USB cable to your computer and plug the other side to the USB to 485 Converter.
2. Set the USB Converter Switches for RS485 2-Wire Connection.
3. Wire from the Converter to the drive inputs C- and C+ making sure that the polarity of wires matches.
4. Wire from the GND on the Converter to the CM on the drive terminal.
Jun 9, 2011
Delta HMI to PLC Modbus Communication Network
Delta HMI is compatible to communicate with PLC in Modbus and up to 32 PLC Can be connected in a network with HMI being the Master and the PLC as slaves.
HMI to PLC Modbus Network in Delta:-
Here we will consider that there are 3 plc in the network as slaves and One HMI as Master. So we will set up a Modbus ASCII network of one HMI(master) with 3 PLC’s (slaves).
In Delta Pin 1 will be D+ and Pin 6 will be D-, so make the wiring accordingly.
Setting Up Communication between ScreenEditor and WPLSoft:-
To set up the communication we need to define some of the Communication Parameters both at the PLC and HMI sides.
We have to define the same communication parameters on the HMI side. Open the Screen Editor and select the HMI model and in the Base Port controller select as Delta Controller ASCII.
We have made a sample PLC and HMI program, which you can download below.
Delta HMI to PLC Modbus Communication Sample Program
Follow Automation-Talk on Facebook.
May 31, 2011
Delta Drive Modbus Parameter Address Table Manual
As we all know that Delta VFD is able to communicate in Modbus. And every device which is capable of Modbus Communication has its Modbus Parameter Addresses for each variable that we can read and write. Delta VFD Modbus Address of Register :-
All the Drives by Delta except VFD-A are compatible to communicate in Modbus Network. You can easily access the Drive Parameters from PLC by writing the logic accordingly. We just have to know the address of Frequency,current etc to write the value and read the values.
In this manual you will find the Modbus address of all the Parameters.
Delta VFD Modbus Parameter Address Table
Also we have explained the step by step of Delta PLC communication with Delta VFD in Modbus with a sample PLC Program.
Dont Forget to Subscribe to get all latest updates. Subscribe to Automation-Talk by Email.
Delta PLC Modbus Communication With Delta Drive
PLC to Drive Communication through RS 485 is a very good way to establish a communication network when we have more drives in the Network.In this article we will see the Communication Parameter Set up in Drive and PLC and also the PLC Program for Delta PLC to communicate through RS 485 port.
Delta PLC RS 485 Communication with Delta VFD-E :-
First of all we need to have the proper Communication cable , its very simple for this all we need is a RJ 45 jack and connect the the PLC with VFD. Just use the Pin 3 SG- and Pin 4 SG+. After the communication cable is ready we need to configure the VFD i.e delta VFD-E , we have to set up the following parameters.
VFD-E parameters for RS485 Communication:-
Parameter Number -------------------Name---------------------------------Value
2.00-------------------------Source of First Master Frequency Command-----3
2.01-------------------------Source of First Operation Command------------3(RS-485 )
9.00-------------------------Communication Address------------------------2
9.01-------------------------Transmission Speed---------------------------3(Baud rate 38400bps)
9.04-------------------------Communication Protocol-----------------------0(7,N,2 (ModbusASCII)
Now after setting these parameters in the Drive ,we have to make a appropriate PLC Program. As we all know that in Modbus Slave device needs to be issue command and it respond accordingly. All the Communication in Modbus is in the form of Queries , a Master device always Send Query to Slave Device and Slave Device respond accordingly.
PLC Program for Delta Modbus / RS 485 Communication :-
First of all we have to decide the communication Protocol settings , in this case we are using
7, N, 2, 38400, ASCII. To send a frame in delta plc we use MODWR Instruction and we have to trigger the bit M1122 to send the frame.
Also we need to read some data from Drive , for example then we have to use the MODRD instruction. We have made a sample program for this. All the comments are written in the program and you can understand it easily. The slave address we have used in the plc logic is 2.
Delta PLC Program for Modbus Communication.
Also to understand the Basics of MODBUS and modbus communication of Omron PLC with Drive and HMI, you can check our MODBUS Section.
UPDATE:- Delta VFD Modbus Parameters Read/Write
Don't forget to subscribe to get all latest updates.Subscribe to Automation-Talk by Email.
Jan 31, 2011
Omron NV HMI Modbus Communication with Omron PLC
NV HMI by Omron PLC is available in three different models , it is a superior HMI by Omron. Omron says that "V" stands for Value , Visibility and Variation. As a compact HMI it is the best for Package PLC. It has RS485 Communication feature and we will see in detail the procedure for MODBUS Communication of NV HMI with Omron PLC.
How to Configure MODBUS In Omron NV HMI :-
We have already told the NP5 HMI Modbus Communication and the basic PLC Program for Modbus Communication in our earlier post. To set up the Modbus in NV HMI first of all we have to make the hard-wire connections. Connect the Omron CP1W-CIF11 at Omron PLC CP1E and do the Settings in the CP1W-CIF11 for MODBUS Communication.
After this , if you will look at the back side of NV HMI then there is RS485 connection terminals. Connect the wires as follows:-
CIF11--------------------------------------------------------------------------------NV HMI
RDA+ ------------------------------------------------------------------------------- + SD (4)
RDB- ------------------------------------------------------------------------------- - SD(5)
Also short the terminals 7 (-RD) and 8 (E) with terminal 5(-SD).Also connect the terminal with terminal 4 on the NV HMI side.
Dip Switch Settings in NV HMI For MODBUS Communication :-
All the dip switch should be off for MODBUS Communication.
Settings in NV Designer Software for MODBUS Communication :-
Omron CX-one software package comes with NV-Designer Software which is used for Designing Screens in NV HMI. After the Hardware connections we have to make some proper settings in the HMI software also .
Open the NV-Designer and select a New Project , select the proper NV Type and NV Model and the click next , Here we have to select PLC Model as " Modbus Slave (RTU Mode)and click next and choose System Memory area Word and Bits.
See the below picture for a better Understanding of settings.
Click on the above picture for a better enlarged view.
Also we have to set up the Node ID of NV HMI and Communication Parameters. To do this click on PT --- NV Configuration and select the NODE ID and other parameters accordingly.
Note :- The configuration of Communication Parameters should be same at both PLC side and HMI Side.
See the below picture for a better Understanding of settings.
Click on the above picture for a better enlarged view.
Now our settings are done and we have successfully done the proper Hardware and Software settings for MODBUS Communication in NV HMI with Omron PLC CP1E.
Query Format for Read/Write in MODBUS for NV HMI :-
As we all know that in MODBUS all the communication takes place in the form of Queries and Responses. For this we have to write the PLC Program accordingly.
Query for Write :-
01------0010-----------000B------Address-------0001---------06**------**00
here :- 01 is Node ID, 10 is Function Code for Write , B is number of Bytes , 01 means that we want one register to write.
**** - It is the value which will be written in Address you mention.( Remember this Value is in Hexa-Decimal)
Note :- As in MODBUS we need to subtract 1 from the address , there is no need to do it in NV HMI , it does automatically.
Query For Read :-
0001--------0003----------0004---------Address----------Number of Bytes to Read.
here 03 is the function code for Read in MODBUS.
This way you will be able to establish MODBUS Communication between NV HMI and Omron PLC or any other PLC.
Remember :- NV HMI uses its internal Registers for MODBUS Communication, so put the address accordingly. GDT for words and GR for Bits.
If you are facing any problem in NV HMI Modbus Communication , then please write in Comment section and we wil get back to you . Also you can subscribe to get all latest update in PLC Programming ,MODBUS Programming , VFD Installation, SCADA Scripts.
Subscribe to Automation-Talk by Email.
Jan 25, 2011
MODBUS Gateways EKI 1221D & EKI 1222D By Advantech
Advantech Industrial Automation Group recently launched 1-port Modbus Gateway EKI 1221D and 2 - port Modbus Gateway EKI 1222D. If you have existing Modbus Devices and you want to connect then in a network then here is the solution. These Modbus Gateways have two Ethernet Ports , out of which 1 can be used to connect to a Network and other Ethernet port to other Ethernet device or another EKI 1221/2D.
MODBUS Gateways By Advantech EKI 1221D & EKI 1222D :-
<>EKI 1221D 1-Port Modbus Gateway<> It is a Bi-Directional gateway which can be used to connect all those devices which that can not connect to Network. This device provides an efficient way for remote management and Data accessibility. It has one serial port and it has unique feature by which user can select it to operate as Master or Slave. It also allows to set up Master at Ethernet and slave at seial and vice-versa and what more you can control Ethernet slave by serial Master OR serial slave by Ethernet master.
Specifications :-
Serial --->> Port = 1 , Type = RS-232/422/485
Ethernet --->> Ports = 2 , Interface = 10/100 Mbps
Connector --->> Serial = DB9 , Ethernet = RJ45
Baud Rate---->> 50 ~ 921.6 Kbps
Driver--->> Windows 2000/XP/Vista/7 (x86 and x64)
Operating Mode --->> 1. Modbus RTU (Master/Slave) 2.Modbus ASCII(Master/Slave)
<>EKI 1222D 2-Port Modbus Gateway<> It is also a Bi-Directional Gateways by Advantech but it has got two Serial Port. All other features and function supported by EKI1221D are also in EKI1222D. This 2-port device is meant for simultaneous connection with two Modbus supported device at the same time.It also Supports Ethernet auto-bypass function.
Note :- The two Ethernet port on EKI122D have the same IP address.
Review of EKI1221D/EKI122D Modbus Gateways | EKI1221/2D Review
These products by Advantech provides the Remote Management of all devices which are unable to connect to a network. Master mode supports 32 TCP slaves at the same time and Slave mode supports up to 16 TCP masters. These Modbus gateways also have the unique feature of auto searching of slave ID over configuration utility.
With all these most high-tech features packed in these Modbus Gateways ,these provide a cost efficient solution for Modbus devices Unable to connect to a Network.
Subscribe to Automation-Talk by Email.
Jan 14, 2011
Basics of PLC Program For MODBUS Communication - Modbus Fundamentals
MODBUS Communication is widely used network in almost all of the PLC. MODBUS is a 2 wire communication scheme with a feature of up to 32 slave devices in one network. As in our earlier post we have told PLC Programming for MODBUS communication with Drive, Programming for MODBUS communication with HMI and how to set up MODBUS in Omron PLC. But still may of us have the doubt as how to actually write a suitable PLC Program according to our application.
Subscribe to Automation-Talk by Email.
Basics of PLC Program For MODBUS Communication - Modbus Fundamentals : ---->>>
First of all let us understand one thing that in MODBUS all the communication takes place with QUERY and RESPONSE i.e the MASTER sends QUERY to a specific slave device and in turns the SLAVE responses to the MASTER accordingly.
So while Writing the PLC program first of all we have to design the QUERY format for specific function . There are major two operations either You WRITE or READ the registers of SLAVE devices in MODBUS network. For every slave device which has the MODBUS Communication Function have a specific set of REGISTERS and COILS for MODBUS Communication. All the REGISTERS and COIL address will be mentioned in Manual/Data-Sheet of the Device. So first of all make a note of that and select which Register/coil you want to read/write in your application.
After doing this , let us now understand that PLC (MASTER Device) will be able to send the query to 1 slave device at a time and that too a single query , so we will write the PLC Program accordingly . This is achieved with the Help of TIMERS.
How to do PLC Programming for MODBUS :-
First of all make the query as told above and write the query data in the PLC Data Registers, and when we want to send the query to slave then we will transfer those data in the PLC data Registers of MODBUS Communication. Do the above thing for each query of every slave you want to communicate. Also PLC has a MODBUS communication Bit , like it is A641.0 for Omron PLC CP1E , it depends upon PLC to PLC .
So we have to ON this bit to send the query.Every time we want to send the query to a slave device we have to ON this BIT and the query will be sent accordingly.
Now we are taking a example of OMRON PLC MODBUS Communication with VFD :-
Here we are considering that there is one PLC as Master and three VFD , the configuration of VFD in MODBUS has been told earlier , see here . So we have done the settings accordingly in VFD and also set up the Omron CIF11 port for Modbus Communication and settings in CX Programmer for configuration of CIF11.
So Prepare the PLC Program accordingly and still you face any doubts then we welcome you to write yours doubts in the comment section and we will get back to you .
Dont Worry !! we will post the complete PLC Program for OMRON PLC MODBUS Communication with JX DRIVE and HMI and also ENERGY METERS. Mean time you can try to write the PLC Program Yourself.
Dont Forget to Subscribe to get all MODBUS and PLC Programming related updates in Your's INBOX.
Subscribe to Automation-Talk by Email.
Jan 7, 2011
How to Configure Omron CIF11 for RS422 and MODBUS Communication
Omron CP1W-CIF11 Port is needed in compact PLC's for RS485 and RS422 communication. But Many of us have the confusion regarding its hardware connection and Dip switch settings for RS422 and Modbus. So, here we will tell in detail that How to Configure Omron CIF11 for RS422 and MODBUS Communication.
Omron CIF11 can be connected to PLC CP1E and CP1H , CP1E PLC comes with a inbuilt RS232 port so you have to connect it to second optional port and for CP1H you can connect it to either to one of two port.
CIF11 Connection for RS422 Communication:- For setting up the CIF11 for RS422 communication , make the connections as per diagram below.
Note:- Click on the picture for better enlarged view.
Dip Switch Settings for RS422 4 wire connections :-
If you look at the back side of CIF11 connector/port then there are 6 Dip switches , make the settings of Dip switch as follows:-
Dip Switch 1 --------------------------------------------------------->> ON
Dip Switch 2 --------------------------------------------------------->> OFF
Dip Switch 3 --------------------------------------------------------->> OFF
Dip Switch 4 --------------------------------------------------------->> OFF
Dip Switch 5 --------------------------------------------------------->> OFF
Dip Switch 6 --------------------------------------------------------->> OFF
This way your communication will take place in RS422 4 wire mode.
CIF11 Configuration for MODBUS/RS485 Communication:-
To set up the CIF11 for Modbus communication first we have to make hardware connections. As there are 5 terminals on CIF11 namely RDA-, RDB +, SDA-, SDB + and FG out of these FG is for ground, As in MODBUS Communication it is always required to connect "+" with "+" and "-" with "-" terminal.
So, you can use the either of two set i.e either you use RDA - and RDB + OR you use SDA - and SDB + for connection purpose. So make the connection as described above.
Dip Switch settings of CP1w-CIF11 for MOdbus Communication :-
Dip Switch 1 --------------------------------------------------------->> ON
Dip Switch 2 --------------------------------------------------------->> ON
Dip Switch 3 --------------------------------------------------------->> ON
Dip Switch 4 --------------------------------------------------------->> OFF
Dip Switch 5 --------------------------------------------------------->> ON
Dip Switch 6 --------------------------------------------------------->> ON
So after these settings yours CIF11 is ready to use in MODBUS , still you need to configure it in CX-programmer for PLC programming purpose. So here we will also tell how to set up CIF11 in CX Programmer.
Configuring CIF11 in CX-Programmer:-
Just open CX-Programmer and after slecting the type of PLC you are going to use , then click on settings and select the port where you connected CIF11, for example if you are using CP1E and connected to serial option port , then select serial option port and select MODBUS RTU master there, as in MODBUS communication Omron PLC is Master Device and select baud rate, parity, stop bit accordingly to yours slave devices connected in the MODBUS network and then click OK.
Now all your settings are done and CIF11 is ready to communicate in MODBUS. Below is a picture for better understanding.
If you want more Information on MODBUS communication in OMRON PLC and PLC Program for MODBUS Communication then you can see here.
You can subscribe to get all related posts in yours E-Mail. Subscribe to PLC, HMI Programming and SCADA Tutorials by Email.
Jan 1, 2011
RS422 Communication Between Omron HMI NT11 and PLC
Omron HMI NT11 comes with two port RS232 and RS422. To interface it with PLC we can use either of one port. But generally compact PLC comes with only one RS232 port and if we are using any other external device to be connected on RS232 port of PLC then the problem arises. So dont worry here is the solution, we can interface our NT11 HMI with RS422 port.
To connect make sure that PLC has Rs422/Rs485 Port.Here we will take example of as How to connect NT11 in RS422 with Omron PLC CP1E/CP1H.
First of all connect CIF11(rs422 port) on PLC and after that make the following hardware connections.
NT11 Side ------------------------------------------- Omron PLC Side
RDA ------------------------------------------------ SDA
RDB ------------------------------------------------ SDB
SDA ------------------------------------------------ RDA
SDB ------------------------------------------------ RDB
NOTE:- Also Connect the shield to FG terminal on PLC Rs422 port.
So after making these connections , now we have to make some DIP switch settings in PLC and HMI side.Subscribe to PLC, HMI Programming and SCADA Tutorials by Email .
Dip Switch Settings in NT11 and PLC for RS422 Mode:-
In NT11 side, if you see at the back side then there are dip switches , make them all OFF.
IN PLC side also make all dip switch OFF.
Also some software settings have to be made. Turn of the power of HMI and press F1 and F2 keys together and then turn on the power , by this way you will enter the maintenance mode of HMI. Here you select the Mode as Host link , baud rate as 19200 and connection as RS422.
After making all these settings yours HMI is ready to work . Just recycle the power once and its all complete. If after doing above things still you are facing some problem then feel free to contact us in comment section and we will be happy to help you . You can also subscribe to receive all such practical things directly in Yours Mail-box.
Subscribe to Automation-Talk by Email.
Dec 22, 2010
How to Read Data through Trinity Meters Using MODBUS
If you are Using Trinity Energy Meter and want to read data through Modbus Communication of Trinity Energy Meter then you don't need to worry. This Article will tell you How to Read Data through Trinity Meters Using MODBUS. For this you should keep in mind that the Meter you are using should have Modbus Compatibility, Your PLC which you are using should be MODBUS ready and you should know the MODBUS data words of your PLC. Subscribe to Automation-Talk by Email .
See below Procedure to Connect the Trinity Meters Using MODBUS
RS-485 address map for Trinity meter/ Trinity Meter Modbus Data Words
Click to Enlarge Trinity Energy Meter Modbus Data Word Table
1.You need to buy converter according to the device in which you want to load data value from Trinity meter. For example, if you want to load data in PC (Computer) from Trinity meter, then you need to buy converter which convert data from RS-485 to RS-232 or RS-485 to USB. If there is RS-232 port available inside your PC then you need to buy RS-485 to RS-232 converter. If there is only USB port inside your PC then you need to buy RS-485 to USB or RS-485 to RS-232 & RS-232 to USB converter. And, if your device supporting RS-485 port then you don’t need to purchase any converter, you can directly connect your device with our meter on A+, B- terminals.
2. If there is converter between your device and Trinity meter then connect A+ terminal of your converter to A+ Terminal of Trinity meter & A- (or B-) terminal of your converter to B- terminal of our meter.
3.Trinity meter has 8-Data Bits, 1-Stop Bit and No Parity. Adjust Baud Rate according to meter. It may possible that, Trinity meter have fixed baud rate like 9600 or 19200.
4.Configure your device (and converter) according this communication setting (mentioned in point-3) to match with Trinity meter.
5. Set, Meter Address (Station ID) inside Trinity meter according to your requirements. While programming of Meter Address, please take care that each meter on RS-485 bus should have unique address. Meter Address on RS-485 bus should not conflict with each other, otherwise they will do malfunction when we try to read data from conflicting meter addresses.
6.Trinity meter supports Query No. 3 – Read Holding Register on MODBUS-RTU protocol.
7.Now, Observe address map in below mentioned table. You can notice that, there is specific address for different parameters and different MF (Multiplying Factor) for each parameter.
8.Trinity , all parameters are 4-Byte Unsigned Long (Unsigned 32-Bits).
9.In single Query, you can read maximum 32-Bytes from Trinity meter. As per address map, if you want to read all mentioned parameters in table, you need to build 4-Quaries(For 3000 to 3019, 3030 to 3049, 3060 to 3079 & 3090 to 3109). But, this thing also depends on Meter Type. Here, I have write this thing according to below address map.
10.Now, For Example, If you want to read single parameter KVA (address 3000) from meter as per address map table, then your query in Hex Format will be
QUERY => 05030BB70002778D
Now, let see meaning of each bytes in above query.
i)1st Byte [05] shows Meter Address, which you have programmed as per your requirements.
ii) 2nd Byte [03] shows QUERY Type, which 03-Read Holding Register type query.
iii) 3rd & 4th Bytes [0BB7] shows starting address in meter address map from which you want to read data. Here, 0x0BB7 in hex shows that 2999 in decimal, But actual address of KVA is 3000. Now, according to MODBUS Protocol, most of MODBUS RTU supporting software decrement parameter address by 1 and then send query to meter. So, for that here build query is showing 2999 = 3000 – 1. If your device is not doing decrement by 1 then you need to do it by your self before build query. Now, suppose if we want to read data for KVAh then these 3rd & 4th Bytes will be 0BD7.
iv)5th & 6th Bytes [0002] shows number of bytes need to read from meter. Here, we want to read only KVA (single parameter) so that here it is 0002. Now, if we want to read 2 parameters then these 5th & 6th Bytes will be 0004 (0002 * 2). Same we if we want to read 3 parameters in one query then 5th and 6th Bytes will be 0006 (0002 * 3).
v)7th & 8th Bytes [778D] shows CRC for MODBUS RTU query. To, calculate CRC for build query, you need consider string from 1st Byte to 6th Byte.
11.When Trinity meter will receive these 8-Bytes, it will 1st compare received meter address with programmed meter address, if it is not matching then it will ignore received query and it will not give response. So, only the meter which have same programmed meter address, only that meter will give response to received query. But, before giving response meter will compare received CRC with calculated CRC, if it is matching then and then meter will give response to received query otherwise meter will not give response to received query even though meter address is matching.
12.When, query/response is going on through RS-485 medium, at that time, it may possible that because of external noise, data value change so that calculated CRC will not match with received CRC bytes at receiving end. So, external noise can affect communication.
13.After receiving query, meter will process it, So, meter will take few milliseconds before giving response. So, you need to configure RESPONSE TIME inside your device. This response time will differ from meter type to type. Suppose, PowerPro takes 10 milliseconds to give response after receiving query, then this will not same for GOBLIN or PowerCube or Saturn. But, this response time will same for same type of meters. So, you need to consider this parameter also while communicating with Trinity meters.
14.Now, Response to above query will be look like
RESPONSE => 05030400000059778D
Now, let see, what above response shows,…..
i) 1st Byte [05] shows Meter Address, which you have programmed as per your requirements.
ii) 2nd Byte [03] shows QUERY Type, which 03-Read Holding Register type query.
iii) 3rd Byte [04] shows total number of data bytes inside response. In query we were given 0002 so in response we got 04 (0002 * 2). If, in query we were given 0004 then in response we will get 08 (0004 * 2). So, this byte is multiply by 2 in 3rd & 4th data bytes of received query.
iv)4th, 5th, 6th & 7th Bytes [00000059] shows data for KVA. This value is shown in Hexadecimal format, so in decimal format it will 89. Now, according to address map, there is MF = 100 for KVA. So, actual value of KVA = 89 / 100 = 0.89. Now, according to address map shown in table, in address 3000 there is 0000 byte data and in address 3001 there is 0059 data. Now, suppose if KVA = 673.97 then these 4th, 5th, 6th & 7th Bytes will be 00010745 (in hexadecimal format). In, this case according to address map, in address 3000 there is 0001 byte data and in address 3001 there is 0745 data. So, here you can see received data bytes order (MSB & LSB).
v)8th & 9th Bytes [778D] shows CRC for MODBUS RTU response. Here, in this example it is showing dummy CRC. As, number of data bytes increase, CRC bytes position will also change, but it will always at last 2 bytes.
For any Query you can respond here in comments. Subscribe to Automation-Talk by Email for more MODBUS Tutorials.
Dec 9, 2010
Omron HMI NP5 Modbus Communication PLC Programming
Dip Switch Settings in HMI NP5 for MODBUS :-
If you look at the back side of HMI there are 5 number of DIP switches . Make the following settings .
Dip s/w 1 - ON . Dip s/w 2 - ON. Dip s/w 3 - ON. Dip s/w 4 - OFF.
Now open the NP designer software and select the model of the NP and go to settings tab and make the following settings .
Settings of OMRON HMI NP5 for MODBUS:-
PT Unit Number - 1 (This will be the slave ID of HMI in MODBUS network)
Host Unit - 0(this is the master PLC address)
Interface - RS485
Data Bit - 8
Stop Bit - 1
Baud Rate - 9600
Parity - None
Com - Com2
Dont forget to make the similar settings in the PLC. See here.
Now Both the hardware and Software settings are done for HMI to communicate in MODBUS .All we need now is to write the PLC Program .Subscribe to Automation-Talk by Email.
Omron HMI PLC Program:-
As we all know that in MODBUS we have to send the query to the slave devices to read and write the internal registers.
Query / Data format to Write:-
01 (HMI Id) , 0010 (function code), 000B(data bytes) , 0000(data location) , 0003 , 0600 , 0003 , E800
Here we have shown the data location as 0 but real location is 1 (we have to subtract 1 from the real data location in MODBUS Query). The data that will be written in data location 1will be 03e8 which is equivalent to 1000 in decimal.
Query / Data format to Write:-
01 , 0003 , 0004 , 0000 , 0003 (data location)
While reading we always add 1 in data location . So in the above we have written 3 but actually we are reading the data location 2.
This POst will definately help you to understand the MODBUS communication of HMI . Keep reading here for the full PLC program of Omron HMI . Dont forget to Subscribe to receive all the updates in urs E-Mail.
Subscribe to Automation-Talk by Email.
Nov 28, 2010
Omron JX drive Modbus Communication with OMRON PLC
How to communicate JX drive in MODBUS with OMRON PLC or any PLC? We will see in this post that what are the necessary settings and How to Write PLC Program for MODBUS?
First of all as depicted in earlier post you to do the hardware settings both in the RS485 port and PLC . You can review those settings from here.
After that you have to set some parameters in JX Drive for MODBUS Communication. Here we will use MODBUS for JX Drive run , stop and frequency reference. Using MODBUS for Drive Frequency is a very good method rather than using the PLC analog output as it saves the cost and give us a better control over drive.
HOW TO CONNECT JX DRIVE IN MODBUS?
JX Drive has a RJ45 jack for Modbus Communication, plug the Jack and connect its number 5 pin to RDB+ on RS485 port of PLC and number 6 pin to RDB-.
NOTE:- Click on the picture for a large and clear view.
For using yours JX Drive In MODBUS network you have to do some hardware settings.
1. First of all set the required parameters (listed below).
2. Shut down the power.
3. Open the connector.
4. Connect the RJ 45 connector i.e communication line for MODBUS.
5. Set the s7 DIP switch to 485.
6. Turn on the Power.
See the Below picture.
See Below is the list of Parameters of JX Drive for MODBUS Communication.
NOTE:- Click on the picture for a large and clear view.
If you want to have only frequency reference through MODBUS and Run command through terminal then set A002 to 1 i.e terminal mode.
Now we have done all the necessary settings in Drive and as discussed in earlier posts you can do the the settings in the PLC accordingly.
Now the BIG question is HOW to Write PLC program for MODBUS Communication?
The data format which the JX drive accepts is in following format.
1. Header(silent) 2. Slave Address 3. Function Code 4. Data 5. CRC 6.Trailer(silent)
Slave address can abe any from 1 to 247 set it accordingly.
Function Code can be different for different functions.
1 - for coil reading
3 - for holding register content reading
5 - writing in to coil
6 - writing in to register
8 - loopback test
9 - writing multiple coil
10 - writing multiple register
Now we will see that what exactly data format we have to write in PLC Program. Just make sure that what data words of your PLC are used in MODBUS, for OMRON PLC We have already seen which data words are used. If u want to review, you can reveiw it from here.
We will take here the example of OMRON CP1E PLC.
Query / Data format for JX Drive in MODBUS.
To set the forward command write :
D1300 D1301 D1302 D1303 D1304
01 05 04 01 00
Where: 1 is station id i.e node number and 5 is function code and 4 is number of data bytes and 1 is coil address and 00 is for forward.
Remember:- To send a command to write in JX drive we always subtract 1 from the address. So, here in the above example actual coil address is 2 but we subtracted 1.
To set the reverse command write:
D1300 D1301 D1302 D1303 D1304
01 05 04 01 ff00
To set the frequency write :
D1300 D1301 D1302 D1303 D1304
01 06 04 01 (frequecy)
Remember the MODBUS communication takes place in hexadecimal so if u will write 64 then drive will have frequency 10.(hexa 64= decimal 100). The derive automatically divides the received frequency command by 10, so write the frequency accordingly.
To set the RUN Command write :
D1300 D1301 D1302 D1303 D1304
01 05 04 00 FF00
To set the STOP Command write :
D1300 D1301 D1302 D1303 D1304
01 05 04 00 0000
NOTE : After writing all these you have to ON the System BIt a641.0 to send the above query to the specified drive.
System bits are different for different PLC and you can find them in their manual.
So this way you can play with your drive and by writing the PLC program accordingly you can do yours application easily. If you have any doubts you can contact us or leave a comment. In the next section we will discuss how to exactly write the PLC program for JX Drive MODBUS Communication. Don't forget to subscribe to get all latest posts via E-mail. Subscribe to Automation-Talk by Email.
Nov 27, 2010
MODBUS Settings for OMRON PLC CP1H
Hardware settings for the CP1W and Dip switch settings are the same as done in CP1E, as depicted in the earlier post. If you want to review it again and want to know WHAT IS MODBUS COMMUNICATION, then see here.
Now we have to make settings inside the PLC through CX-Programmer. So we will look here that What are the settings in CX-Programmer to Configure MODBUS?
In CP1H we can connect CP1W-CIF11 in both the Serial Option Port i.e either Port 1 or Port 2. To do necessary settings open CX-Programmer and after selecting PLC type as CP1H, right click on settings and go serial option port 1. Then select mode type as Serial gateway (this is used in MODBUS Communication) and select the baud rate and format as accordingly to your slave devices.
NOTE:- All the slave devices and Master should have the same baud rate and same format.
If you want to connect the RS485 Port in Serial Option Port 2 then make all these settings under serial option port 2 tab . Look below picture for a more clear understanding.
NOTE:- click on the image for a clear larger view.
Now we have to write the program in PLC for the communication to place. A fixed Data words are allocated inside the PLC for the MODBUS Communication.
For Serial option Port 1 DM32200 to DM32299 are used to send Query and receive responses from slave and system bit a641.0 is used to send the query to slave devices.
For Serial Option Port 2 DM32300 to DM32399 are used to send Query and receive responses from slave and system bit a640.0 is used to send the query to slave devices.
The format of QUERY in MODBUS Communication generally depends on the slave devices as how they accept it but still there is a standard format.
DEVICE ID <<<>>>FUNCTION CODE<<<>>>DATA <<<<>>>CRC
Device ID in Modbus can be from 1 to 247 but MODBUS support a maximum of 32 nodes in one network . Function code are different for different purposes, generally function code 3 is used to read and function code 6 is used to write . Later on we will discuss all these in in depth and understand it by taking examples as how to write PLC program for MODBUS in Omron PLC, etc.
Don't forget to subscribe to receive latest updates in your Email by subscribing to Automation-Talk by Email.
Nov 26, 2010
How to configure MODBUS in Omron PLC CP1E
MODBUS is used for serial communication protocol used for communicating the Modbus supporting devices with PLC. Before configuring Modbus in CP1E let us understand a little about MODBUS. What is MODBUS?
But modbus RTU is mostly used to communicate with PLC. To set up Modbus Communication in Omron CP1E, we have to make some settings.

Note:- Click on the photo for a clear view.
Also, take a look at how the CP1W-CIF11 RS485 port looks. At the front side, it has 5 terminals for the connection and at the back side, it has DIP switches.
Recommended Article: PLC Program for Omron Encoder Interfacing with Omron PLC
Connect as shown in the below diagram. Connect the other end of the wires to the device that you want to communicate in MODBUS. Always remember to connect "+" with "+" and "-" with "-".

Now all the necessary hardware settings are down, Now we just need to do some settings in PLC. Just Open CX-Programmer and select CP1E model.

After all these settings your CP1E is ready to communicate in MODBUS but now you have to write the Program for communication in a standard data format. In Modbus, the standard format is:-
Device address --- function code -- data -----error check
All the Modbus supporting devices follow this standard format. In Cp1E fixed DM words are defined for sending these data formats to slave devices.
DM1300-DM1399 are used for this purpose, once you write the desired format then just on the system bit A641.0 to send the above query to the desired slave device. We will discuss it in depth in the next posts as how to communicate with drives, HMI, Energy Meter, etc. in MODBUS with our PLC and how to read & write data in them.
So Keep reading here and if u have any doubts you can contact us or leave a comment and we will get back to you as soon as possible.