Hello Modson,
If you have both master and slave PLCs, there is nothing
keeping you from victory ! But keep cool, and prepare your action
by dividing the problem in several basic tips you can dominate separately :
- Base level hardware compatibilities : which common physical
layer do you choose ? (RS232, 422, 485, O.F, Ethernet
embedded protocol... ) First choose your network hardware,
and always prefer insulated interfaces, or add them if not
available on boards. Caution 1 : "RS422" or "RS485" can be
interpreted / wired in different manners by two
manufacturers ! Third-party's interfaces can eliminate this
pitfall.
- If you don't clearly understand what means "Modbus protocol"
look for informations describing methods and requests. Easy to
find, since any material's manufacturer offers such a link port.
Two sec. needed to find this page for example :
"http://tesla.selinc.com/instruction_manual/701-1/701-1_0C_20011005.pdf" (I never heard about this company before...)
Caution 2 : Be sure that your two PLCs use the same Modbus
protocol. RTU (binary coded) is common, but ASCII too, and are not
compatible... Look for details.
- At this step, become familiar with the few usual commands,
and identify those which are equally recognized by your two PLCs.
If you don't have time enough, try to use 'Read n bits / n words'
and 'Write n bits / n words'. In fact, you could only use
Read/write n word (always from master point of view), depending on
how is built your exchange table.
- Open your manuals, and configure the link : baudrate, parity,
data bits, start/stop bits. Caution 3 : Be sure that the whole
number of bits is the same one on each side. Certain systems only
use fixed frame length.
- Slave side : usually, slave units are passive. They receive
messages and only answer if the question is recognized.
Message accepted if : slave address, function number, data
parameters are recognized, and control byte is correct (CRC
or LRC depending on your Modbus type)
Caution 4 :
As far as I remember, on A-B's SLC5xx coupler, perhaps have you
in the CPU to transfer datas (bits/words) to/from a shared
memory (shared by coupler and CPU) from/to central memory.
(Clearly mentionned in the coupler's Prosoft manual)
Contact your reseller (or A-B experts on this site !)
- Validation of the slave side : I always suggest to download
a master software for slave validation, allowing to test
simultaneously both physical layer and slave's software
configuration.
Have a look at
http://www.kepware.com/32bitdrv.html
Download your modbus OPC server (5 types available !)
And control with your PC that you can exchange datas with
the slave. Those complete drivers can run in demo mode,
and a quick OPC client is available for tests.
Notice : you can test too from an MS Excel's sheet.
Download the help files you need, if you're not familiar
with that 'fundamental test tool'.
- Master side : here is the program you have to build, but take
time before, to build your exchange table. Datas set in the
Write area by master, will be copied in the slave's memory
at asked addresses. Incoming datas in the Read area are copied
from the slave.
So if the number of datas (bits/words) is low, only two requests
can solve your whole problem. (Usually, up to 2048 bits can be
transmitted in a single frame).
Identify in your manual which function blocks can be used to
manage basically the two kind of requests described above.
I've tried to summarize many years in implementation of
heterogeneous networks, but when reading my reply, I'm afraid it's not so easy at all !!
Feel free to ask for help
Regards