how can i convert the data received in modbus formate to other format?

Guest

Guest
G
hi there,
i m today in a position where i require to convert protocol.
the reason is i m working on a project where one device talks in modbus and other PLC has its own proprietery protocol,and i have to communicate them.
the PLC manufacturer has disclosed the protocol and now i can recieve and send data to that PLC with proprietery PROTOCOL.
What i m doing is i m using one computer in between these two deivces and to its COM1 port there is MODBUS master decive attached and to its COM2 port i have attached the PROPRITARY PLC.
now today i m in a position to
1:send n recieve frames from PC (computer) to Propritary PLC
2:and using modsim32 on Computer i have checked the communication with MODBUS master device.it is successfull

now how to write the code so that the data received from the Propritary PLCs registers are sent to modbus master device who is querying for the same???/

for this purpose out of MODBUS RTU OR MODBUS ASCII which will be more advantageous?

sorrry for my awful english, hope everyone will understand it.

thank u
swapnil
 
Unless this is a mass market product, you might want to investigate a third party communications bridge. Writing this kind of code is daunting, although I'm sure someone here can give you a link to a Modbus protocol program to get you started. If you compare the cost of your time against the cost of purcahsing a canned solution, it generally isn't worthwhile to do your own for a single project.

A lot depends on the brand of PLC you are using. Prosoft and Mille Applied Research are two compnanies that build a lot of bridges. If you can identify the two brands of PLC others can give more specific reccommendations.

I's say Modbus RTU is the most common, and you'll get the most options with that protocol.
 
hi,
the PLC i m using is MESSUNG PLC XMP8-20 model which has its own protocol,and the othe device i mentioned is deltav system from emerson inc. which has serial card with modbus protocol.
now wht i want is to send the query to read (say holding registers) from deltav system in modbus.this query will be read by the PC in between (in my code) then the pc will send same query in the format which the plc will understand.when the plc sends the responce to the query from PC and send the required data.then the pc will right the same data on the stack (i will it define to resemble the holding registers in modbus)then out put that data by making some changes in source code (if i get it).
i donno will it be possible or not but this is how i m thinking to do it.
for this thing i also need to see time outs of the devices i know that
but can it be possible????
 
I think you will need to run one task that polls the PLC for data and saves it in arrays (discrete inputs, discrete outputs, data registers). You'll also need to be running a modbus slave task that responds to requests from the Delta V modbus master.

I think the turnaround time will be too long if you wait for a modbus request from Delta V, send the Messung request to the PLC, wait for the answer, and then transmit the data back to Delta V. The Delta V modbus master application will report a 'timeout' fault.

The modbus protocol is the closest thing the PLC world is likely to ever see as a universal protocol. Have you checked to see if there is any way you can set up a serial port on the Messung as a modbus slave?
 
thanks steve thats a good idea of simmultaneous communication with messung and deltaV USING ARRAY.
and 1 more thing,there is no way to use modbus for that plc
it has its own protcol.
but i got enough knowledge about that protocol by which i m able to communicate that plc with computer.
i have implemented and i m successful in reading the plc registers and getting the data (on/off) from the plc.and place it in array.
now the main thing i wannted is,how to place that data in modbus form.
i mean as holding registers,input status,and all.
i think for that i have to implement complete modbus source code????
is there any idea to implement it?
thank u
 
The Modbus master assumes that there are four basic memory areas in the slave. Two of these (inputs and outputs) are assumed to contain discrete (ON/OFF) data. The other two are assumed to contain numeric data. A 'Read' command from the Modbus master will identify which of those memory areas the master wants to read, how many bytes of data to read, and the location within that memory area to start from.

If the Modbus master wants to read the data from the first (16-bit) analog input channel, it will send a request to read from memory type 3, data length 2 (bytes), offset 0 bytes from the start of memory type 3.
 
i m thinking of using VB6 or C..
wht will u suggest to use ?
which language will be more easy to implement this job?
thanks for ur URLS.
 

Similar Topics

Hi all, I have a question on how to hande data that i read from a sensor (type IFM) trough IO-Link (1734-4IOL) I get 2 SINT's (SINT[0] and...
Replies
2
Views
662
I'm working with a customer to copy one of the machines they designed in-house several years ago. The previous PLC programmer had a thing for...
Replies
8
Views
2,031
Hi all! looking for help converting an 8 bit word SINT tag into decimal. I have an IFM SBN246 flow sensor wired in my controller (L310ER) and it...
Replies
4
Views
2,130
I need a good idea to solve a small task. My customer bought a measuring device where the measurement is collected by a controller from a...
Replies
6
Views
3,223
I am helping a company who would like use their Graphtec GL220 data recorder, to record the voltage the KB DC drives are putting out to the...
Replies
15
Views
3,992
Back
Top Bottom