ci853 modbus communication, mbread status -5 or -30
Status Code and their Description:
-5 cErrTypeMismatch - The type of one or more variables does not match the requirements of the procedure.
-30 cErrInvalidPar - Invalid parameter was specified, for example, an invalid character has been used (a source name may not contains spaces).
Please send a screen shot of your read blocks.
As the others said, it is important to see which parameters you set for StartAddr and Rd parameters.
For reading of bit status you can try with two functions: FC1 (Read Coil Status) and FC2 (Read Input) Status = %QX and =%IX. Try first with single bool reading and both of them. Also, address 10001 could be %QX10#0 or %QX10#1 (or other, depending of the protocol). Rd variable in this case have to be BOOL format. If reading of bits is not possible, try to read the bits as register (below) and then "unpack" them to bits.
For reading of registers, you can use %MW, %IW and also %QW in some cases. Again, first address could be %MW10#0 or %MW10#1 depending of the protocol. Start again with single variable read (seek for the right address).
In all the cases, when read registers (word), the Rd variable have to be in INT or DINT format, WORD format is not accepted. Using of other variable than INT/DINT could cause -30 error.
Please note: in order to validate changes in MBRead parameters, you need to deactivate the MBConnect block (En_C parameter) for a while and then activate it again.
Read Control Builder help for MBRead block.
Source: Control Builder Help