Access strategy variables using Modbus


#1

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.

Thanks


#2

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!

-OptoMary


#3

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

Thanks


#4

Never mind that was much easier than I thought