Short description
This function converts integers to floats, and store them in VM.
LOGO! 0BA8 and previous versions devices 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 (integer or float):
|
|
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.
|
|
1 If the data type of Ax is integer and the data type of this FB is configured as float, LSC will convert Ax into 32-bit receivable float data. 2 If the data type of Ax is float and the data type of this FB is configured as integer, LSC will cut off the decimal numbers of Ax and convert it into 16-bit receivable integer data. 3 AI1 to AI16: 0 to 10 V corresponds with 0 to 1000, 0 to 4095 or 0 to 10000. 4 AI1 to AI8: 0 to 10 V corresponds with 0 to 1000 (internal value). |
|
Extended analog input eAx
The eAx value can be provided by another already-programmed function:
Analog comparator: Ax - Ay
Analog threshold trigger: Ax
Analog amplifier: Ax
Analog multiplexer: Aq
Analog ramp: Aq
Mathematic instruction: Aq
PI controller: Aq
Up/Down counter: Cnt
For the 0BA7 and later version devices, you can additionally use the actual values of the following already-programmed functions:
On-delay: Ta
Off-delay: Ta
On-/off-delay: Ta
Retentive on-delay: Ta
Wiping relay(pulse output): Ta
Edge triggered wiping relay: Ta
Asynchronous pulse generator: Ta
Stairway light switch: Ta
Multiple function switch: Ta
Stopwatch: Aq
Analog filter: Aq
Average value: Aq
Max/Min: Aq
Threshold trigger: Fre
For the 0BA8 and later version devices, you can additionally use the actual values of the following already-programmed functions:
Float/Integer converter: eAq
Integer/Float converter: eAq
For the LOGO! 9 and later version devices, you can additionally use the actual values of the following already-programmed functions:
Float calculation instruction: Aq
You select the required function by the block number.
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.