Sign in to follow this  
Followers 0
lchamarthi

Modbus speed for 13 slaves

7 posts in this topic

Hi, I am using Modbus PMCR Instruction to communicate with 13 slaves. Each PMCR is having 50bytes of data transfer (Receive+send using Function code 17). I have kept all times in protocol macro as minimum as possible 0.1ms each and maintaining 38.4K baudrate. Whether this baudrate would be OK to transfer without any problem and how will come to correct times to set in macro? Another question is now with a counter I am polling 13. To send a data to any perticular selected slave is taking 2sec time. I am thinking to reduce this time. How could i improve? My aim is to make 0.5sec and whether is possible? somebody could help me?

Share this post


Link to post
Share on other sites
Reduce the poll size, and split the read/write functions up, ie. don't use function 17. Then look at only writing to the slave when the data required to be written data has changed, this will reduce the cycle time a bit. Have you looked at PMCR's modbus example's in the downloads section, this should help to get you underway with the write on COS. Another question, why so many bytes? What are the slaves?

Share this post


Link to post
Share on other sites
The slave is a embedded card, which is connected to field IO rather than to Omron IO card. so over modbus, i am reading & writing status of inputs and outputs. Such i have 15 cards to communicate. Earlier i made read and write separately (13 for read + 13 for write) with 26 counter which was taking more time nealry 3sec. But i was continiously polling with that also and I don't know how to write only when data is changed. So later i changed to 17 code to reduce the poll size. I am also attaching the ladder code. could you tell me how would i do that. Could you please guide me.... CJ1M_PMCR_JCH.cxp Edited by lchamarthi

Share this post


Link to post
Share on other sites
Can you post your original program that had separate read/writes? It will be easier to modify that for COS write, as opposed to the one you have attached. Also, post the CX-Protocol file, there may be something that can be done in that as well.. Edited by lostcontrol

Share this post


Link to post
Share on other sites
Please find my original code for separate read and write using Function code 8 and 4 in second section. Also find Read& write in one PMCR using F17 in first section and both in same cxp file. Also the protocols i have attached for F17 and read ,write separately. It will be a great help if you could reply me as soon as possible. CJ1M_PMCR_JCH.cxp Modbusprotocol.rar Edited by lchamarthi

Share this post


Link to post
Share on other sites
What is this embedded I/O card? In all reality, I would be surprised if you would get much faster than 1.5 sec for all 13 slaves, if that is what you are getting now? If more deterministic updates are required, then it may be worth seriously looking at another solution, such as devicenet/ethernet/componet etc. Typically modbus serial for that many slaves, I would expect at least 1-2 sec's, depending on the slave device. Has the manufacturer of this embedded card achieved faster updates than what you are achieving with the same amount of slaves? If not, then I doubt that you will be able to do much better. Sure, we can look at the protocols and send on demand, but if all 13 are required to be written at the same time, we are back to the beginning, how will this affect your process?

Share this post


Link to post
Share on other sites
To determine the actual time per device, I think you will need to do a data trace, so we can see what is going on. Trace A202.00, 1634.15, W10.00 (assuming node 1 is active). Tell me what your scan time is for the PLC. Do the data trace with a resolution of every scan, save the file, attach. Do the data trace with a resolution of 10 ms, save the file, attach. Trigger on the trailing edge of A202.00. Data Trace in structions are here if you have not used it. http://forums.mrplc.com/index.php?autocom=...mp;showfile=822 Also, do some Traces in CX Protocol to make sure there are no problems there. PMCR data trace instructions attached. PMCR_Data_Trace.pdf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0