11/5/2009 3:09 PM | |
Posts: 3609 Rating: (29) |
Import of a Technical Question of an User Lex wrote: Dear Experts, Please to help me about CP341 Modbus Slave function, i used the Modbus Slave on CP341 for support Modbus register 402001 - 402080 but have error exception happen, But when i used modbus scan tools read 402001 amount 10 register is work, But when i try to get 402001 amout 30 or gather but not work (Error Exception from Modbus Slave) Please to advice i you have solution about CP341 on MBSlave function. Regards, |
11/6/2009 10:11 AM | |
Posts: 382 Rating: (47) |
Hi, AttachmentTo Lex.zip (315 Downloads) |
Last edited by: how come at: 11/6/2009 10:16 AM |
|
This contribution was helpful to2 thankful Users |
11/7/2009 6:18 PM | |
Posts: 19 Rating: (0) |
Hi, How come. O.K. how come ,And this a PRG for Modbus Slave, Please to advice. And to explain my problem, to observe when i try to get the Modbus data from 400001 to 400100 amount(100 registers) not found the problem everything is O.K. But when i get the 402001 amout gather 20 registers is have error exception.. Please to advice. Lex. AttachmentMBSlave.zip (295 Downloads) |
11/9/2009 4:42 AM | |
Posts: 382 Rating: (47) |
Hi Lex, So sorry that I havn't test your program at the moment as I am not in office [now onsite commissioning]. I have open your program. I notice that your slave protocol setup for FC3,06,16 & FC04 set as DB1. But in your program there is not DB1? I would like to know your 400001 to 400100 amount(100 registers) is from which DB in your program? Is it DB42? And the next 20 registers (402001) also from DB42? Let me try my best to explain first. For example, DB42 is the data block that is ready for the modbus master to read from the slave and the master is using Function Code 03. Thus in your protocol setup under the tab FC03,06,16 should set to DB42. For example, DB43 is the data block that is for the modbus master to write to the slave and the master is using Function Code 04. Thus in your protocol setup under the tab FC04 should set to DB43. I have also attach a modbus scan software which i used to test my program. I hope this can give you some help first. with regards, how come AttachmentInstaller_CAS Modbus Scanner.zip (318 Downloads) |
11/11/2009 4:02 AM | |
Posts: 382 Rating: (47) |
Hi Lex, I will send you a sample program later. Hope this helps! AttachmentTo Lex1.zip (241 Downloads) |
11/11/2009 4:58 AM | |
Posts: 382 Rating: (47) |
Hi Lex, Here is the sample program. Infact this example also can be obtained from step7 under sample projects. I have modified it simliarto your case. Fill in thevalues in DB1 that you wish for themasterto read. Download to your PLC. Put aside all other logic function and just test this program alone with the modbus scan tools that i had sent you previously. If this work as what you want, then you implement/integrate the blocks to your existing program. Frankly speaking i have not testedmyself as ihave no chance to go back office yet stillout field commissioning my project.The sample from siemens should work with just slight modification to your CPU type. I don't think the CPU will result the program not working. good luck! with regards, how come AttachmentMBSLave Sample.zip (300 Downloads) |
Follow us on