AKD BASIC User Guide | 6 AKD BASIC Parameters, Operators, Statements
6.22.1 MODBUS.READFLOAT
General Information
Type R/W
Description
This function reads a floating-point value from the spec-
ified ModBus slave and returns the value read.
Units TBD
Range TBD
Default
Value
TBD
Data Type Float
Start Ver-
sion
TBD
Description
This function reads a floating-point value from the specified ModBus slave and returns the
value read. If any error occurs, this function returns zero and sets MODBUS.ERR to indicate
the source of the error. The register address passed to this function is the first register address
of the 32 bit floating point value.
This is a ModBus master function. Set RuntimeProtocol to 3 before using this function or a run-
time error is received. ModBus master statements and functions cannot be nested. If you get
an interrupt while waiting for a response to a ModBus master statement or function, you cannot
initiate another ModBus master statement or function in the interrupt handler. If you do, you get
runtime error 36.
There is not complete standardization on the format of floating-point numbers among all Mod-
Bus devices. You may need to set MODBUS.FLOATWORDORDER to 0 (its default value is
1) in order to properly receive floating point numbers from a ModBus slave. Refer to Using an
AKD BASIC as a ModBus Master.
Related Topics
MODBUS.READ16 | MODBUS.READ32
Kollmorgenâ„¢ | March 30, 2012 336