MODBUS Communications Driver - Functions
IOMapping: Control I/O Mapping
short status = MB GetIOMapping(short *flag); short status = MB SetIOMapping(short flag); _ _
Normally, the MODBUS Driver DLL "maps" the Register and Coil addresses that you pass to conform to the Protocol's specifications. For example, if you refer to Holding Register 40127, the actual binary address transmitted by MBDRV will be 136, as defined by the Protocol.
However, if you are not working with Gould equipment, or if you need to control the actual transmitted addresses, you can disable address mapping with this command.
A d d r e s s M a p p i n g i s e n a b l e d b y d e f a u l t . T o d i s a b l e A d d r e s s M a p p i n g , c a l l M B _ S e t I O M a p p i n with flag equal to 0. Any nonzero value enables mapping. g
Note. When I/O Mapping is on, the Driver DLL enforces proper register ranges for all commands. For example, any command that takes an Input Register address for an argument will return an error if the supplied address is not between 30001 and 39999.
// Turn off I/O Mapping
June 6, 1998