Access strategy variables using Modbus


Hello Forum,
I have a Data Recorder that is connected to my Opto22 device (I am using an R1 series) via Modbus.
The recorder needs to record about 30 different parameters. Half of these parameters are I/O points which are easy to get via Modbus. However, I am having a hard time accessing the other half of the parameters; these are integer and float strategy variables. Therefore, they are not readily accessible via Modbus. I understand that the scratch pad is accessible, but how do I get a “Live” copy of my parameters moved to the scratch pad? Also, how do I access scratchpad variables via Modbus ? is it the same as the I/O points ?
BTW the Opto device is the slave and the data recorder is the master.



Hi Royal,

In your strategy, you’ll use the “I/O Unit - Scratch Pad” commands to move your tags to/from the scratch pad.

Then it’s just a matter of getting the right Modbus address for your Data Recorder to use. Check out this post, which is similar to what you’re doing:

I hope that helps!



Thanks OptoMary,
Do you know of any documentation, or better yet, an example of how to write a variable to the scratch pad ?



Never mind that was much easier than I thought