ScratchPad Refresh Rate OptoMMP

Hi All,

I have a code in SNAP PAC R1 which updates an Integer in Scratch Pad every 1 second.

It increments the integer.

Now i have a python OptoMMP code which reads the scratchpad every 1 second and prints the data. I am using python schedule which ensures accurate delay of 1 second between the Scratchpad reads.

Now ideally i should see the values incrementing every second but i see a variable refresh and i see new data once every 3-4 seconds…

I would like to understand where is the actual delay happening. Is it the time taken to update in scratchpad or anywhere else?

The same data is being read perfectly fine via SCADA using OPC

This thread talks about ~0.3 seconds response time for the REST interface and Python via MMP is significantly faster than that.

So lets page @torchard and see what he can suggest for troubleshooting your setup… While we wait, are you using hostnames or IP addresses - as per that issue in the linked forum post.

Are you just doing a data read, print, and delay inside the loop, or are other functions also being called?
Can you share the section of code you’re having trouble with?

There should not be even a single second of delay reading/writing scratchpad values, let alone 3-4, so there’s something else going on.
With that said, what hardware and OS are you using to run the script? Is it a groov EPIC / RIO, desktop computer, server, or something else?

Thanks a lot for the reply team. We found the issue and seems like some other process is running as well causing a slow down in the reading.

Its resolved now. Thanks a lot

2 Likes