Jump to content



Photo
- - - - -

Modbus speed for 13 slaves

  • Please log in to reply
6 replies to this topic

#1 lchamarthi

lchamarthi

    Sparky

  • MrPLC Member
  • PipPipPip
  • 155 posts
  • Location:India
  • Interests:Automation in Omron, Reading and listening to Music
  • Country:India
    India

Posted 18 November 2009 - 04:10 AM

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?

#2 lostcontrol

lostcontrol

    Sparky

  • MrPLC Member
  • PipPipPip
  • 426 posts
  • Country:New Zealand
    New Zealand

Posted 18 November 2009 - 11:28 AM

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?


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?

#3 lchamarthi

lchamarthi

    Sparky

  • MrPLC Member
  • PipPipPip
  • 155 posts
  • Location:India
  • Interests:Automation in Omron, Reading and listening to Music
  • Country:India
    India

Posted 18 November 2009 - 09:42 PM

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?


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?


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....

Attached Files


Edited by lchamarthi, 19 November 2009 - 07:13 AM.


#4 lostcontrol

lostcontrol

    Sparky

  • MrPLC Member
  • PipPipPip
  • 426 posts
  • Country:New Zealand
    New Zealand

Posted 19 November 2009 - 01:02 PM

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, 19 November 2009 - 01:04 PM.


#5 lchamarthi

lchamarthi

    Sparky

  • MrPLC Member
  • PipPipPip
  • 155 posts
  • Location:India
  • Interests:Automation in Omron, Reading and listening to Music
  • Country:India
    India

Posted 01 December 2009 - 03:29 AM

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..


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.

Attached Files


Edited by lchamarthi, 01 December 2009 - 03:43 AM.


#6 lostcontrol

lostcontrol

    Sparky

  • MrPLC Member
  • PipPipPip
  • 426 posts
  • Country:New Zealand
    New Zealand

Posted 02 December 2009 - 05:54 AM

The slave is a embedded card, which is connected to field IO rather than to Omron IO card. so over modbus


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?

#7 PMCR

PMCR

    Expert

  • MrPLC Admin
  • 605 posts
  • Gender:Male
  • Location:Pennsylvania
  • Country:United States
    United States

Posted 03 December 2009 - 06:15 PM

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....mp;showfile=822

Also, do some Traces in CX Protocol to make sure there are no problems there.
PMCR data trace instructions attached.

Attached File  PMCR_Data_Trace.pdf   222.06KB   300 downloads




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users