TIA Portal #21: PLC Simulation using PLCSim V18 & PLCSim Advanced V5.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
TIA Portal includes its own PLC simulator called PLCSim that allows simulation of a large range of applications. As you know one of the significant changes of V18 is this PLc sim with a new appearance that has totally changed from previous version. So today I would like to talk about this plc Sim and how to simulate our program in Tia portal v18. We will also learn how to use plc sim advanced as another tool to simulate a plc. Open Tia portal and create a project. This can take a little bit. the first thing that I’ll do here is I’ll add a new device. A catalog will be opened to choose from. I’m going to choose one of these s7 1200 (twelve hundred) as our cpu. Cpu will be added to our system. This dialog wants you to use a password for the cpu to secure the system. If you don’t need a password then uncheck here. Press finish. Let’s make a simple program. Open the main program from program blocks. I wanne turn on and off an output with 2 buttons. So I’m going to use a normally open contact here and a coil as the output. I add also a contact with the address of internal memory, parallel to this part. Let’s call the buttons as PB1 and pb2. And output. Click on the CPU and then compile the program to see if it has problem. Ah we forgot to deactivate password for PLC. If you want to protect the cpu you can define a password here. Again compile the program. We don’t have any error. Now instead of downloading the program to a real physical PLC we can simulate it. To do that click on this icon start simulation. The dialog asks do you want to enable simulation in your project. Yes I do. This one says if we start simulation, other ethernet connections between Tia portal and your plc will be disabled. The new plc sim will open and a window from tia to connect to the plc sim. At first you will see the workspaces. Default workspace is created automatically. You can create a new workspace using this button. Or open a workspace from a specific path in your windows. Here you see the cpu list and type of your communication. Simulation table to change the value of the variables. And Event to simulate some events like hardware and diagnostic error OBs. What we need to do now go back to tia and press connect. Tia will connect to the plc sim. Press now load to Load the program into the simulated plc. Put the plc in run mode and then finish. Start monitoring. Be careful in this case Tia portal will automatically choose the interface and setting to connect to plc sim. If we turn off the plc sim we have to do it manually and download the program like what we do with a real plc. Except that here we select plcsim as the interface. I’m going to turn on the plcsim again. Tia could connect to the plc sim as soon as it is powered. Start search to find the virtual plc. And then load. As you know we can now change the IOs in different ways. One of them is right click on here and modify the tag to one or zero. But for now, it is not working because we have simulated a PLC and Tia is reading the signal from a simulated module. This input has currently zero or false value inside the plc so we cannot change it. But as you know the way to control the tags is using PLC Sim. Click on this icon here. And create a new sim table using this plus sign here. I’m going to add a row here. Like what we have in tag tables, write the name of the tags. Or here we can write the address. These tags are all a Boolean variable. We can also add the tags automatically. I’m going to delete the tags. Open properties and select the type of tags that you want to add. Then click on load selected tags. Maybe you need to add not all the tags. In this case Click on tap tags and check the instance. click on the tags that you want to add it to the table. They will be added to the table. Be careful if your table is not in run mode you cannot write here any value. At first you will see the initial value that are all false. Now let’s change the value of the tags. I’m going to modify pb1 as true so I type 1 here. Press enter. You see pb1 has now the value of true. And also the output is true. Type zero or false to make its value again zero. Let’s change pb2. We can even add another tag table and change the tags using different tables. I can change pb1 from 2 tag tables. Or If you want you can delete the tables from the tap properties. Here we are able to choose what to show. For example, if you don’t want to show name or comment uncheck it here. And also we can add another plc. But it’s possible to run just 2 plcs at the same time. Alright That was how we can use plc sim in V18 to simulate our plc. But we have also another option to simulate a plc and it is plc sim advanced. It will be installed with Tia portal v18 package. I’m going to open it. Important thing about plc sim advanced is that with this plc sim we cannot simulate 1200 plcs. If you open here and plc family you see we can choose just 1500 (fifteen hundred) and et200 series. So I add another plc of 1500 family to our tia program. Do not forget to give full access or write a password for plc. I’m going to copy this network. Define the tags. Before using plc sim advanced make sure you have activated the access of plc simulation to the tia program. It will be activated when we want to use normal plc sim because if you remember with a pop up windows tia asked us to activate it. But if it’s not activated somehow click on project and properties. Go protection tap and make sure "Support simulation during block compilation" option is checked. With plc sim advanced like plc sim v18 we have 2 options of operating mode. Plc sim mode is like what we did with the plc sim v18. Its internal communication inside the pc with tia portal. In this mode we cannot have a communication with a real plc using ethernet adapter. With tcp/ip mode but we can use this plc sim like a real plc and communicate with anther physical plc through ethernet protocol. This time let’s use tcp/ip mode. With the virtual adapter activated You have two options available: Local: Does not allow communication with the real Ethernet network. And Ethernet that Allows communication with the real Ethernet network. Here we don’t communicate with a real plc using ethernet so I chose local. Visual time scaling can make your virtual plc slower or faster. When you start PLCSIM Advanced, the virtual system time of the virtual controller starts with the system time of Windows. The virtual system time is based on the virtual clock. So if a scaling factor is used, the system time runs faster or slower. Here we disable the overrun detection for Motion Control with ob 91. When the check box is selected overruns are detected. If it semms complicated for you it is ok. Strict motion timing is a little bit advanced subject. We don‘t need this feature currently. Now you have to specify a name for this simulation. It can be any name. Write the ip address of the plc. You can find it from the hardware configuration. And subnet max. default gateway we don't need. Our plc is from 1500 family. Click on start. Go back to the Tia and download your program. Do not start simulation. We used tcp/ip mode so our plc is like a real physical plc. Use download to the device. This time we should select siemens virtual plc adaptor as the interface. Start search. If Tia could not find the virtual plc check the IP address of your ethernet adapter. they should be in the same range. Load the program to plc sim advanced. Here you see the plc is in run mode. And here turn on and off or delete the plc. Then we have additional settings, like the Runtime Manager Port that allows you to open a port for direct communication between different Runtime managers. And the virtual SIMATIC Memory Card that allows you to define a folder as the content of the memory card of the simulated PLC. These are not important for our level. One of the disadvantages of plc sim advanced is that it’s not possible like plc sim to create a tag table and change the value. We can just force the values from force table inside tia portal. If you need to change tags use plc sim v18. let’s create a new workspace. Create a folder to save the data. To open it click on action. Then icons of plc and Sim Table will appear. Add the plc. Like plc sim advanced select tcp/ip mode and local. then from properties select advanced for license type. Turn on the plc. For advanced mode we need to buy another license. I’m using 21 days trial license. write ip and subnet mask. Download the program. And With sim table change the tags value. Why we use the plc sim advanced is that With this plc sim we can simulate 16 plcs and make a communication between them with other type of communication like OPCUA. But with plcsim v18 its limited to just 2 plcs. Alright that was a video about 2 plc simulator in Tia portal V18. Hope this was helpful for you and you could use it if you don’t have a real plc. See you next video friends. bye
Info
Channel: Industrial Automation
Views: 2,122
Rating: undefined out of 5
Keywords: tia portal v17, tia portal v16, tia portal v15, tia portal tutorial center, tia portal tutorial, step 7 tia portal, tia portal basic, what is a tia portal, siemens tia portal, siemens step7, step7 tia portal tutorial, siemens tia portal tutorial, tia portal v15.1, plc simulation tia portal v16, tia portal plc sim, plc simulator, plcsim, plcsim v16, plcsim siemens, plcsim v17, plc sim, simulation, tia simulation, plcSim V18, PLCSim Advanced, TCP/IP, Ethernet#, V5.0, V18
Id: 1c3lmWeLx3A
Channel Id: undefined
Length: 19min 20sec (1160 seconds)
Published: Sun Nov 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.