- Always use a UDINT variable named "NumRegisters" to set the size of the register (indirect) array (app.253.x)
- Always use a String variable named "PartNumber" to set the program's part number that is also used to select the INI file in PCCU. For example for Well Test: "2509032-001"
- Don't use numbers that start with 1,000,000 or 2,000,000 - those are for ABB.
- Don't do this will developing. Wait until you are ready to do a custom INI.
- INI Files:
- Always lock the INI index of all variables using the "Address" field of each variable, using a type code as part of the address.
- Use the program: "Gen INI G4.exe" to generate the first pass of a custom INI.
- Include Auto tree only in expert mode, if desired, normally only in the developer's INI: xxxxxxx-255.ini.
- Never include the "Symbol Table" or "System Variables" portion of the trees.
- Always include IEC pgm Command/Status page: (Msg Reads, IEC state, Start/Stop, Resource, Rescan, ...)
- Write protect items that the user should not change using command: rwa:1;
- Define unused columns with a blank comment and a write protect.
- Use Rowloop command for repeating lines.
- Package Files:
- Make both XFC and XRC packages if you have both kinds of meters.
- Only include the IEC pgm. Not ISAGRAF runtime.
- Always set the ISaGRAF resources for the project as follows:
- Embed Symbol Table = True
- Embedded Table Table Type = Complete
- Check Array Index = True
- Target = TOTALFLOW
- Memory for Retain = "\tfData\iec-%\2509xxx-rrr" (replace with correct part number)
- Cycle Time = 1000 ms (1 sec)
Monday, February 24, 2014
Best Programming Practices
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment