6/5/2013 4:21 PM | |
Joined: 8/5/2009 Last visit: 7/4/2022 Posts: 156 Rating: (7) |
Hi, I'm trying the make some standard blocks for s7 300 tia v11 Motor 1 direction, 2 direction, 2 speeds, freq-drive, valve digIn digOut AnalogIn AnalogOut i still doubt between Instanc fb and fc with global db i made for each block type an udt with always 32 bytes (some spares) Now i'm testing the differend posibilitys FC with input block number - in the begin and end of the block the data is loaded/ saved in the db using AR1/AR2 ( only the used bytes, not the spares) FC with 32bytes UDT as InOut Multi instanc FB also with 32 bytes to test Tested with 50 to 300 block calls Tested with IM151-8 PN CPU FC blocks generating a much higer cpu cyle time then the multi instance fb ?? the only thing i don't like with FB multi instance is when doing a change the DB has to be regenerated (All values to zero) why the big difference in cycle time? 50 FB calls +- 2 ms 50 FC Calls +- 15ms 240calls = 66 ms AttachmentStandaard_UDT.pdf (434 Downloads) |
6/6/2013 2:35 AM | |
Joined: 10/7/2005 Last visit: 11/7/2024 Posts: 3026 Rating: (1057) |
Hello dendhondt to start with, the executiontime for a Block is simply the sum of the execution time of all instructions that are in the Block. You can find out how long each instruction needs to execute in the SIMATIC S7-300 Instruction list S7-300 CPUs and ET 200 CPUs. Where it gets tricky to work this out is in the case of where you use a UDT as a Block Parameter (e.g. IN_OUT) and thenaccess the individual elementsof the UDT insidethe FC. If so, Step 7 creates a anwfull lot of"hidden" inddirect addressing related code to get the value of these UDT variables and you'll find out more about this in the thread Shall UDT make the difference in CPU Scan Time?. I hope this helps |
Cheers |
|
6/8/2013 1:07 PM | |
Joined: 8/5/2009 Last visit: 7/4/2022 Posts: 156 Rating: (7) |
Hi, Does somebody have an idee how to copy udt from INOUT parameter to Temp parameter ? |
Follow us on