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