Abstract:
This document describes best practices for developing a database in Crimson 3.
Products:
All models programmed with Crimson 3 (excluding E3 units).
Use Case: Developing a Crimson 3 Database
This document will describe best practices to use when developing a Crimson 3 database. These best practices expand upon the details of the Crimson Runtime Overview.
Communications
General Communication Considerations
- Refer to the Cables and Drivers section of the Red Lion website for details on the driver.
- Refer to the Crimson Tech Notes section of the Red Lion Help Center to see if there is a Tech Note for the driver. Tech Notes will contain more information than what is found in the driver information sheet.
- Only enable devices that are connected to the Crimson device.
- Map data tags to the device. Gateway blocks should only be used for slave devices and protocol conversion.
- Communications can be disabled (Navigate to the Communication section, then click on Communications at the top of the Navigation Pane) for testing, just ensure that they are Enabled when testing is complete.
- Duplicating devices requires several steps.
- Each device needs configured individually.
- Data tags can be created by the import/export method covered in the Data Tags section of this document.
- Gateway blocks can also have similar import/export functionality:
1. Click on an existing gateway block.
2. Click the Export Mappings link.
3. Save the text file.
4. If changes are required (pointing to different tags), open the file in a text editor, otherwise skip to step 6.
5. Edit the tag/folder names and save the file.
6. Click on the next device.
7. Create a Gateway Block.
8. Set the start address of the Gateway Block.
9. Click the Import Mappings link.
Repeat for all blocks.
Ethernet Communications
- Limit the number of devices per protocol for faster communications.
- Set the Link Type to Dedicated Socket for Faster Communications.
Advanced Settings - Master Devices
Spanning Reads
Should be Enabled unless:
- there are registers that are unable to be read.
- there are consecutive registers that contain different data types. In particular, when using the various Siemens and Emerson ROC protocols.
Transactional Writes
Should be Enabled unless the speed of communications is more important than the order of the writes.
Preempt Other Devices
Enable this feature ONLY if writing to this device is more important than everything else in the system.
Favor UI Writes
Enable this feature to make the user interface more responsive. Take caution as this setting will interfere with the Transactional Writes setting.
Comms Delay
Use a non-zero value only if the rate of polling causes network problems.
Services
Time Manager
- The clock will be synchronized on startup. The units' clock is accurate to +/- one second per day, therefore syncing more than every 8 minutes (default setting) is unnecessary.
Sync Manager
- Data logs are only saved every two minutes, therefore syncing more often is unnecessary.
- The Record Log File is helpful for troubleshooting, but it should be disabled once the sync is functional, as to avoid excess traffic to the memory card.
Mail Manager
- When using SMS, ensure to include the country code in the phone number.
SQL Sync
- Data logs are only saved every two minutes, therefore syncing more often is unnecessary.
- The Record Log File is helpful for troubleshooting, but it should be disabled once the sync is functional, as to avoid excess traffic to the memory card.
Data Tags
Data Scaling
- As mentioned in the Crimson: Scaling Tech Note, make sure to use the lowest common denominator when entering in scaling values to avoid data overflow when calculating the output value.
Tag Import/Export
For a single device, or multiple, dissimilar devices:
Create and configure the communications section for all devices.
1. Create a tag of each type required for the application and map them to a device. Repeat this step for all devices.
2. Export the tags to a file.
3. Open the file with a text editor, Excel is convenient but may add formatting that is incompatible with the import.
4. Copy and paste lines as needed.
5. Modify the tag names and mappings.
6. Repeat steps 4 and 5 as needed.
7. Save and close the file.
8. Import the file into Crimson.
For multiple similar devices:
Create and configure the communications section for all devices.
1. Create tags in a folder for the first device, give the folder name the same name as the device the tags are mapped to.
2. Export the tags to a file.
3. Open the file with a text editor, Excel is convenient but may add formatting that is incompatible with the import.
4. Use Find and Replace to replace all instances of the device name with the name of the next device.
5. Save and close the file.
6. Import the file into Crimson.
7. Reopen the file and repeat steps 4-6 for all devices.
Display Pages
- Avoid using direct references to devices, use tags mapped to the device instead.
- Limit the amount of information on each page to only what is needed. The more data on a page, the slower the update rate.
- Resize external images prior to importing into Crimson. Tip: draw the image primitive to the desired size, then with the image primitive selected, look to the status bar at the bottom of the Crimson window and record the size. Resize the image to match the recorded value prior to importing it into Crimson.
Programs
- Programs that access the memory card (including use of FTP functions) should be set to run in a background task.
- Programs that contain long loops should be set to run in a background task.
- Programs that should run, even without good communications, should have the Run Anyway checkbox checked.
Web Server
- Care should be taken, using the security options or otherwise, to prevent tampering with the remote view and tag editing features.
Data Logger
- Data Log files are created based on time, with a datum point of January 1, 1997. It is advisable to set the Update Rate and the number of samples so that their product is the desired duration of the file. The default values are 60-second update rate and 1440 samples, this will generate one file every day, these files will begin at midnight. Setting the number of samples to 60 will result in one file being created every hour, at the top of the hour.
- Tag added to data logs are included in every comms scan, only log data that is required.
- When using the Log Enable feature, ensure that the enable condition is true for at least a full update time.
- For Triggered Snapshot log files, the trigger condition should be true for at least a full comms scan. Note: this may be several seconds for some applications.
Security
- Set the Default Access to the setting to be used on the majority of each item, this will save time setting the security settings on the individual tags.
Control
- Note: the default Cycle Time is 100ms, increasing this will increase how often the program runs, however, the communications scan to all modules and external devices will be the determining factor as to how fast the data is updated.
I/O Modules
-For the highest precision, scale non-temperature inputs to full scale (-30,000 to 30,000), then use tag scaling to convert to engineering units.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement