Modbus and shared variable

Hi everybody,

I’m using modbus for the first time with my cpu and I have a doubt.

My cpu is a modbus slave, I defined input registers where I mapped different variables and they are readable via modbus, everything is good.

I now need a “shared” variable, i.e. one value that can be read and write by both the cpu and the modbus remote server. I don’t understand if that’s possible or not, because if I map a variable to a holding register, the server is able to Read and Write, but my cpu is only able to Read it.

Is this normal?

Thanks

The dynamic channels option can’t be used as “shared” variables, you need to use the “Fixed buffer size” option to handle “shared” variables.

Automation Help: Modbus fixed buffer size

1 Like

ah ok I see. but in that case I can’t simply map variables from automation studio right?

You can’t map variables directly to the channels… but the channels themselves are already PLC variables.

ok i will look into it. thanks!