Hi Yair,
There were a few things wrong in your code before that the guide above doesn’t make too clear.
in the example above, he’s calling a tag called “tag_40001@” not making a call to an individual modbus tag. I think in your example it was called Generator_3@ instead of it being tag_40009@.
Also with the parts underneath, those are all tags that would need to be created before you can write to them. So the error you were getting before was just that these tags didn’t exist.
Also in the BASIC code, it didn’t give any way to call this function, so I went into your init section and wrote:
tset 1,1
Ontimer 1, “Goto Modbus_Write”
the tset 1,1 makes timer 1 and has timer 1 go off every 1 second
Then when the timer goes off it triggers the ontimer function and goes to the Modbus_Write section I made.