You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 8th, 2019, 02:29 AM   #1
naturephoenix
Member
Austria

naturephoenix is offline
 
Join Date: Jan 2015
Location: Vienn
Posts: 162
Sampling speed to S7400 in Service Lab

Hello guys,

I have S7400 and network inside is Profibus DP and MPI with it is speed 187.5kbs. I am connecting with service lab to record data from PLC with CP5711 adapter choosing MPI in SetPG/PC. Inside Service Lab I have option to choose sampling time. What is maximum sampling time I can choose in this network configuration. There are 3 more device with Profibus DP in this network as well
  Reply With Quote
Old June 9th, 2019, 03:35 AM   #2
cardosocea
Member
United Kingdom

cardosocea is offline
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 1,427
In my experience, you can use whatever sampling rate you want that ServiceLab will do its best to achieve it, but without actually stopping your network to do so.
  Reply With Quote
Old June 9th, 2019, 05:37 AM   #3
naturephoenix
Member
Austria

naturephoenix is offline
 
Join Date: Jan 2015
Location: Vienn
Posts: 162
Quote:
Originally Posted by cardosocea View Post
In my experience, you can use whatever sampling rate you want that ServiceLab will do its best to achieve it, but without actually stopping your network to do so.
I know, but there must be some logical sample rate which you can expect regarding network settings. Problem is to determine relation between kbps and kHz

Last edited by naturephoenix; June 9th, 2019 at 05:58 AM.
  Reply With Quote
Old June 10th, 2019, 09:11 AM   #4
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 2,182
Quote:
Originally Posted by naturephoenix View Post
I know, but there must be some logical sample rate which you can expect regarding network settings. Problem is to determine relation between kbps and kHz

kbps = kilobits per second or 1024 bits per second


kHz = logging 1000x per second


In simple terms, if the all the bandwidth available is used for logging, at 1 kbps you could: log 1 bit at 1 kHz, or 2 bits at .5kHz (500Hz), or 16 bits/1 Word at 62.5Hz (.0625 kHz).

In reality, it is much more complicated than that. There is network overhead, PLC performance, etc. MPI is also a shared medium, which means that the bandwidth is at most 50% of what is described above.

For the network overhead, there is a fixed amount of data that is required to send the request, but then after that it scales linearly (each request adds about the same amount of data). In Ethernet, the minimum request is 64 bytes, even for just one tag. I'm not sure how that all plays out in MPI.

Realistically, you should probably start with logging at something like 1 Hz (not 1 kHz), and then see if you can push it to something like 2 or 5 Hz. The 400 is pretty good at handling comms, but MPI is SLOW.

Last edited by mk42; June 10th, 2019 at 09:14 AM.
  Reply With Quote
Old June 11th, 2019, 07:53 PM   #5
naturephoenix
Member
Austria

naturephoenix is offline
 
Join Date: Jan 2015
Location: Vienn
Posts: 162
Quote:
Originally Posted by mk42 View Post
kbps = kilobits per second or 1024 bits per second


kHz = logging 1000x per second


In simple terms, if the all the bandwidth available is used for logging, at 1 kbps you could: log 1 bit at 1 kHz, or 2 bits at .5kHz (500Hz), or 16 bits/1 Word at 62.5Hz (.0625 kHz).

In reality, it is much more complicated than that. There is network overhead, PLC performance, etc. MPI is also a shared medium, which means that the bandwidth is at most 50% of what is described above.

For the network overhead, there is a fixed amount of data that is required to send the request, but then after that it scales linearly (each request adds about the same amount of data). In Ethernet, the minimum request is 64 bytes, even for just one tag. I'm not sure how that all plays out in MPI.

Realistically, you should probably start with logging at something like 1 Hz (not 1 kHz), and then see if you can push it to something like 2 or 5 Hz. The 400 is pretty good at handling comms, but MPI is SLOW.
You, we're right! I got only 10Hz. (15 Reals). Point is when you calculate it can 187 bits at 1kHz. So that's around 6 Reals, 12 Reals 500Hz, 24 Reals at 250 Hz. If we take 50% bandwidth into account that would be 12 Reals at 250Hz. In reality it is 15 Reals at 10Hz. Difference between 250 and 10 Hz went to CPU performance and network overhead? I mean how did you know it is gonna be only around 5Hz
  Reply With Quote
Old June 12th, 2019, 03:40 PM   #6
Thomas_v2
Member
Germany

Thomas_v2 is offline
 
Join Date: Apr 2009
Location: Ger
Posts: 410
On top of MPI is the FDL layer and then on top the S7 protocol layer which I guess most drivers are using.

The S7 protocol overhead for polling 15 real values in worst case (15 values are not consecutive in memory or bad driver) is:

Request: 10 bytes header + 2 + 15 * 12 = 192 bytes
Response: 12 bytes header + 2 + 15 * (4 + 4) = 134 bytes
-> 326 bytes

Bbrutto (326) to netto (60) = 82% overhead only on S7 protocol.

If you place the 15 reals so they can be read in one block and the driver supports this, this can be reduced to:

Request: 10 bytes header + 2 + 12 = 24 bytes
Response: 12 bytes header + 2 + 4 + (15 * 4) = 78 bytes
-> 102 bytes

reduces it to 41% overhead.

The protocol and most CPUs support cyclic reading of a limited amount of variables, where you don't have to poll the variables (only one request needed).
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PID - what is it anyway? Ron Beaufort LIVE PLC Questions And Answers 21 November 25th, 2014 06:36 PM
Using a proximity switch to detect speed Beej LIVE PLC Questions And Answers 22 December 8th, 2011 04:21 AM
PID Loops for High Speed Centrifuge danbb6 LIVE PLC Questions And Answers 2 April 13th, 2003 07:16 AM
compumotor drive burning out drewcrew6 LIVE PLC Questions And Answers 18 July 22nd, 2002 06:46 AM
VFD speed control Alan Case LIVE PLC Questions And Answers 8 July 18th, 2002 03:09 PM


All times are GMT -5. The time now is 10:25 PM.


.