Simulation Functions
Simulation Functions
Simulation functions can be used to create OPC items that mimic many real world data sources. While each of the simulation functions provides different outputs, they have many common properties such as Rate, Low Limit, and High Limit. The Rate (which is also called Rate of Change) is used to specify how often the simulation value changes states. The Rate value is entered as a count of milliseconds with the value range being 10 to 3600000. This rate of change is completely independent of how often the client application may be reading data. Like a PLC, the simulation functions are always running in the background.
The Low Limit and High Limit
The Low Limit and High Limit properties can be used to specify the range or span of data generated by the simulation function. By using the Low Limit and High Limit property, users can produce simulation values that are offset by adjusting the span of the data. For the simulation functions that support limits, the format in which the range is entered is used to determine the data type of the simulation value. If, for example, a RAMP tag is entered with a Low Limit of 75 and a High Limit of 3000 the resulting OPC item is considered to be a Long data type. If the same RAMP is entered with a Low Limit of 75.123 and a High Limit of 3000.567 the resulting OPC item is considered to be Float data type. In these two examples, the default data format was either Float or Long, but any of the available data types can be chosen as the output format for any simulation function. The range specified by the Low and High Limits, however, must fit within the desired data type selection.
Unlike the register-based address above, there is no limit to the number of simulation functions that can be entered. Each simulation function that has unique properties is considered a new simulation value. Thus, when creating addressing simulation functions with the intent of reading the same value in multiple locations in the client application, it is important that the simulation function is entered the same way in each case.
Simulation Functions are Read-Only Objects
Simulation functions are Read Only objects. Once a client application begins reading data from a simulation function, the function continues to generate data until the item is deleted by a client application. When entering floating point properties, the simulation functions do not accept the entry of numeric values in exponential form.
Functions Definitions