Have the CR1000 configured as a Modbus slave.
I can read/write to holding register 40001 OK via Modbus-TCP, but not any other register like 40010, I get exception response 02 "illegal data address".
It is configured for Slave ID "1", and does not respond if I set it to some other value, so that part must be OK.
I am using function codes 3 (read) and 6 (write) and am trying to do just one register at a time.
Problem solved. The CR1000 manual does not explain about the next to the last parameter passed to the ModBusSlave function.
But the CRBasic Editor online help does.
So I was not allocating space for the registers before.