Short description
This function converts integers to floats, and store them in VM.
LOGO! only deal with integers. If you transfer some float from outer system by network with S7/Modbus protocol, LOGO! cannot deal with it directly. With this SFB, LOGO! can output floating numbers. This SFB converts integers to floating numbers by multiplying a resolution into the floating number. You need to set a suitable resolution for the input integers in the parameter tab.
|
Connection |
Description |
|---|---|
|
Analog input Ax |
Input Ax is one of the following analog signals:
|
|
Extended analog input eAx |
If the analog input (Ax) is not available, you can assign a value to Extended analog input (eAQ) by inputting a value to the eAx field or referring to other FB's parameter. Range of values: -999,999,999 to 999,999,999 |
|
Parameter Par |
|
|
Output AQ |
AQ is the analog output value. It has the following features.
|
|
Extended analog output eAQ |
Extended analog output for programming through parameter reference.
|
|
* AI1 to AI8: 0 to 10 V corresponds with 0 to 1000 (internal value). |
|
Parameter
In addition to the function block inputs, the following settings provide additional control over the integer to float converter:
Data Output: The output of Integer/Float is stored in VM. You can chose the output type as float or double and the start VM address where the converted float stores.
Type: You can chose the output data as Float or Double.
VM Address: You can specify the start VM address where the output float stores.
Size: The input float occupies 4 bytes while double occupies 8 bytes.
Range: Float (0-847), Double (0-843).
Resolution: You can set the dividend for the input integer.
Range: 0.001-1000
Precision: 1/1000
Extended Analog Input: You can also set the input value here. If you don't connect the input pin In, the SFB uses the value set here as its input. It can also be used as reference for other parameter value, such as counter value.
Range: -999,999,999 ~ 999,999,999
Description of the function
You usually need both the blocks Float/Integer converter and Integer/Float converter to complete a task. A typical way to use these function blocks is:
Transfer the floats from outer system by network (with S7/Modbus protocol) and store them in VM.
Convert the floats stored in VM to integer by Float/Integer converter.
Process the integer with LOGO! BM.
Convert the result to floats by Integer/Float and store them in the VM.
Transfer the floats to outer system(with S7/Modbus protocol).
Calculation rule
Float Value in VM address
Float Value in VM address = Analog input x Resolution
Analog output (AQ)
Analog input connector is connected: Analog output = Analog input
Analog input connector isn’t connected:
if -32768 ≤ Extended analog input ≤ 32767, the Analog output = Extended analog input.
if the Analog input ≥ 32767, then Analog output = 32767.
if the Analog input ≤ -32768, then Analog output = -32768.
Extended analog output (eAQ):
If the analog input connector is connected: Extended analog input = analog input.
Extended analog input connector isn’t connected:
if -999,999,999 ≤ Extended analog input ≤ 999,999,999, the Extended Analog Output = Extended analog input.
if the Extended analog input ≥ 999,999,999, then Extended analog output = 999,999,999.
if the Extended analog input ≤ -999,999,999, then Extended analog output = -999,999,999.