Hello everyone my name is Caner and our current chapter number is 9 2
And this chapter we will program with some ladder and FBD 3
Diagrams 4
So 5
Let's start 6
I switch back to scout program. 7
So let's create some program i click to insert a Ladder / FBD unit 8
This is the unit name you might consider the unit as a folder 9
you see the compiler options I use global settings 10
and there are two sections user interface and implementation 11
In parameter you were just add your variables 12
as Global 13
Or constant values 14
So you will select 15
from Combobox that are also enumeration and structure types are different kind of 16
data types 17
These interface area is reachabel 18
From other units that means if I create 19
Some interface variable exportable 20
add MCC unit after I make an connection and it is possible 21
A program or function bloke located at Ladder unit 22
So here you see connection section 23
Names namespace name and type 24
Connection type could be program units or the library 25
enumerations in simotion 26
During your program the connection will be created automatically 27
I choose here programming units and select the name MCC unit 28
After that I will be able to write my own program in ladder 29
and read or write variables of the MCC unit possible 30
Commonly used 31
For Global data We will create a structure text 32
Let's say is ST_DB 33
ST units 34
As you see here the same interface and implementation section 35
normally there is a view here creating your variables. 36
data type and structure 37
At the structure list you have to write your own 38
Hopefully future like I press the tab 39
It's adds 40
like code snippet 41
Global Tech 42
Global 43
retain entered 44
end_var 45
so on.. 46
Let's create soem variable interface 47
Global 48
Available 49
gbo test 50
Should be bits as boolean 51
If you want to use arrays you have to enter here the length of array 52
and you can enter here the initial value 53
True or false 54
Yep 55
This is the implementation section so let's say 56
Bo test 57
bo test written Global retain 58
Let's set initial value to 59
True 60
If I want to do the same thing on structure text 61
I have to go here 62
You didn't use type 63
Are Global and copy paste and go everything you see here 64
write GBO test 65
GBO test 66
Retain 67
I have to enter disabled in written section 68
bo test retain 69
boolean test datatype 70
So listen. 71
The initial value is true 72
Bool 73
botestretain 74
global boolean value 75
let's check 76
There's a shortcut for variable declaration 77
You're see here the work window 78
add some variable 79
If your Select exportable 80
It will be located in interface 81
You see here an additional or global 82
So... 83
Execution preprocessor 84
it's checking your code 85
And see if there's any mistake before compilation 86
accept and compile 87
You'll see here just 2 warning 88
Implementation variable is not used just for your information 89
So I'll accompany ladder site together 90
Procedures successful 91
symbol browser I can see all of the my data type and variables 92
I haven't downloaded my program yet so that's why I couldn't see the status of the initial value 93
I can right-click and at my watch table it's possible to monitor as a 94
Local variables here 95
So... 96
Let's continue and insert a little program 97
Okay 98
and this section belongs to 99
Just this program you can also create another variables as local 100
And enumeration or structured data type 101
I need to be used only this program at it is not exported 102
so other units 103
At this case 104
So you see an active 105
You can enter just your program test one program title and user 106
Comments 107
in your toolbox that are some buttons 108
For accept and compiled 109
For switching to FBD and ladder now we're working on ladder as default 110
Create a new network using shortcut is called what process are 111
copy and paste 112
See here IOs get an diagnostic message my simotion is crushed 113
There are some bugs 114
Still in your LADDER editor so I have to close 115
And I will open again 116
I wonder the last date of my project I have to open again 117
What is the ST_DB is there in 118
Because I couldn't save and compile 119
Someone that's program I created is not there it is lost 120
Create 121
So let's copy and paste 122
click here 123
Right 124
There are some buttons for create normally open contact normally closed contact to create the Branch 125
You can just come here and 126
Switch to set switch to normal relay coil output 127
you can 128
Right click here and insert elements 129
as comperator 130
From this way it's also possible 131
You'll see here the element of ladder 132
There's one thing important when you use function blocks 133
Or system functions 134
For instance PLC open functions MC power 135
Normally you have to Define an instance 136
MC power like this so maybe it will 137
Be local 138
You see here the three dots that are some parameters here but right now I couldn't see so 139
I will right click 140
at this clock 141
Then on the display section 142
I can say all blocks parameters be visible 143
After that I'm able to see the input and outputs of this block 144
So... 145
next thing 146
There is symbol input help 147
So I can select my symbol from the list 148
under simotion there are some other folders for symbol selection 149
Direction 150
symbol selection from 151
Global device variables 152
You receive here font type bold 153
That means 154
It's possible 155
When I try to select the integer type of data with contact 156
Comment it is not logical 157
then see here the red colored font 158
You can save your program 159
Even if it's not completed 160
Of course you'll get error messages when I try to save and compile because there are so many misses 161
You see here 162
So just right clicking and delete output I don't want to connect here 163
Let's try and compile 164
done 165
So I want to use some variables for my ST_DB 166
I can easily click on servo browser 167
Drag and drop 168
A variable 169
for test for example 170
So it looks like fine 171
Let's check on ladder units 172
What's just happened 173
Let's compile 174
And the create procedure is successful 175
So... 176
It doesn't require an output and it's really strange 177
ok let's download our program 178
Let's set to run mode 179
I want to go online and monitor my ladder program first 180
I have to choose 181
compiler settings permit program status 182
It's important 183
Otherwise I can't go online on monitor it's here the program status 184
It says program is not assigned to a task or program the function fb 185
it's not called by another unit your correct 186
I have to assign my program to a task in my execution system 187
For example in background task 188
Because otherwise it's not used by the system it's like just and spare 189
In the memory lets try 190
Now I see 191
The green lights or green colored box that means enable and 192
Enable out input output is working at the Block is processing 193
this is functional 194
You will see here 195
The green line and turquoise color 196
That means that are some logic here 197
There are some logic here 198
Right now 199
But only the network for is monintored 200
The network 2 is not updated I have to click wait and see what's going on at 201
this Network 202
It's possible to right click 203
control true and force 204
Right now the status is true let's say control the false 205
You see here 206
It's not possible why? 207
Let's say I want to create some output 208
test routine another 209
bit 210
And try to download in Run 211
when you are programming ladder and when you didn't create a new variable is easy download in run fast 212
So i see network so is necessary to add 213
Output for each Network for controlling to logic to work my program 214
Let's go in symbol browser. there is a misunderstanding here 215
we have created the same symbol of variables 216
Four of them 217
In the ladder unit 218
Right here 219
For all of then 220
Structure text Unit these are the same 221
same symbols that's why there's a misunderstanding here 222
Normally 223
our variables 224
Connected to our ladder is here 225
Then I'll go to control the true I see here the all of them set to true 226
so That's why I connection 227
I will try to do that in manual 228
Let's set program 229
symbol selection 230
Go offline and just say 231
Control space 232
To select a variable from the list 233
drag and drop 234
Let's try again 235
So a variable ID already defined in ST unit 236
This is an example that shows you 237
That you shouldn't use the same variable names 238
Normally 239
That thing you couldn't use 240
ST unit 241
Yep. 242
So try this one and this one 243
Compile 244
okay download 245
set run mode 246
you have to going offline and stop 247
Set it 248
monitor 249
Yep listed control the first 250
Now I'm using the a variable from structure text unit 251
I can easily switch back to FBD 252
Whatever you choose 253
Or when your right click 254
It's possible to exports 255
export or import as XML file 256
ladder units 257
You can save and restore your variables to hard drive 258
It's possible to set in know how protection 259
when you use display reference data as cross-references all of the 260
Items on the ladder unit will be displaced 261
For example of gbo test boolean from ST unit is 262
Red 263
Bit 264
This program in network today 265
Or I can write Click 266
gbo test 267
and copy 268
And let's say edit menu display reference the cross references 269
Let's say filter 270
Or... 271
search in your project 272
Devices 273
Technology object 274
It takes a little bit longer here 275
you see each place number of positions 276
variable used gbo test 277
This is also another bgbo test bit this is different than output 278
What's the search mechanism works 279
For this works 280
Keep in that in mind 281
Let's create some function block 282
Ladder or FBD 283
Bits 284
You can write your own program here 285
Describe 286
Input data type 287
in out data type or outputs 288
Start and reset 289
Q for instance 290
go... 291
Define a structure 292
Is similar in simatic data block of structure 293
Easy drag-and-drop your variable 294
Sometimes it's not just easily 295
So... 296
Let's go call this simple test function block from our ladder program 297
You can say insert elements empty box 298
enter here our 299
Function block name 300
LAD FBD 301
Or you can easily drag and drop your function block 302
We need to assign an instance 303
Describe as local 304
Only the inout type perimeter have to be 305
Connected 306
Let's say 307
By the way I go back in my symbol browser and I see the old variables are missing 308
So when I create a new program and didn't compiled it yet that you just 309
can see the variables so first of all I have to compile the program 310
assign here GBO test 311
Then compile 312
sorry Yeah they deleted all the variables and the gbotest available in comes from ST_DB 313
Okay 314
Let's downloads 315
Yep. 316
You're not sure if the output is on or off 317
You can monitor the instance under the 318
Ladder 319
But it's a local variable so 320
It's not possible to monitor if you want some monitor the function below inputs and outputs 321
You have to describe 322
Here 323
on the other hand you will start is False 324
and output is false 325
let's try this one 326
Okay I'll get it's working 327
Reset true 328
someone can monitor from here 329
So... 330
Normally we will use ladder editors for creating alarm messages or alarm bits 331
and group down by bits or bytes 332
To send it to HMI screen to show the operator current warning or alarm 333
Messages on HMI screen 334
Because it takes longer time 335
When you compared to work as structure text or MCC easy to monitor 336
But the editor is not so advanced 337
as TIA Portal ladder editor 338
Sometimes 339
And more than usual to copy and paste some function blocks or other commands 340
It's hard to do some program Loops like for Loop or while loop 341
It's possible to use label jump labels to 342
Control the program 343
You can easily use this just an empty box and set it 344
command you need 345
For instance counters 346
data type convertion commands 347
Detecting positive or negative Edge 348
And you can call the other 349
Programs or function blocks created in other language is possible 350
That's why I receive your the MCC unit 351
If you're in library or create your own Library with new user defined 352
Functions 353
And make a connection you see all of the 354
items here release use 355
it is good for maintenance or if your 356
Starting your class because it's good 357
Begin with the ladder editor 358
The programming motion comments 359
You'll see European standarts PLC Open Motion Commands like homing enabling the axes and encoders... 360
It's easy to use and also other competitors like 361
codesys based 362
Controllers or rockwell or other trademarks use PLCopen 363
so 364
its 365
Easier and faster way to integrate if you are first time using this simotion 366
Since you have experience with PLC open comments 367
So command library is useful to drag-and-drop 368
Which function or element needed 369
It is working it is easy 370
And so... 371
Basically you just learned how do we create and ladder units and or program 372
Or are functions 373
You can make exercise later on to understand the toolbar buttons 374
data elements of the ladder and editor 375
Time to sometime I think with new programs you will 376
Make some progress 377
MCC and LADDER is 378
A good way 379
For beginners to start the program in simotion 380
So thats all for now see you in next chapter.