Hello. 1
In this video we are going to learn FLT and INT instructions. 2
I will create a new project in the program area. 3
I will create a new program and program name will be like this in the ladder diagram. 4
We will learn how to convert integer values to floating values LD M25 and I will say flt D0 to 5
D5 and go online to PLC and I will do a download. 6
These instruction to PLC and I will say OK and transfer this code to PLC object code is transferring 7
now to the plc and communication error say transfer again and it's trying to do a download 8
it's finished now I will go online and my CPU is top situation I will say yes now D0 is 0. 9
So we will change a value to floating value and let's change 5 to FLT I will say Okay now D0 is 10
5 M25 will be active and then you cannot see anything in D5 why because in the 11
view section We need to say float so as float you can see D0 was 5 and the output is 5,000 or 12
I will say 7 and you can see it is now 7,000 and then let us expand our example a little 13
bit go on line edit , in the online edit I will say LD M5 and 14
FMUL -> DMUL 15
This is floating multiplication. 16
You can remember in the previous lessons and then D5 and D10 and D20 17
That's okay. 18
And then what will we do. 19
We will change d20 value to integer and LD M10 and integer D20 to D30 then update our program 20
line. 21
And this is sending to plc, OK an update is completed and then I will change to value of D10 22
to for example 5,35 floating point. 23
We need to use comma like this then that's OK. 24
So 7,000. 25
Multiply by 5,350 26
Let's check the result and M5 is activated and the result is 37,450. 27
And then what will happen if I want to fix this value if I want to change this value to this floating 28
value to integer value M10 set on. 29
Then we will see D30. 30
What will happen. 31
Just go. 32
View. 33
Area. 34
And in here automatically. 35
And then you can see D30 now = 37 36
What was it before. 37
Let's take a look once floating as floating it was 37,450 38
I will increase this value to for example 2,789 39
And the result is you can see it 19,523 and what is the result now. 40
Section automatically and it equals to nineteen. 41
So what is happening. 42
It is taking just the integer value from here after comma it is deleting completely so we can't change 43
our values to floating with the FLT command or FLT instruction we can do our multiplications 44
and everything in here with DEDIV/DEMUL/DESUB/DEADD as floating point math instructions 45
and then we can fix our values with the integer or INT instruction this is how can we use floating 46
or FLT and INT instructions in the Delta plc so I am finished for this video see you 47
in the next video.