PLC communication question

hoejinkim

Member
Join Date
Aug 2012
Location
Oregon state
Posts
23
Hi

I am a college student and studying PLC
I have Three Questions.

1. I am gonna have PLC communicate with other device(roborealm) through Modbus TCP/IP.
Do I need more software program between PLC and othe device?
, or can they communicate directly without other software?

2. I don't understand about setting variables for slave in PLC. Is there useful data or document that I can learn and understand the principle easily?

3. Does anyone have samples in terms of communication through the modbus?

Thank you so much

have a nice day!
 
One device has to be the Modbus master. The other device must be a Modbus Slave. I don't know what a roborealm is but it's unlikely that it is a Modbus master. Could be, but usually the PLC or a PC or a control system is the master and field devices are slaves.

Each has to communicate on a common hardware link. Your mention of Modbus TCP infers that the common hardware link will be ethernet. Does each device have a port capable of Modbus communications? (Just because there's an ethernet port, doesn't mean that the Modbus protocol is supported).

Modbus just gets data from one device to another. It doesn't DO anything with the data. If you want to Do something with the data, then you need software or firmware or programming what you already have to get make some use of the data transferred via Modbus.

Data in a slave is put into Modbus registers. Most field devices provide a map (list) of the register addresses, what data each register contains. and the data format for the data therein. Some slaves need to be configured or programmed to specify which data is placed internally into Modbus registers for access by a Modbus master. Depends on the device.

A sample communication is the Modbus master sending a packet of bytes that the slave decodes as
- attention, Slave number 5,
- perform function code 03 (provide data in your holding registers)
- starting at Modbus register address decimal (4)0065, where the numeral 4 is understood as the memory area for the 03 function code, but is not included in the message itself.
- provide data from 8 contiguous registers, where a register is understood to be 16 bits (two bytes)
- the CRC (cyclic redundancy check) value is xx, so check to make sure there aren't any extra, missing or flipped bits.

The slave's decoded reply looks like:
- this reply is from slave 5
- I've executed function code 03
- this message has 16 data bytes (contents of 8, two byte registers)
- first register value HIGH is XX (hex), first register value LOW is yy (hex), 2nd register HIGH value, 2nd register LOW value, etc for the required number of registers/bytes.
- CRC value

Chipkin's manual if pretty good:
Modbus for Field Technicians
www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf
 
Last edited:
Just took a quick look at Roborealm - very interesting package!

As Danw surmised, the software does operate as a Modbus slave:
http://www.roborealm.com/help/Modbus_Slave.php

In essence, that means Roborealm will only respond to commands, never initiate communications. The Modbus master (the PLC in your case) must send data to Roborealm to be stored in a register, or request that Roborealm send data from a register to the master.
 

Similar Topics

Hello everyone, I just started a new project but want to make sure I am heading to a correct direction before I am too far down the...
Replies
14
Views
4,027
Where I work we have a AB PLC 5/40 controlling a process that has an PLC 5 connected on Channel 1B and a Dataliner Display on Channel 1A. The PLC...
Replies
3
Views
5,420
hi, I have a question. I have GE PLC and I need to write the application in C++ that will set the TBits on and off through TCP/IP. Can somebody...
Replies
0
Views
2,841
Hi~Everyone!! This is a simple sketch of our PLC structure. About the PLC communication, I know between PLC1-1 and PLC1-2 can use IPC flags...
Replies
2
Views
16,182
OK working on a project The customer has a exsisting AD 250 PLC we are adding a AD 450 PLC wich is networked through a router and controlled by...
Replies
2
Views
7,099
Back
Top Bottom