OPC - recording issue

juzeko

Member
Join Date
Jun 2008
Location
Vrbovec
Posts
47
Hello!

I have a problem regarding OPC server.

In Matlab I need to draw a reference that my program is sending on the analog outputs of PLC.

I tried to use OPC server "KEPServerEx" and of course, Matlab OPC Toolbox and I successfully established a connection, but problem is that I can't get quality picture.

I set KEPServerEx to update active clients every 20 ms and scan rate of every variable is 20 ms.

In Matlab OPC Toolbox I set update rate to 20 ms and number of record to log to 3000 (for duration of recording 60 s), but when I start my program and recording it for 50 seconds, instead of 2000-3000 records, I'm getting only 50-60 records every time, so my picture is very bad (because the variables on the PLC outputs are changeing every 20 ms and I'm getting approximately one record per second)

What should I do?
I'm using SIMATIC S7-300 PLC
 
I'm using MPI.

So, is that the best I can get?

If yes, is there any other way to plot a reference in Matlab with 20 ms?
 
1st. With MPI (at 187.5k I guess) you cannot expect fast transfers. At all.

2nd. I think that OPC has a problem in general when the update speed nears the typical Windows task slice time (=10 ms).

I think you need a CPU with Profinet, a hardnet CP (CP1616) and then setup a Profinet connection. I would contact Siemens and ask them if an OPC update time of 20 ms can be achieved. I think that there may be a general Windows problem, but they have the experts to confirm or deny this.
 
In OPc the only update rate you need to worry about is the rate that is set in the OPC client. It is what contorls the way that the OPC server will request data.

That said with device communiciatons you have to consider the wire time it takes to transfer the data, at 187.5kbaud you can expect a wire time of around 18 bytes per msec. the protocol limits the maximum packet size 0f 218 bytes, this does not include packet header and footer. So assuming that the server is able to request data from contiguous registers to maximize performance the wire time for a single request is estimated at best to be 20msec for the request response. Wire time for the request is around 1-2 msec. The last thing to consider is the device turnaround time which is the ammount of time it takes the device to process the request and send it back. This rate will be variable.

OK the bottom line is that you cannot expect to get that response. Even with profinet or some other ethernet interface you will still have to deal with device time and packet limitations.

OK, now for KepserverEx the way that we handle request for data that cannot be accomplished at the rate that the client is requestin it is that go into a continuous poll mode where we send the next request as soon as we get a response to the previous one. It is the best that can be done when dealing with the limitiations of communicaitons protocols and band widths.

So, how to we have customers over come these limitations test lab environments. Usually, they will have the PLC's process the test results and store then into register arrays or in the case of Siemens devices Data Blocks. They then poll these datablocks after the test is completed.

Hopefully this answers all you questions.
 
MATLAB to PLC OPC

Could you give me details of the OPC setup from MATLAB to PLC?
I need to establish communications MATLAB - PLC - RSView

Thanks
 

Similar Topics

I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
5
Views
266
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
226
If anyone has a crack for IBH OPC Server, please send it to: [email protected] Urgently. Thanks in advance!
Replies
1
Views
136
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
1
Views
190
Hi good day Everyone, I have a cimplicity v10 project with 7 to 8k tags communicating with AB PLC through OPC and Rslinx classic. I have this...
Replies
3
Views
226
Back
Top Bottom