2/21/2013 10:02 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Hi jagan.k, your CP340 does not support Modbus by native. For Modbus you require CP341 with Modbus license (loadable driver). You were saying that youalready have a backup of the software. Was that ever working before? You can also try myModbus RTU Master driver for CP340. If I find the blocks Iwill send you themlater. I used them in many projects and they are working like a charm. The driver issoftware based anddoes not requirethe need of CP341 orhardware dongle. Need to go now and come back later to you. . |
Give us your feedback and show us your respect! |
|
2/22/2013 3:29 PM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear jagan.k NEW DOWNLOAD SITE |
Last edited by: TIBI68 at: 7/5/2014 6:31 PMLINK ADDED Give us your feedback and show us your respect! |
|
This contribution was helpful to1 thankful Users |
2/25/2013 12:14 PM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear jagan.k, did you downloaded the file and tested it? If you have any difficulties contact me. I can give you a guideforimplementation and support for trouble shooting. |
Give us your feedback and show us your respect! |
|
2/26/2013 12:07 PM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear jagan.k , Your friend needs to check in the HW-Configthe correct type of CP module andthe interface parameter (Baud rate/Parity). The OB1 should containone network only and look like this: CALL "MBMAREQ" , "MBMAREQ NO.1" // MODBUS MASTER REQUEST FUNCTION BLOCK LINK :="LINK_340" // I-LINK WORD (CONNECT TO MBMA340 FUNCTION BLOCK!) RW :=FALSE // I-FUNCTION = READ SLAVE :=1 // I-SLAVE NUMBER START :=L#43001 // I-START ADDRESS (43001) END :=L#43001 // I-END ADDRESS (43001) WRMODE:=FALSE // I-WRITE MODE = AUTO S7ADDR:="MBDB READ OUTPUT REGS".DATA_BYTE[0] // I-S7 ADDRESS FORMAT:=0 // I-NONE DONE :="DONE_340" // Q-DONE ERROR :="ERROR_340" // Q-ERROR STATUS:="STATUS_340" // Q-STATUS WORD At the S7ADDR you specify the first byte in theSIMATIC where the 43001 data will be stored. In this case the data will be stored at DB13 from Data byte 0 (DB13.DBB0). Modbus address 43001 (2 bytes) will be stored into DB13.DBB0 + DB13.DBB1. If you need to swap between the high and the low byte just set"FORMAT:=1". |
Give us your feedback and show us your respect! |
|
2/27/2013 10:01 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear jagan.k, Regarding HW-Config: Open the HW-Config Replace theCP model withyouractual one if required. Double click on the CP to open its Properties. Click on the Parameter taband a pop up window will open. Set the Protocol to ASCII and click on the "Protocol envelope" in the middle of the screen. Thereyouset yourinterface parameters accordingly. Register 43001 to 43350 You cannot read "350" 16Bit-Registers with one modbus request, you need to distibute the number of registers to more individual modbus requests with different "START" and "END".But fora first shottry toreadthis 43001register only. Trouble shooting will be easier later on. |
Give us your feedback and show us your respect! |
|
3/3/2013 6:41 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Great jagan.k , I am happy for you guys. You just saved another CP and a Modbus license! |
Give us your feedback and show us your respect! |
|
This contribution was helpful to1 thankful Users |
7/12/2013 8:52 AM | |
Joined: 4/24/2009 Last visit: 2/19/2024 Posts: 2683 Rating: (135) |
Follow-up-question splitted to communicate with a Masibus Temparature Scanner (85xx series, communication protocall RS 485) Best regards O_Moderator |
8/22/2013 11:38 AM | |
Joined: 4/24/2009 Last visit: 2/19/2024 Posts: 2683 Rating: (135) |
New question was splitted to connect honeywell DCS with CP340 on modbus protocol & to get the data of cpu 313c-2dp. Best regards O_Moderator |
12/16/2013 3:29 PM | |
Joined: 9/1/2005 Last visit: 3/5/2024 Posts: 4097 Rating: (193) |
follow up question published byMahesh Nis split to a seperate thread with the subject CP340 MODBUS RTU-Communication - Questions to a specific solution Best regards CS Moderator |
My Forum is the place to personalize your profile, |
|
12/25/2013 11:24 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear LKMNVRS, PTP stands for Point-to-Point and isa type of connection betweenthe CP and one field device.In order to connect to more than one fielddevices you need to use a multi-drop type connection. That's a kind of a networkconnection. MODBUS RTU is a protocol, you can simply see it as a"language" the devices can talk/communicate with each other. Soyou need to know about the physical interface on your VMS and the supported protocol(s). These Informationneed to match with theCP340 in order to establish the communication. The CP340 supports the below protocols: - 3964(R) - ASCII - Printer driver Modbus is nativly not supported by the CP340 but I have developed a software driver for it. That driver doessupportthe MODBUS MASTER RTU standard protocol and can be downloaded in this thread from one of myprevious posts (MBMA340.ZIP). Merry X-Mas to you and everybody. Best Regards. |
Last edited by: TIBI68 at: 12/25/2013 11:25 AMGive us your feedback and show us your respect! |
|
12/26/2013 7:12 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear LKMNVRS, if your devices will act as aModbus RTU slave, yes my software will work. Just for clarification, the driver does not support Modbus ASCII (that's a different thing), only Modbus RTU. It uses the ASCII frame fortransmission, don't get confused. Best Regards. |
Give us your feedback and show us your respect! |
|
12/27/2013 8:15 AM | |
Joined: 12/1/2009 Last visit: 3/31/2024 Posts: 672 Rating: (147) |
Dear LKMNVRS , you are doing fine, you just need to call the MBMAREQ block with different slave address number. The LINK is the connection between the MBMAREQ and the MBMA340 block. So in your case you need to keep it the same. I would first connect one slave to the CP only and try to read one available register, Troubleshooting is a lot easier this way. Make sure the communication parameters match with all devices. If it's still not working, check the cableing. Good Luck! Best Regards. |
Last edited by: TIBI68 at: 12/27/2013 8:18 AMGive us your feedback and show us your respect! |
|
Follow us on