TIA Portal: Communication Between 2 PLCs S7-1200 Via Ethernet Using GET And PUT Instruction

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to automation engineer channel today i will show you how to transfer the data between the two dlc s7 1000 and 200. first one i i create one new project next step i will add two poc master and slay the master blc is cpu1214 ac dc relay here and i will add this the slide poc i will select the cpu1212 dc dc delay yeah i select the cpu the model here one is e40 okay okay we come to the network network view here and connect two plc together next step will be config the internet already for two poc right click and select the properties the ethernet address here the master plc i will i will select the ip192.168.0.1 here and slay build c just like you see here the ip2 one important thing need to be done is permit an access with the boot and get communication for two poc here we are we come to the master pc first we come to the connection mechanism here we click on this box and we do the same with the slayer plc okay i will change the name of blc1 to master and plc2 to slay next step i will program for reading the data from slay and transfer to master in program block here the main lp1 in ob1 of master in in in the instruction of communication here we expand the s7 communication we select the gate module here and rush to a program of play this is the name of the gate module and let default name getdb ok firstly we need to configure the connection for the get module right click and select property come to connection parameter here in the partner here we select the slide plc okay after we select this information will be automatically appear here next step we come to block parameter to configure the parameter of the get module first is the request input this is the request to use this module the next parameter is root area this this is a red in the slide poc that master pc will read the data from next a store area this is the address in the master plc that master will be stored the later read from play next a output of module the request completed in the uh this the uh the signal is indicated when the request is completed successfully and error the error is indicated whenever an error happen while processing a request and the final one is status to show information of the error okay now we we add the tag to parameter of the guest module here for request here we will put get db and we select the text request here for id we let default ndr we also get dp ndr for error we do the same stated okay next step is input the root area of of slide bucy and the store area in the master building for the store area in master plc i will create the new data block here add new block here data block i will name and we put the name the data from slay okay and i will generate three deck with the data type is real data one data type is real okay data tool view data tree also view for the root area in slide plc come to slide plc here and create the new data block with the name data to master data to master okay and i also create the tuitec with the data thai is drilled data one real data two data three okay generate the root area and the story area is done now we put into the get module we come to the ob1 of master we right click on the get module go to the property come to the root area we put tp let's see the dp this is the address in the slate so i will put the db 1 here b1 dot db x 0.0 why we uh we put 0.0 here we come to the data to master here if we want to read the data from yellow no let me check slay okay the 0.0 here is the offset value if we want to read the data from letter 1 it means the offset value with 0.0 we put 0.0 if you want to read data from from the uh later two will you put yellow boy uh no we will put 4.0 okay so we come back to the yes here we come back to property so that's we we key in 0.0 and the length because i want to read three real data so we put here three and and real here okay and we do the same with the store area store area e in the master so i will put db2 here db2 dock db x 0.0 the same with the root area 0.0 we come to data from slate it means the data copy from the slave will store from the data one here okay i also read three rio so i put here 3 and 3 ok we we have one arrow here let me check while db2 i will compile the the software to see the error absolute access to the data in block will optimize sse not permitted okay come back here tp2tb x boy i will put tp 2 tp x 0.0 y4 yeah one more thing we need to come to properties of the db here and we come to uh protection no gpu and we untick the optimize block asset here okay okay and we re combined and we do the same with the slave plc property untick here okay okay we come by no error the master also know here i will delete and we do again tp x 0.0 d p 2 now this is tp1 to dp x 0.0 so it's done so it's done for the guest module now in order to let the get module request continuously we need to set and reset for the big request for the bit here so we add one more command set and reset says this is here okay the output is yes tp and request okay this means whenever one request is done or have error the big request will be resetted okay so it's done for the gets module now we program for the boot the put model we do the same with the gate module we come to the s7 communication here okay i have your command here read no master read data from slay okay and this see the master put the data to slay put mean right okay right is the okay right later okay we do we drag the boot or do come here okay that's its name okay the request here we put db request letter id at default right click properties connection parameter must we will select the slay okay we come to pull up parameter okay uh download put tp done data put dp error the status put dp status okay in this in the put module the address here but right here okay we open the property uh right area this see the the address in the slip you see thus the data from master will write to and the scenario this is the address in the master plc that the data will get and right to the slave plc okay so i come to the master plc and add new block data block i will name data to slay okay and i also create three data with the data type real data one real okay data two data three okay and we do the same we come to the slide poc and we add new data block with the name data from master okay data one view data two data three okay so we come back to the ob1 we put the address to the right area in the scene area stack this is the address in the master plc data to slay db4 body for dp x 0.0 here 3 real okay and this is addressed in the slave plc data to master data from master db2 db2 tp x040 okay 3 real okay so it is done for the put model and we copy this string copy okay and this is not the ptp this is not the get this is the ptp okay this is also put this is not uh nd or this is report it's done and just put here yes okay so it runs for program after programming i will do the compile for the master first compile software only chain okay zero error come by for slay the software also zero in this project i use plc sim to simulate the two plc firstly connect the master pc first we come to stack simulation the block contained in this object can not be simulated with the s7 plc sim do you want to enable the support simulation during block compilation option in the project property okay wait for it so like here stacks us lot not finish okay bring it to here run can we go online and for the slay also stack simulation not finished okay we run the pushy oh okay so now we will check the data retreat from slave you see we come to data from slayer we monitor it you can see when we when we monitor the column with the name objects will appear here this is the value for the config here you can see 0.0 this means we read the data we we will read the data from slay with the offset 0.0 if we want to read the the data from from the slate from the slave with the offset if 4.0 this mean you will read from data to here we don't read the data one okay so let's see the data from slay okay we come to the slayer pc open the data to master monitor it i will change the data in the slave plc okay i will put here for example one two three okay so we have three value in the slide plc we come to the the master buc we come to the data from the slave in the master bucket you can see the value equal with the value in the slave you see and i will change the later in the slide you see again for example input here 23 here 56 and here 99 okay so we change the data in the poc slate here which end the build is like here the name of pc here that later block is later to master and we come to the the master we see master here and we come to the data from slave you can see the value is then equal to the value in the slide of pc in the slide plc okay now i will check for the push module function the put module function here you write the value write the data from the master plc to the slip using so we come to the data to slay in master 000 and and this value this data will write to the data from master here we monitor it wait okay 0-0 we come back to the data to slide in the master i will change for example 15 49 48 and 100 7 75 75 okay so now we come back to the master data this data later looks like uh sorry no yes data tools like so i will open the data from master data not smooth data tools like here data from master why not smoke let me take one more time something wrong right let's see the db2 right why wrong the connection eok block diagram aok sorry sorry my mistake the data right area is a address in the master in the slave you see no this is the not tp4 this is the db2 and the scenario here the rest in the master plc even did before sorry sorry my mistake okay maybe four fifty four view property come to property yeah okay we put again before dp4 db x 0.0 to put ok you download the program to the master upline here nothing finish and we run okay so we come back the data to slide here the monitor again i will put here 15 48 here 75 here and we come to the data from master in the slave qc monitor the value still not come here why come back to the main property here right area tp2 tb 3 right yes and this is db4 the data to slay why not move and let me check later from master pretty and click here okay okay and we download only chain okay so it's okay now you can see okay i will change the data a little bit here 99 23 and 50 we come to data from master okay later in the slide plc is chain already so it's done for this video i hope you can can do by yourself and any command just put in the command pack below this video thanks for your watching
Info
Channel: Automation Engineer
Views: 37,102
Rating: undefined out of 5
Keywords: automation engineer, scada, hmi, application, siemens, how to, tutorial, PLC, S7 1200, programming, input, tia portal, v15, plc, panel, communication, ethernet, profinet, 2 plc, GET, PUT
Id: btZXJMoNHUg
Channel Id: undefined
Length: 36min 14sec (2174 seconds)
Published: Fri Aug 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.