0
1
00:00:21,510 --> 00:00:22,080
Hello.
1

2
00:00:22,110 --> 00:00:30,570
In this video we are going to learn WSFR or WSFL shifting data instruction in the previous educations
2

3
00:00:30,600 --> 00:00:39,210
we learned SFTR we shifted bits  but these instructions is going to help us to shift datas 
3

4
00:00:39,240 --> 00:00:42,850
WSFR means right and WSFL left.
4

5
00:00:42,870 --> 00:00:44,190
You already learned it.
5

6
00:00:44,340 --> 00:00:51,380
It is s means initial device which value is shifted an initial device in which value is shifted.
6

7
00:00:51,380 --> 00:00:57,230
Also D and N1 ,it is still remember it ,length is really important.
7

8
00:00:57,270 --> 00:01:04,290
We worked with D4 in SFTR command but in here N1 is still same and N2 is number
8

9
00:01:04,290 --> 00:01:05,810
of bits forming a group.
9

10
00:01:05,860 --> 00:01:06,850
So.
10

11
00:01:06,900 --> 00:01:10,050
R means It is going to shift from left to right L means.
11

12
00:01:10,050 --> 00:01:13,080
It is going to shift from left to right.
12

13
00:01:13,110 --> 00:01:14,400
That's all.
13

14
00:01:14,420 --> 00:01:15,630
---
14

15
00:01:15,630 --> 00:01:17,930
Right to Left from left to right.
15

16
00:01:18,010 --> 00:01:25,260
And I said wrongly R means we will shift to the right side and L means we will shift to the left side.
16

17
00:01:25,320 --> 00:01:29,010
So that moment we are starting from the right to the left.
17

18
00:01:29,280 --> 00:01:36,570
So in the ISPsoft I will create similar very basic example for you and you will understand how can we
18

19
00:01:36,570 --> 00:01:43,070
use WSFR command or WSFRP - P means pulse contact.
19

20
00:01:43,110 --> 00:01:48,550
Again I am telling that I will use in this project pulse contact.
20

21
00:01:49,050 --> 00:01:55,420
Let's create a new project and program 0 is creating now in.
21

22
00:01:55,860 --> 00:02:03,840
In this project I will use again LD ex. x0.5
22

23
00:02:03,840 --> 00:02:14,080
This is because as series CPU types and WSFRP
23

24
00:02:14,090 --> 00:02:20,970
This is our instruction and this moment I will add here x0.6
24

25
00:02:21,070 --> 00:02:28,780
And now remember we used the rising edge in SFTR command but  this moment we are not
25

26
00:02:28,780 --> 00:02:34,420
using rising edge for the x0.5 because we use pulse contact in here.
26

27
00:02:34,420 --> 00:02:38,830
And how many data that w are going to shift in this project or in this example.
27

28
00:02:38,860 --> 00:02:44,470
I will say 5 and each time how many data is going to shift one by one.
28

29
00:02:44,590 --> 00:02:45,480
So this is one.
29

30
00:02:45,580 --> 00:02:50,970
So we will read the results from that let's say D20.
30

31
00:02:51,220 --> 00:02:51,920
That's all.
31

32
00:02:52,000 --> 00:02:56,430
And now we can send this project to simulator.
32

33
00:02:56,680 --> 00:03:08,160
but now X0.6 data type is doesn't match up because now I made a mistake because
33

34
00:03:08,190 --> 00:03:16,400
now what we are doing data shifting we are shifting data so x.6(bool)
34

35
00:03:16,710 --> 00:03:19,460
Bu this is not a data.
35

36
00:03:19,470 --> 00:03:20,450
This is not a word.
36

37
00:03:20,460 --> 00:03:27,310
So we need to put here word value so we will read word values from d0.
37

38
00:03:27,480 --> 00:03:38,120
Let's say like this I will go to my slide and I will say to for example the line is moving forward and
38

39
00:03:38,120 --> 00:03:40,700
we have here boxes.
39

40
00:03:40,930 --> 00:03:48,020
Then we have a value of these boxes but which value we are getting.
40

41
00:03:48,020 --> 00:03:59,680
For example weight value from these boxes in here from the Loadcell so and than according to weight
41

42
00:04:00,040 --> 00:04:06,910
we are shifting or we are separating these boxes to the right or left or front and etc.
42

43
00:04:06,940 --> 00:04:13,900
This is according to your mechanical system and then we need to get these weights from here and we need
43

44
00:04:13,900 --> 00:04:16,450
to send it to here immediately.
44

45
00:04:16,780 --> 00:04:22,900
So this is our project structure or this is our examples structure.
45

46
00:04:22,900 --> 00:04:25,080
I will compile this project.
46

47
00:04:25,120 --> 00:04:27,210
Now we are okay and done.
47

48
00:04:27,580 --> 00:04:36,310
I will go online to plc and I want to do a download this project say transfer now it's transferring
48

49
00:04:36,700 --> 00:04:39,360
and I want to go back to running state.
49

50
00:04:39,460 --> 00:04:48,430
Now we are okay so we will shift five data and we will read these five data from starting from D20
50

51
00:04:48,910 --> 00:05:00,190
till D25 and then let's change it D0 will be 5 and I will increase it one by one and force it
51

52
00:05:00,310 --> 00:05:13,330
on and force and off and the next one should be six and set on or force on and off next one will be
52

53
00:05:14,110 --> 00:05:14,970
seven.
53

54
00:05:15,640 --> 00:05:20,880
And again four set on set off.
54

55
00:05:20,950 --> 00:05:33,000
This was 3. and this will be fourth one and set on and off and this will be fifth one.
55

56
00:05:33,220 --> 00:05:39,290
And this is the end and set on set off.
56

57
00:05:39,290 --> 00:05:44,000
Now go to the device monitor table and add here left click.
57

58
00:05:44,110 --> 00:05:45,980
It is starting from D20.
58

59
00:05:45,980 --> 00:05:48,620
Just five value so you can see it in here.
59

60
00:05:48,690 --> 00:05:52,520
D20 is now five and d 21 is six.
60

61
00:05:52,530 --> 00:05:56,090
D22 is 7 and 8 and 9.
61

62
00:05:56,120 --> 00:05:57,060
What happened.
62

63
00:05:57,110 --> 00:06:03,210
We shifted five data five word data to from.
63

64
00:06:03,220 --> 00:06:07,140
from left to right.
64

65
00:06:07,150 --> 00:06:09,160
So what happened.
65

66
00:06:09,160 --> 00:06:16,380
We started with five and we ended with the nine so completely it is shifted correctly.
66

67
00:06:16,540 --> 00:06:27,160
And if I go to my program area and if I say again set on and fourth set of what happened now it has
67

68
00:06:27,160 --> 00:06:36,270
shifted it was 9 device monitor table it is still trying to shift with the 5 and 5 it is writed
68

69
00:06:36,340 --> 00:06:42,080
immediately to D24 why because we are just working with the 5 data
69

70
00:06:42,100 --> 00:06:52,080
The length is 5 because of this it is running with the D 20 till D25 so the 24 is the last one.
70

71
00:06:52,190 --> 00:07:03,800
So it is writing to first D24 and d 23 so I can just write here to understand D24 and then it is writing
71

72
00:07:03,800 --> 00:07:14,990
D 23 22 21 and 20 and that moment this is the fourth one and then again it is going to be equal to
72

73
00:07:15,230 --> 00:07:22,780
my line because the first value was in the  D24 and the second value is activated or second time it
73

74
00:07:22,780 --> 00:07:30,780
is activated and first value was in the D 23 and the third time we activated the first value is now
74

75
00:07:31,150 --> 00:07:38,880
twenty two and the fourth time in the D 21 and the fifth time we activated x0.5 and
75

76
00:07:38,880 --> 00:07:46,380
that moment first value is came to D20 it is working like this and it is wsfr command if you
76

77
00:07:46,380 --> 00:07:54,540
delete p - pulse contact from here for example like this you need put here rising edge like this
77

78
00:07:54,540 --> 00:08:02,400
So this is how wsfr command is working or how we are shifting the datas or it is coming from the
78

79
00:08:02,400 --> 00:08:09,240
loadcell  or coming from your recipes or something like this and you can shift them all with the just
79

80
00:08:09,320 --> 00:08:14,280
with one contact with according to your parameters from here what was it.
80

81
00:08:14,280 --> 00:08:22,110
It is where we are reading from the values and how many data the length of the data and how many 
81

82
00:08:22,140 --> 00:08:30,210
we are going to shift each time when these command is the instruction is worked or run and where
82

83
00:08:30,210 --> 00:08:37,530
we are going to get the results from D ,these are all for the wsfr command or you can just try it
83

84
00:08:37,530 --> 00:08:47,790
yourself WSFL or WSFLP or with pulse contact command with yourself to understand this command how
84

85
00:08:47,790 --> 00:08:50,880
can we use it how can we work with it.
85

86
00:08:50,880 --> 00:08:57,060
But this is also for the production lines this is really important instruction and finished for this
86

87
00:08:57,060 --> 00:08:59,090
video see you in the next video.
