Simulating values in Elipse E3/Power with Elipse Random Driver.

In addition to Elipse Modbus Simulator, you can also use the Elipse Random driver to simulate values in an Elipse E3 application. The driver’s goal is to return values to the application tags, allowing for different simulation profiles to be set up according to each tag’s parameters.
This feature is of great help when developing applications that need tests, since the driver accepts both PLC and Block Tags as parameters. At run time, each tag is linked to a simulation category, and their values are received according to their category’s configuration.


Driver setting’s Random tab.

The Elipse Random driver searches for variation patterns in the “Random.xml” file, which must be inserted into the same E3 application folder. This.xml file features three initial profiles with different read variation, delay, and percentage settings:


Initial XML file.
Random Default profile: all tags are assumed as random (DefaultAnalog).
DNP FastRandom and DNP SlowRandom profiles: tags are assumed as follows

  • Tags assumed as discrete (0,1): N2=5 and N3=1201; N2=1 and N3=202; N2=101 and N3=101;
  • Tags assumed as discrete (“”): N2=4 and N3=45; N2=4 and N3=46;
  • Tags assumed as random (DefaultAnalog): all the others except the ones listed above

In this case, the differences between two DNP profiles DNP (Fast/Slow) are their first and last row each, with edited values in the following properties: StartDelay, WriteDelay, ReadVariation, Errors and ReadDelay.

Each XML configuration files can features several different features. For further information on the configuration procedures, check the driver’s manual under XML Configuration file -> Profiles | Categories.

USAGE EXAMPLE:
After inserting the Elipse Random driver into the application, you can select the desired profile for simulating tags in this driver. For this example, we will use a profile that simulates tag values according to its N parameters, as set up in the initial XML file:

DNP profile

Random Default profile

You can edit the XML configuration file via text editor, or the directly in the driver’s Properties Window via Edit the configuration XML below:


Edit the configuration XML below.

Another example of XML configuration file:

 
  
    
      
    
  
 

To test the configuration above, select Edit the configuration XML below, insert the code, select the desired profile, and press Check!

In this case, the tags whose parameters are N2 = 1 and N3 = 1 are in the category SlowDefaultAnalog; their analog values variate between 0 (zero) and 1000 (inherited from the category above, DefaultAnalog), and have a 500 milliseconds delay for all read and write operations.

The tags whose parameters are N2 = 1 are under the DefaultAnalog category; their analog value variate between 0 (zero) and 1000, and have a 100 milliseconds delay for all read and write operations (the default delay set up at the Profile).
The remaining tags belong to neither category, and feature the profile’s settings: they return digital values (0 or 1), and have a 100 milliseconds delay for all read and write operations.

SIMULATING PRE-EXISTING APPLICATIONS
The Elipse Random driver can be employed to simulate the complete data collection from a pre-existing application. To add a driver to the application, you need only copy the Random.dll file over the DLL files of the drivers used in the application; no settings from pre-existing projects will require any alterations.

To do so, first unzip the contents from the Random.zip file (Random.xml, Random.dll, ReplaceDrivers.bat and RollbackOriginalDrivers.bat) at the application’s root directory and execute the ReplaceDrivers.bat file. This script searches for all the DLL files in the application’s subfolder (for example, Unit1\DNPMaster.dll), generates its security copy (for example, Unit1\DNPMaster.dll.original), and copies the Elipse Random driver over the DLL file (for example, copy Random.dll Unit1\DNPMaster.dll). The end result is: the DLL file names are maintained, but now all drivers are Random. This procedure must only be executed when the application has already stopped and closed.

Then, customize the Random.xml file, which is used by all Drivers in the application. Different profiles can be created in the configuration file for different types of Drivers, just by employing the driver’s name in each profile’s DLL attribute.  For example, if your application has the following drivers: Modbus.dll, DNPMaster.dll, and BACnet.dll, your configuration file will look like this:


 
  DNPMaster settings
 
 
  Modbus settings
 
 
  BACnet settings
 

 
When the Elipse E3 application is executed, each driver will spot its respective Random.xml file and load the profile corresponding to its DLL name. To see whether it was properly loaded, check the driver settings via E3Studio, or go to the file properties on Details tab:

To return to the original drivers, execute the RollbackOriginalDrivers.bat file, replacing the .dll files with its corresponding .dll.original files.

The Elipse Random Driver can be downloaded from our website.
 

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *