X hits on this document

77 views

0 shares

0 downloads

0 comments

25 / 37

MODBUS Communications Driver - Functions

IOMapping: Control I/O Mapping

SYNOPSIS

status

Error Return

Integer

flag

Flag

Integer

short status = MB GetIOMapping(short *flag); short status = MB SetIOMapping(short flag); _ _

DESCRIPTION

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.

EXAMPLE

MB SetIOMapping(0);

// Turn off I/O Mapping

_

Revision 2.210

June 6, 1998

Page 17

Document info
Document views77
Page views79
Page last viewedFri Oct 28 23:33:18 UTC 2016
Pages37
Paragraphs781
Words6172

Comments