1

00:00:00,512  -->  00:00:06,656
hi guys My name is caner and with this course siemens system and Programming

2

00:00:07,936  -->  00:00:11,776
and The next chapter with 34

3

00:00:12,032  -->  00:00:17,664
Let's make an example with LMCBASIC access function block

4

00:00:18,176  -->  00:00:20,736
To control our axis with single FB possible

5

00:00:26,368  -->  00:00:30,976
With this way so

6

00:00:31,488  -->  00:00:33,792
Let's switch back to Simotion scout

7

00:00:34,560  -->  00:00:39,424
And I'm going to write some basic program

8

00:00:40,192  -->  00:00:41,984
With ladder first

9

00:00:42,752  -->  00:00:47,360
i will insert a ladder unit

10

00:00:54,272  -->  00:00:56,576
Let's say that

11

00:00:57,600  -->  00:01:00,928
First program with ladder

12

00:01:01,184  -->  00:01:05,536
at This project for this chapter

13

00:01:05,792  -->  00:01:08,864
Let's give a name

14

00:01:09,120  -->  00:01:10,912
for

15

00:01:11,680  -->  00:01:15,776
Background task Access Control okay

16

00:01:21,920  -->  00:01:24,992
And I would create some Network here

17

00:01:27,552  -->  00:01:32,416
lets say Start and end of the program

18

00:01:32,672  -->  00:01:37,536
Let's say LMC basic access function block

19

00:01:39,584  -->  00:01:45,728
And I will drag and drop the function block from the library

20

00:01:47,520  -->  00:01:48,800
It this way

21

00:01:49,312  -->  00:01:55,456
Before to do that maybe I should make a connection to this Library

22

00:01:58,016  -->  00:01:59,552
From here

23

00:01:59,808  -->  00:02:03,904
Library and LMCBASIC

24

00:02:05,184  -->  00:02:09,024
save and Compile

25

00:02:11,584  -->  00:02:14,144
So let's try again

26

00:02:16,704  -->  00:02:19,008
no insert an empty box

27

00:02:21,312  -->  00:02:27,456
Finally it's possible to use right click

28

00:02:27,712  -->  00:02:31,296
Display all box parameters

29

00:02:31,808  -->  00:02:33,600
i should assign a instance data block

30

00:02:33,856  -->  00:02:40,000
for axis red

31

00:02:45,632  -->  00:02:47,936
And for

32

00:02:48,448  -->  00:02:52,544
Axis blue maybe

33

00:03:06,112  -->  00:03:07,904
So

34

00:03:10,720  -->  00:03:15,584
First I should assign

35

00:03:17,120  -->  00:03:18,656
The axis data

36

00:03:19,168  -->  00:03:21,216
Maybe I should create

37

00:03:22,240  -->  00:03:25,312
The slmc basic access data type

38

00:03:29,408  -->  00:03:32,992
On my ST_DB

39

00:03:36,320  -->  00:03:38,624
var global retain

40

00:03:49,376  -->  00:03:54,752
okay and for axis blue

41

00:04:00,384  -->  00:04:06,528
Let's make a connection to this program units and ST_DB

42

00:04:13,952  -->  00:04:20,095
I will create a function or program for startup task

43

00:04:21,887  -->  00:04:26,751
to Initialize

44

00:04:27,007  -->  00:04:29,567
Some variable

45

00:04:44,927  -->  00:04:47,231
Let's use our structure

46

00:04:51,071  -->  00:04:53,887
axis red

47

00:04:56,191  -->  00:05:02,335
and  you see here the members of the structure to access

48

00:05:02,591  -->  00:05:06,431
should be maybe technology object

49

00:05:07,455  -->  00:05:11,039
axis red 

50

00:05:11,807  -->  00:05:16,671
next thing leading value should be

51

00:05:17,183  -->  00:05:18,975
axis red

52

00:05:25,375  -->  00:05:26,655
So

53

00:05:29,727  -->  00:05:35,871
I can use other variables for camming data input config data input

54

00:05:36,639  -->  00:05:39,455
there are Several structures

55

00:05:39,711  -->  00:05:40,735
Inside

56

00:05:43,807  -->  00:05:49,951
This variable structure axis assigment

57

00:05:50,207  -->  00:05:54,303
so Enough just for now

58

00:06:04,543  -->  00:06:05,823
Okay

59

00:06:06,079  -->  00:06:08,639
in editor

60

00:06:09,151  -->  00:06:11,711
save and compile ST_DB

61

00:06:13,503  -->  00:06:17,855
From my symbol browser is possible to

62

00:06:20,159  -->  00:06:21,695
Drag and drop

63

00:06:21,951  -->  00:06:27,839
axis data

64

00:06:28,095  -->  00:06:31,167
and for the blue axis same way

65

00:06:34,495  -->  00:06:37,567
lets try save and compile

66

00:06:46,271  -->  00:06:52,415
and normally I should arrange the input and output variables create new structure variables connect here

67

00:06:55,743  -->  00:06:58,303
So if you have

68

00:06:58,815  -->  00:07:02,911
Some questions or need some information about

69

00:07:03,679  -->  00:07:05,471
this function block

70

00:07:05,727  -->  00:07:11,871
there is a PDF documents related to this Library

71

00:07:12,127  -->  00:07:18,271
so You can download it from the website of siemens support or you can just use your project generator

72

00:07:18,527  -->  00:07:24,671
click on document icon as you remember and to get information

73

00:07:24,927  -->  00:07:31,071
About example what is the meaning of tenable

74

00:07:31,327  -->  00:07:37,471
Working function you can assign here true or you can consider 

75

00:07:37,727  -->  00:07:43,871
About your control panel is active or not or your web browser

76

00:07:44,127  -->  00:07:50,271
HTML page control priority is taking the account you may use

77

00:07:52,575  -->  00:07:55,391
This for acknowledging the error

78

00:07:55,647  -->  00:07:59,487
I've asSign Here the old variable

79

00:07:59,999  -->  00:08:05,119
ST_DB axis red control

80

00:08:05,375  -->  00:08:07,679
Acknowledge error

81

00:08:08,959  -->  00:08:13,055
and similar rate for blue access

82

00:08:15,615  -->  00:08:19,711
Acknowledge error Axis Blue

83

00:08:22,015  -->  00:08:24,831
control acknowledge

84

00:08:25,343  -->  00:08:27,135
error so...

85

00:08:31,743  -->  00:08:34,559
Reset

86

00:08:36,351  -->  00:08:42,495
Should be used for the restart of the technology object or the function block

87

00:08:42,751  -->  00:08:44,031
You see here

88

00:08:44,543  -->  00:08:46,335
Enable axis

89

00:08:47,103  -->  00:08:49,663
Another execute comments

90

00:08:50,687  -->  00:08:54,015
By the way execute comments are

91

00:08:54,271  -->  00:08:58,111
Rising Edge triggered functions

92

00:08:58,367  -->  00:09:04,511
and right here for enabling you need a level logic one level means enabling to access

93

00:09:05,535  -->  00:09:07,839
there are some other

94

00:09:08,095  -->  00:09:14,239
Functionality like executed gear in executive gear off executive and so...

95

00:09:15,775  -->  00:09:21,919
Phasing enable open break and so on there's a common

96

00:09:23,199  -->  00:09:24,735
double  word Actually

97

00:09:24,991  -->  00:09:27,807
You may use for

98

00:09:28,319  -->  00:09:30,367
another Functional

99

00:09:32,159  -->  00:09:38,303
for instance when you want to set 

100

00:09:39,583  -->  00:09:45,727
bits off2 or on your prof drive telegram so that way it's possible

101

00:09:49,567  -->  00:09:51,615
Reset axis

102

00:09:51,871  -->  00:09:54,431
Possible with restart of functionality

103

00:09:55,199  -->  00:09:58,783
There are here some output

104

00:09:59,807  -->  00:10:03,391
actual command as double word and diagnostics

105

00:10:03,903  -->  00:10:07,743
Slmc basic diagnostic data type

106

00:10:09,023  -->  00:10:10,815
Maybe you should here

107

00:10:11,071  -->  00:10:12,863
Use and

108

00:10:13,119  -->  00:10:15,167
Additional

109

00:10:15,423  -->  00:10:17,471
axis

110

00:10:17,727  -->  00:10:20,543
Diagnostics

111

00:10:20,799  -->  00:10:25,919
Red as LMC bASIC AXIS

112

00:10:28,479  -->  00:10:30,783
diagnostics data type

113

00:10:34,367  -->  00:10:36,415
and For the blue

114

00:10:41,279  -->  00:10:45,631
You can assign and make an interconnection

115

00:10:50,751  -->  00:10:53,055
Yep

116

00:10:53,823  -->  00:10:57,151
then you write S and control space

117

00:10:57,407  -->  00:11:01,759
axis data Red

118

00:11:02,783  -->  00:11:05,599
and for the

119

00:11:06,111  -->  00:11:07,903
Red

120

00:11:10,207  -->  00:11:13,535
And the next one is blue

121

00:11:19,935  -->  00:11:23,263
let's check and compile

122

00:11:28,639  -->  00:11:30,687
Let's go online and download

123

00:11:51,935  -->  00:11:53,727
Set the run mode

124

00:12:00,895  -->  00:12:03,967
okay let's try

125

00:12:04,991  -->  00:12:08,063
i think we have forgot something

126

00:12:08,831  -->  00:12:12,415
In our execution system

127

00:12:14,719  -->  00:12:18,303
I should assign my startup program

128

00:12:19,839  -->  00:12:21,375
to startup task

129

00:12:22,399  -->  00:12:28,031
And I should assign my ladder program to background task

130

00:12:30,335  -->  00:12:36,479
so accept and compile

131

00:12:42,111  -->  00:12:44,671
then download

132

00:12:57,983  -->  00:12:59,263
Okay

133

00:13:00,799  -->  00:13:05,407
It's in the RUN with right now and let's select the

134

00:13:06,175  -->  00:13:07,711
Stdb

135

00:13:10,271  -->  00:13:12,831
Close the old structure

136

00:13:13,855  -->  00:13:16,159
Some data

137

00:13:19,487  -->  00:13:22,047
axis leading value

138

00:13:24,351  -->  00:13:27,167
maybe I forgot to change

139

00:13:27,679  -->  00:13:31,007
The startup program

140

00:13:31,263  -->  00:13:37,407
axis red yes

141

00:13:37,663  -->  00:13:39,967
blue Is related with

142

00:13:45,599  -->  00:13:50,463
camming and gearing after some change in your program and compile

143

00:13:50,719  -->  00:13:56,351
There's a difference that why you can't see the actual status values

144

00:13:58,143  -->  00:14:01,471
That's why you have to download possible to do it RUN

145

00:14:01,983  -->  00:14:03,775
It's our case

146

00:14:05,311  -->  00:14:06,335
So...

147

00:14:09,151  -->  00:14:11,455
Well I can see

148

00:14:11,967  -->  00:14:15,807
The status value of my STDB unit

149

00:14:18,367  -->  00:14:24,511
I didn't stop to CPU and set the RUN mode it again that's why the technology object

150

00:14:24,767  -->  00:14:29,119
Use the same for both variable it's red

151

00:14:29,375  -->  00:14:35,519
Because my start up task is executed only when CPU 

152

00:14:35,775  -->  00:14:37,567
goes to run state once

153

00:14:38,335  -->  00:14:42,175
so override velocity default hundreds

154

00:14:42,687  -->  00:14:48,831
for position you can use to enter some value here if you don't

155

00:14:49,855  -->  00:14:55,999
Want to use default -1 means it will be work with

156

00:14:56,255  -->  00:14:57,535
default values

157

00:14:58,047  -->  00:15:02,399
determined in your axes

158

00:15:03,935  -->  00:15:08,287
You can use just some parameter to

159

00:15:11,103  -->  00:15:13,663
fit in your requirement

160

00:15:16,223  -->  00:15:18,527
so What about diagnostic?

161

00:15:18,783  -->  00:15:22,623
You see here the error class are type and so on

162

00:15:23,135  -->  00:15:29,279
I'm planning to use the function block instance itself to control my access

163

00:15:29,535  -->  00:15:31,071
at this case

164

00:15:32,607  -->  00:15:36,191
Because I don't want to waste so much time

165

00:15:39,007  -->  00:15:43,359
It is inside the ladder unit you see here datablock

166

00:15:44,383  -->  00:15:50,527
Let's start trace to test or

167

00:15:50,783  -->  00:15:52,831
function block

168

00:15:54,111  -->  00:15:59,743
time diagram let's go back to symbol browser

169

00:15:59,999  -->  00:16:01,279
Let's say

170

00:16:02,559  -->  00:16:05,887
Function block is valid

171

00:16:07,679  -->  00:16:12,799
axis in standstill  mode Let's enable or Axis First

172

00:16:20,479  -->  00:16:26,367
and I see here the access is enabled that means our function is working

173

00:16:26,623  -->  00:16:29,439
And axis is  standstill

174

00:16:29,695  -->  00:16:35,071
brake is opened if the brakeit's opened

175

00:16:39,679  -->  00:16:40,959
let say jog positive

176

00:16:41,215  -->  00:16:43,519
As default parameters

177

00:16:44,799  -->  00:16:47,103
now you see here

178

00:16:48,895  -->  00:16:50,687
its working Originally

179

00:16:51,199  -->  00:16:52,991
Something's going on

180

00:16:56,575  -->  00:17:01,183
and jog positive selected output is set true

181

00:17:03,231  -->  00:17:06,559
Access is enabled there's an alarm no okay.

182

00:17:10,399  -->  00:17:15,519
For the other structures

183

00:17:17,823  -->  00:17:20,127
If you want to go

184

00:17:20,895  -->  00:17:27,039
inside your ladder program and monitor your function below

185

00:17:27,807  -->  00:17:28,831
Here

186

00:17:30,367  -->  00:17:36,511
then normally you have to assign some input and output variable to monitor from outside

187

00:17:41,631  -->  00:17:43,935
so I should normally do that

188

00:17:44,447  -->  00:17:48,799
But I want to show you basically how to function block works

189

00:17:50,335  -->  00:17:51,871
Let's say

190

00:17:52,383  -->  00:17:55,199
our actual comment double word is 11

191

00:17:57,503  -->  00:18:03,647
I want to see there are some internal instance of the PLC open commands

192

00:18:03,903  -->  00:18:08,767
That means this basic axis function block uses

193

00:18:09,023  -->  00:18:11,583
PLC open comments

194

00:18:15,167  -->  00:18:18,495
and our Axis object is this

195

00:18:18,751  -->  00:18:23,871
external encoder is an object technology object null

196

00:18:24,383  -->  00:18:26,687
axis referance itself

197

00:18:28,735  -->  00:18:34,367
You can monitor and diagnostic other variable here

198

00:18:37,695  -->  00:18:41,791
Let's try for the blue access

199

00:18:42,047  -->  00:18:44,351
Let's enable first

200

00:18:45,119  -->  00:18:47,423
and jog to positive

201

00:18:52,031  -->  00:18:55,871
I see also

202

00:18:59,711  -->  00:19:03,551
here a technological alarm that means

203

00:19:05,343  -->  00:19:07,135
command aborted

204

00:19:07,647  -->  00:19:08,671
Why?

205

00:19:08,927  -->  00:19:13,791
Because at the same time for Access Blue my

206

00:19:14,047  -->  00:19:16,095
MCC program is running

207

00:19:18,655  -->  00:19:20,191
And

208

00:19:20,447  -->  00:19:21,983
here you will see

209

00:19:23,007  -->  00:19:24,031
i little movement

210

00:19:26,847  -->  00:19:28,383
On the blue axis

211

00:19:29,919  -->  00:19:31,199
After that

212

00:19:31,455  -->  00:19:35,551
it is stopped by the MCC command

213

00:19:35,807  -->  00:19:37,343
As I remember

214

00:19:39,903  -->  00:19:44,255
so axis FB is working at the same time

215

00:19:45,023  -->  00:19:49,119
Let's continue with the access red

216

00:19:56,799  -->  00:19:58,847
And let's try

217

00:20:01,919  -->  00:20:03,711
Executive homming

218

00:20:13,439  -->  00:20:14,207
So

219

00:20:14,463  -->  00:20:17,023
As you can see

220

00:20:17,279  -->  00:20:23,423
At this point the actual position of axis set to 0 that means homing is executed

221

00:20:24,959  -->  00:20:27,263
For virtual axis

222

00:20:31,871  -->  00:20:33,151
and function valid

223

00:20:33,407  -->  00:20:35,711
You can see here homing selected

224

00:20:36,735  -->  00:20:39,039
axis enabled and home.

225

00:20:39,807  -->  00:20:45,439
In position and brake is open now I can use

226

00:20:46,207  -->  00:20:49,535
some motion commands

227

00:20:50,303  -->  00:20:53,631
for Absolute positioning let's try jog first

228

00:20:56,703  -->  00:21:00,287
Okay after that I want to execute

229

00:21:01,055  -->  00:21:02,847
Positioning

230

00:21:11,551  -->  00:21:15,391
we are working on red side

231

00:21:22,560  -->  00:21:28,704
okay now you see trapezoidal velocity of the profile and

232

00:21:28,960  -->  00:21:32,544
actual Position or status of motion

233

00:21:34,848  -->  00:21:37,408
It was decelerating

234

00:21:40,992  -->  00:21:42,528
Constant move

235

00:21:43,040  -->  00:21:44,576
standstill

236

00:21:49,696  -->  00:21:53,024
okay actual position was 0mm

237

00:22:04,800  -->  00:22:07,104
 right here

238

00:22:08,640  -->  00:22:10,944
As you can see

239

00:22:11,712  -->  00:22:12,736
It's

240

00:22:15,552  -->  00:22:17,600
200 millimeters

241

00:22:17,856  -->  00:22:21,440
right or 150 mm

242

00:22:22,464  -->  00:22:25,024
Executed positioning command

243

00:22:37,056  -->  00:22:38,848
Another thing is

244

00:22:39,872  -->  00:22:42,688
You can use the other

245

00:22:43,200  -->  00:22:47,296
Executive stop enable stop execute gear in out

246

00:22:47,552  -->  00:22:50,368
basic commands together

247

00:22:51,392  -->  00:22:53,952
Before you

248

00:22:54,208  -->  00:22:59,328
Set logic level high on these inputs to execute command

249

00:22:59,584  -->  00:23:05,728
Maybe you have to change your settings here on your background program

250

00:23:05,984  -->  00:23:08,544
According to your parameter

251

00:23:09,056  -->  00:23:11,360
sAxis...

252

00:23:13,152  -->  00:23:14,688
data red

253

00:23:14,944  -->  00:23:16,480
dot

254

00:23:19,808  -->  00:23:22,368
sJoggingDATA

255

00:23:22,624  -->  00:23:26,464
here see acceleration-deceleration

256

00:23:26,720  -->  00:23:32,864
you can use incremental mode for inching before you execute your comments if you

257

00:23:33,120  -->  00:23:35,424
 change this parameters

258

00:23:35,680  -->  00:23:41,824
Your command is working according to this and for config data

259

00:23:42,080  -->  00:23:44,384
That are some

260

00:23:44,640  -->  00:23:47,712
Additional options for configuration

261

00:23:47,968  -->  00:23:51,296
Maximum velocity minimum vel

262

00:23:52,064  -->  00:23:57,696
This function block override to access parameters some of the parameters

263

00:23:58,720  -->  00:23:59,744
Is

264

00:24:00,000  -->  00:24:02,560
Motor without brake

265

00:24:03,328  -->  00:24:04,864
Or

266

00:24:06,656  -->  00:24:08,448
For instance

267

00:24:09,216  -->  00:24:12,032
encoder identification setting possible

268

00:24:12,288  -->  00:24:15,616
To change from here then you can

269

00:24:17,152  -->  00:24:21,760
Restart your technology object to be effective Maybe

270

00:24:22,784  -->  00:24:26,112
homing data you can

271

00:24:26,368  -->  00:24:30,208
Specify in incremental homing mode or you can

272

00:24:30,720  -->  00:24:35,840
Use redefine the position and you can set the home position setting

273

00:24:38,656  -->  00:24:41,984
And so on...

274

00:24:49,152  -->  00:24:55,040
We just integrated LMCBASIC library in our project and used our FB

275

00:24:56,832  -->  00:24:59,904
You have already downloaded

276

00:25:00,160  -->  00:25:05,536
IT web pages to CF card so it's possible to

277

00:25:06,048  -->  00:25:08,608
Normally work from here

278

00:25:17,312  -->  00:25:21,664
As you remember there's an interbranch page you you can control the axes

279

00:25:22,688  -->  00:25:26,272
You can examine the previous lecture notes

280

00:25:28,064  -->  00:25:29,600
So

281

00:25:29,856  -->  00:25:31,648
for your exercise

282

00:25:35,232  -->  00:25:41,376
Try other comments here with Trace executive gearing and gear out

283

00:25:43,680  -->  00:25:47,008
with different parameters and see the results

284

00:25:48,032  -->  00:25:51,872
Then at some point I think

285

00:25:52,128  -->  00:25:54,176
You should be

286

00:25:54,688  -->  00:26:00,832
have an idea about the difference of PLC open comments and simotion

287

00:26:01,088  -->  00:26:04,928
Integrated functions for technology objects

288

00:26:06,976  -->  00:26:09,536
for syncronous Operation

289

00:26:11,328  -->  00:26:15,168
For enable gearings you can compare

290

00:26:15,424  -->  00:26:21,056
 behavior of this to gearing from here and here

291

00:26:24,128  -->  00:26:30,272
as You remember from the last chapter about gearing

292

00:26:30,528  -->  00:26:34,880
on MCC during gearing on and off comments

293

00:26:39,488  -->  00:26:44,352
There are a lot of useful parameter and options with gear on functionality

294

00:26:53,056  -->  00:26:58,688
I think you should compare with the LMC basic axis function with these parameters

295

00:27:02,016  -->  00:27:06,112
And specially for the camming

296

00:27:08,672  -->  00:27:13,792
At some point you will see you eventually I guess

297

00:27:14,560  -->  00:27:17,632
simotion system functions

298

00:27:17,888  -->  00:27:21,728
Has more detailS than PLC open functions

299

00:27:22,496  -->  00:27:28,384
So at some point or as some application i think

300

00:27:28,640  -->  00:27:33,504
You need to switch to use simotion camming functions

301

00:27:34,528  -->  00:27:36,576
in My point of view

302

00:27:38,368  -->  00:27:41,952
And it is a good way

303

00:27:44,256  -->  00:27:47,584
To choose and use ready to

304

00:27:48,608  -->  00:27:49,888
Use

305

00:27:51,168  -->  00:27:57,312
LMC basic system function block

306

00:27:57,568  -->  00:27:59,360
it covers Almost

307

00:27:59,872  -->  00:28:02,688
Every requirements that you need

308

00:28:14,208  -->  00:28:19,584
so You can create and program

309

00:28:19,840  -->  00:28:22,400
A lot of machines

310

00:28:22,656  -->  00:28:25,472
and control access with this function

311

00:28:27,008  -->  00:28:29,824
If your

312

00:28:30,080  -->  00:28:36,224
Getting better and better everyday and when you need some more powerful camming or gearing functionality

313

00:28:36,480  -->  00:28:38,528
Then you should use

314

00:28:38,784  -->  00:28:40,064
simotion

315

00:28:40,576  -->  00:28:42,368
System function for

316

00:28:42,624  -->  00:28:45,696
gearing or camming i guess

317

00:28:45,952  -->  00:28:52,096
So basically that's it you should do your exercises to

318

00:28:53,376  -->  00:28:56,448
Now better with this function block

319

00:28:57,472  -->  00:29:00,288
basically it is password protected

320

00:29:00,800  -->  00:29:06,944
know how inside the program of the function block so

321

00:29:07,200  -->  00:29:13,344
If you need some information you have to read the documents

322

00:29:13,600  -->  00:29:15,648
so I'll see you next time.
