8/29/2010 5:11 PM | |
Posts: 112 Rating: (0) |
Dear Experts, I have faced one problem in cp341 modbus master.I have communicated 2 more Slave(UPSReading) its working well.As my logicfirst ups datas readings arestored inDB43 and secondUPSdata readings arestored in DB45. First UPSFunction code FC04 Second UPSFunction code FC02. I getting both UPS data reading.But watare the values i getting from first ups address DB43.DBW16 TO DB43.DBW50 clash to secondupsaddressDB45.DBW16 TODB45.DBW50 both values are same.and Here i with attached my programm backup and screen shot of address clash.. Kindly Gives ussolution.Im in bottle neck... Thanks in advance AttachmentADDRESS CLASH.zip (72 Downloads) |
8/29/2010 5:50 PM | |
Posts: 112 Rating: (0) |
Dear Dchartier, AttachmentModbus_test.zip (79 Downloads) |
8/29/2010 6:28 PM | |
Posts: 3093 Rating: (323) |
Hello Solution Riders, you should only change the destination for P_RCV_RK when NDR is set. Regards, Kaulquappe |
8/30/2010 7:58 AM | |
Joined: 10/7/2005 Last visit: 5/20/2024 Posts: 3005 Rating: (1048)
|
Hello Solution Riders I can see a few issues with your S7 program, such as: 1.) It does NOT contain FB7 & 8 which are called by FC21 & 23 2.) FC21 & 23 are called from OB1 as well as from FC100 3.) M135.6 is used in NW 7 as well as in NW 8 (i.e. NW 8 configuration will "win") 4.) You trigger a new Modbus request every 100ms via M127.0(clock memory byte from HWconfig is MB127) without regards to the previous Modbus requestbeing completed. Item 1-3 can bebe fixed up easily, item 4 requries a bit more consideration but is just a important to be fixed. Slightly different - yet similar in principle - to whatKaulquappe already advised, I would urge you to check the "DONE" bit from P_SND_RK (FB7) before starting a new request (you may want to check the error bit too to avoid getting "stuck" with your Multiplexer). As per Modbus Master manual(ref chapter 7), "Completion of the entire Modbus job can be recognized at output DONE of FB P_SND_RK". I hope this helps |
Cheers |
|
This contribution was helpful to1 thankful Users |
Follow us on