0
1
00:00:21,440 --> 00:00:22,020
Hello.
1

2
00:00:22,050 --> 00:00:27,820
In this video we are going to learn FLT and INT instructions.
2

3
00:00:28,110 --> 00:00:33,230
I will create a new project in the program area.
3

4
00:00:33,230 --> 00:00:39,170
I will create a new program and program name will be like this in the ladder diagram.
4

5
00:00:39,350 --> 00:00:50,960
We will learn how to convert integer values to floating values LD M25 and I will say flt D0 to
5

6
00:00:51,200 --> 00:00:57,800
D5 and go online to PLC and I will do a download.
6

7
00:00:57,800 --> 00:01:10,400
These instruction to PLC and I will say OK and transfer this code to PLC object code is transferring
7

8
00:01:10,520 --> 00:01:19,310
now to the plc and communication error say transfer again and it's trying to do a download
8

9
00:01:22,800 --> 00:01:34,800
it's finished now I will go online and my CPU is top situation I will say yes now D0 is 0.
9

10
00:01:34,950 --> 00:01:45,990
So we will change a value to floating value and let's change 5 to FLT I will say Okay now D0 is
10

11
00:01:46,140 --> 00:01:54,960
5 M25 will be active and then you cannot see anything in D5 why because in the
11

12
00:01:55,000 --> 00:02:08,490
view section We need to say float so as float you can see D0 was  5 and the output is 5,000 or
12

13
00:02:08,580 --> 00:02:20,580
I will say 7 and you can see it is now 7,000 and then let us expand our example a little
13

14
00:02:20,580 --> 00:02:29,880
bit go on line edit , in the online edit I will say LD M5 and
14

15
00:02:32,420 --> 00:02:34,490
FMUL -> DMUL
15

16
00:02:34,500 --> 00:02:37,500
This is floating multiplication.
16

17
00:02:37,620 --> 00:02:45,800
You can remember in the previous lessons and then D5 and D10 and D20
17

18
00:02:45,810 --> 00:02:46,800
That's okay.
18

19
00:02:46,800 --> 00:02:49,090
And then what will we do.
19

20
00:02:49,140 --> 00:03:04,550
We will change d20 value to integer and LD M10 and integer D20 to D30 then update our program
20

21
00:03:04,550 --> 00:03:05,420
line.
21

22
00:03:05,420 --> 00:03:17,090
And this is sending to plc, OK an update is completed and then I will change to value of D10
22

23
00:03:17,450 --> 00:03:26,920
to for example 5,35 floating point.
23

24
00:03:26,930 --> 00:03:31,330
We need to use comma like this then that's OK.
24

25
00:03:31,340 --> 00:03:34,930
So 7,000.
25

26
00:03:34,940 --> 00:03:39,200
Multiply by 5,350
26

27
00:03:39,680 --> 00:03:47,900
Let's check the result and M5 is activated and the result is 37,450.
27

28
00:03:48,410 --> 00:03:55,520
And then what will happen if I want to fix this value if I want to change this value to this floating
28

29
00:03:55,520 --> 00:04:00,170
value to integer value M10 set on.
29

30
00:04:00,170 --> 00:04:03,630
Then we will see D30.
30

31
00:04:03,680 --> 00:04:04,700
What will happen.
31

32
00:04:04,700 --> 00:04:05,440
Just go.
32

33
00:04:05,450 --> 00:04:05,830
View.
33

34
00:04:05,830 --> 00:04:06,530
Area.
34

35
00:04:06,670 --> 00:04:08,660
And in here automatically.
35

36
00:04:08,750 --> 00:04:13,070
And then you can see D30 now = 37
36

37
00:04:13,070 --> 00:04:14,860
What was it before.
37

38
00:04:14,870 --> 00:04:22,310
Let's take a look once floating as floating  it was 37,450
38

39
00:04:22,430 --> 00:04:31,880
I will increase this value to for example 2,789
39

40
00:04:31,880 --> 00:04:40,610
And the result is you can see it 19,523 and what is the result now.
40

41
00:04:40,770 --> 00:04:46,010
Section automatically and it equals to nineteen.
41

42
00:04:46,190 --> 00:04:48,470
So what is happening.
42

43
00:04:48,470 --> 00:04:59,450
It is taking just the integer value from here after comma it is deleting completely so we can't change
43

44
00:04:59,600 --> 00:05:07,880
our values to floating with the FLT  command or FLT instruction we can do our multiplications
44

45
00:05:07,940 --> 00:05:17,900
and everything in here with DEDIV/DEMUL/DESUB/DEADD as floating point math instructions
45

46
00:05:18,170 --> 00:05:27,290
and then we can fix our values with the integer or INT instruction this is how can we use floating
46

47
00:05:27,320 --> 00:05:36,770
 or FLT and INT instructions in the Delta plc so I am finished for this video see you
47

48
00:05:36,980 --> 00:05:37,880
in the next video.
