how can i communicate data with twido plc using … · schneider electric - eu – hussain ahmed...

26
Unity Application Generator How Can I… Exchange data between TWIDO PLC and any Unity PLC using UAG

Upload: trinhhuong

Post on 19-Sep-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Unity Application Generator

How Can I…

Exchange data between TWIDO PLC and any Unity PLC using UAG

Page 2: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 2- EU – Hussain Ahmed – 07.01.2009

Issue

●I want to exchange data between TWIDO PLC over Modbus TCP with any Unity PLC. The TWIDO has to communicate over IO Scanner.●I need to read and write 5 input and output words.

Page 3: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 3- EU – Hussain Ahmed – 07.01.2009

How to do..Basic explanation

●UAG offers a possibility to include a generic device and made it available through out the project.●A new generic device can be included in customization. ● Goal: ●To develop a device to represent TWIDO PLC with five inputs and

five outputs of type word.●This device should be capable of communicating with PLC over IO

Scanner. ●This means user should be able to key-in IP address to the device.

Page 4: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 4- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●Under UAG customization �PLC �User defined module, a new module can be inserted.●By clicking on User

defined module, a list of existing modules will be appeared. ●New device can be

added by using ADD option.

Page 5: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 5- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●By clicking on ADD option, this screen will appear.

Page 6: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 6- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●User can select Module category. These options are available●User can select

possible rack type. These options are available

Page 7: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 7- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●We have named the device as TWIDO with Complex IO as Module category and Rack is of type Ethernet IO.●Description and Icon

can be changed.●IO Areas can be

defined each area for Input, Output or both can be defined.

Page 8: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 8- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●In this case we have defined only one IO Area with 10 bytes for inputs and 10 bytes for outputs.●Input slave and output

slave represent the starting address of these words in TWIDO.

Page 9: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 9- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●By clicking on IO Mapping, IO can be mapped for each areas. Here we are defining words under IO Area “XDIO”

Page 10: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 10- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●For each IO area, number of bytes, data types, description and quantity can be defined.

Page 11: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 11- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●In this example, we have defined two IO areas under “XDIO” under INPUT they look like this:●Note: Each word representing 16 digital inputs i.e. XDI1 is word

for first 16 Bool inputs on TWIDO.

Page 12: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 12- EU – Hussain Ahmed – 07.01.2009

How to do.. In Customization

●In this example, we have defined two IO areas under “XDIO” under OUTPUT they look like this:●Note: Each word representing 16 digital outputs i.e. XDO1 is

word for first 16 Bool outputs on TWIDO.

Page 13: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 13- EU – Hussain Ahmed – 07.01.2009

How to do..In UAG

●After analyzing and saving the customization file, the project should be opened in UAG. Following message will appear:

●Note: We have selected ETHERNET IO , it should be ensured that a PLC with proper Ethernet interface is available and proper IP address has been given.

Page 14: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 14- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●Under the PLC, a new rack should be included.●Following

parameter should be selected.

Page 15: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 15- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●Under the new Ether IO drop, rack should be opened with “Open Rack”option.

Page 16: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 16- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●Under the rack, the new module can be inserted.●Following

parameters should be selected.

Page 17: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 17- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●Note: the new module “TWIDO”should be available under MODULE column.●Parameters window

can be opened by right clicking on the module

Page 18: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 18- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●By clicking on “Open IO”, this screen should be appeared.

●To test, following variables should be created, under variable table in UAG.

Page 19: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 19- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●The variable should be connected to input /output of the newly developed device..

Page 20: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 20- EU – Hussain Ahmed – 07.01.2009

How to do.. In UAG

●The new block will appear like this under UAG� VIEW � Topological viewer

Page 21: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 21- EU – Hussain Ahmed – 07.01.2009

How to do.. In Unity

●UAG will generate Unity project with read /write area under IO Scanner

Read /write areas

for IO scanner

Page 22: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 22- EU – Hussain Ahmed – 07.01.2009

How to do.. In Unity

●UAG will generate sections for communication and the section will be containing the variables like this

Page 23: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 23- EU – Hussain Ahmed – 07.01.2009

How to do.. Very important: Note

●Please note that we have written in our new device, the slave index as “0” and “20”●That is why it was

appeared in Unity like this:

Page 24: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 24- EU – Hussain Ahmed – 07.01.2009

How to do.. Very important: Note

●But this indexing has to be configured according to the requirement of the device. In another example, we have placed 22, results are like this:

Page 25: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 25- EU – Hussain Ahmed – 07.01.2009

How to do.. Recommendations /Notes

● In IO Scanner, in one telegram, one can write/read maximum 100 words●We strongly recommend to do the address ranges in consecutive

address areas. So if the first area is starting from 1002, then it is better to place the next address area at 1004 and not at 1120.● It is very important to understand the address ranges of the

device. ●We have used only one IO Mapping with “INPUT /OUTPUT” that

is why UAG has only one IO Scanning entry generated. User can define two or more separate IO mapping and UAG will generate as many entries in IO Scanner.●There should be proper program written in TWIDO /UAG so that

the program can read and write the date in addresses defined in UAG.

Page 26: How Can I communicate data with TWIDO PLC using … · Schneider Electric - EU – Hussain Ahmed – 07.01.2009 2 Issue I want to exchange data between TWIDO PLC over Modbus TCP with

Schneider Electric 26- EU – Hussain Ahmed – 07.01.2009

Conclusion

● In UAG new devices can be included by defining them under Customization.

●There are different methods of communication and rack types possible

Thanks for your attention!