10/11/2016 2:34 PM | |
Joined: 11/29/2011 Last visit: 6/6/2024 Posts: 1358 Rating: (231) |
Hi, How about copy the Data into an optimised FB then copy it from there? Anyways just some ideas: How do you copy memory areas and structured data in STEP 7 (TIA Portal)? |
- What you read here, please check with manuals and your requirements. |
|
10/11/2016 5:20 PM | |
Posts: 32 Rating: (8) |
Hello MicroMan Thank's for fast answer! My answers and comments below
1 - I don't pretend to use "only store in load memory" blocks, as I don't have recipes; My program have some diferent services, and into DB have data like temperatures, humidity, PID settings, and some configurations that are used cross the program and HMI, without any recipe method, just one configuration to be saved, that can be modified during commissioning or in case that customer change it's installations, so I don't need to duplicate DB's just once. My intention is a copy just in case of disasters, to have some good recovery point (for instance in case of thunder storms). The pity is that must be done without engineering system, just from HMI when parameters are changed. 2- I don't want to copy some memory area, just to set the load values of DB's 3- I can't use optimised blocks due to HMI restrictions (indexed tags on confort panels, and high level scada restrictions) Retain data is not enough for my needs. In addition to previous posted code that was working into FB, when was not copying the desired global DB, was copying instance DB of the FB that contains the code (I realised due to project diferencies). Same code written into FC, gives 8093 error, so problem is that DB_ANY is not passing correctly the data or I'm not assigning it correctly with UINT_TO_DB_ANY function. However, I still din't found the way to manage a DB given from DB number or UINT_TO_DB_ANY is not doing what I expect. Also trying to do something like "#DB_ANY_DB_Number := %DB2;" does not work, still copies the instance data block of the FB; either with "#DB_ANY_DB_Number := "DataBlock2";" or changing FB from optimised to standard. So I guess that the only problem is that I'm not loading correct data do DB_ANY variable, or I missunderstand or is failing "UINT_TO_DB_ANY" function, and this is what I really need to understand and deal with, as far as I can't manipulate pointer manually as done on S5 or S7. What I pretend to do is some kind of translation of following code to SCL
Cheers! |
Follow us on