Dear friends
I need a sample program for modbus CP341 in step7,
can any one help me?
[?]: Modbus sample program for CP341
-
- Posts: 40
- Joined: Tue Jan 01, 2008 9:37 am
- Location: Iran
-
- Posts: 18
- Joined: Mon Mar 27, 2006 1:09 pm
- Location: Philippines
Since you are to use the CP341 for modbus, did you also purchased the hardware dongle for it? You are required to put it at the back of the cp, otherwise you need to program everything that is needed to emulate the modbus framing, sending, and receiving.
Is your CP341 will going to be a master or slave? RTU or ASCII?
Is your CP341 will going to be a master or slave? RTU or ASCII?
-
- Posts: 18
- Joined: Mon Mar 27, 2006 1:09 pm
- Location: Philippines
If you have the hardware dongle, then you paid to minimize your programming effort - actually its main purpose is for you to eliminate the pain of programming and computing the CRC in CP341.
But still you need to make a DB wherein the content is similar or the same as the modbus framing without the CRC bytes and then attach it to the SEND FB.
As for the receiving FB,
just fill out the DB number where you want the data to be stored.
I can't exactly remember the procedure but those are the basic steps you need to do.
I have done MODBUS-RTU masters with CP341 before but I did not use any dongle,
if you want you can send me a PM - I may still have the library for that.
But still you need to make a DB wherein the content is similar or the same as the modbus framing without the CRC bytes and then attach it to the SEND FB.
As for the receiving FB,
just fill out the DB number where you want the data to be stored.
I can't exactly remember the procedure but those are the basic steps you need to do.
I have done MODBUS-RTU masters with CP341 before but I did not use any dongle,
if you want you can send me a PM - I may still have the library for that.