Once you open the DB block, you'll find a customize option under the menu. From the pop-up window, you can locate the button to generate the source file.
After restoring, the source files are saved in the 'sources' folder. You can open your existing source files and compile them to generate new ones.
These source files can also be exported as AWL files, which can be easily edited in other environments like Notepad or Excel. They can be copied, modified, or even re-imported back into the sources section for further use.
You can also directly create a DB using SCLsource or STLsource. Additionally, any existing DB can be converted into a source file by navigating to "File" > "Generate Source".
This approach makes it much easier to manage variables within the DB. For instance, you can copy the variables into a text document or Word file for editing, which enhances flexibility and usability.
Here's an example of a DB1 SCL source code:
DATA_BLOCK DB1
//
// Block Comment...
//
STRUCT
Tag01: REAL; // Pressure
Tag02: INT; // Temperature
Tag03: BOOL; // High Limit Alarm
Tag04: WORD; // IW
END_STRUCT
BEGIN
Tag01 := 0.0;
Tag02 := 2;
Tag03 := FALSE;
Tag04 := W#16#0;
END_DATA_BLOCK
By using this method, you can streamline your development process and improve collaboration with team members who may prefer working in different tools or environments.
Dongguan Pinji Electronic Technology Limited , https://www.iquaxusb4cable.com