8/10/2022 10:43 AM | |
Joined: 5/3/2017 Last visit: 5/21/2024 Posts: 673 Rating: (217) |
Hi Cory, yes you can create your own FC/FB block there is no restriction in PCS 7, but you have to consider that it is maybe easier to understand a CFC chart with APL (help is for every block available) then a own create block for another person. Also you get a full testet library from Siemens that will updatet on regular basis. On the other hand it is wise to cluster multiple used function in own block. If you create your own block you can load the CPU in run, there is no differentiation between a APL-block and your own created block. But you have to be careful if you change the created block. If you change something at the interface (delete, add or rename an input, output or static variable) you have to perform a full download. Also you can freely use every language (LAD, FBD, STL or SCL) to create your own block. LAD and FBD are the easiest language and simple to understand, but not all functionality can be used with these two languages. The STL language offers you all functionality but it hard to understand. I recommend to program a FB or FC the language SCL. This is a programming language like C or PASCAL, so you have instructions like IF, WHILE or FOR (for more information see the manual S7-SCL). If you already have your functionality in CFC it maybe helpful to use the CFC functionality "chart in chart". With "chart in chart" functionality from the CFC it is possible to create a CFC in the other CFC. In the sub CFC you can copy your APL-blocks and define the input and output signals. On the higher CFC (the normal CFC) you can see the inputs and outputs from the sub CFC and it looks like a create FB/FC block and it much easier to copy. With regards |
Follow us on