Enter Report Here CTA 2045 Software Manual
User Manual: Pdf
Open the PDF directly: View PDF .
Page Count: 71
Download | |
Open PDF In Browser | View PDF |
CTA-2045 Simulator User’s Manual Version 16.12.07 NOTICE: This software manual is provided by the Electric Power Research Institute, Inc., (EPRI) "AS IS" and without customer support beyond such embodiments within the distribution of the associated software that may or may not provide such support. CTA-2045 Simulator User’s Manual Version 16.12.07 Software Manual, May 2017 EPRI Project Manager C. Thomas ELECTRIC POWER RESEARCH INSTITUTE 3420 Hillview Avenue, Palo Alto, California 94304-1338 ▪ PO Box 10412, Palo Alto, California 94303-0813 ▪ USA 800.313.3774 ▪ 650.855.2121 ▪ askepri@epri.com ▪ www.epri.com TERMS OF USE TERMS OF USE COPYRIGHT © 2017 ELECTRIC POWER RESEARCH INSTITUTE, INC. PERMISSION IS HEREBY GRANTED, FREE OF CHARGE, TO ANY PERSON OBTAINING A COPY OF THIS DOCUMENTATION (THE "DOCUMENT"), TO DEAL IN THE DOCUMENT WITHOUT RESTRICTION, INCLUDING WITHOUT LIMITATION THE RIGHTS TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THE DOCUMENT, AND TO PERMIT PERSONS TO WHOM THE DOCUMENT IS FURNISHED TO DO SO, SUBJECT TO THE FOLLOWING CONDITIONS: THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL COPIES OR SUBSTANTIAL PORTIONS OF THE DOCUMENT. NEITHER THE NAME OF THE COPYRIGHT HOLDER NOR THE NAMES OF ITS CONTRIBUTORS MAY BE USED TO ENDORSE OR PROMOTE PRODUCTS DERIVED FROM THIS DOCUMENT WITHOUT SPECIFIC PRIOR WRITTEN PERMISSION. THE DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE DOCUMENT. REFERENCE HEREIN TO ANY SPECIFIC COMMERCIAL PRODUCT, PROCESS, OR SERVICE BY ITS TRADE NAME, TRADEMARK, MANUFACTURER, OR OTHERWISE, DOES NOT NECESSARILY CONSTITUTE OR IMPLY ITS ENDORSEMENT, RECOMMENDATION, OR FAVORING BY EPRI. EPRI PREPARED THIS REPORT. ii SOFTWARE DESCRIPTION The CTA-2045 simulator software acts as a smart grid device (SGD) or universal communications module (UCM) for the purposes of testing and evaluating devices that are compliant with the CTA-2045 standard. Description This application provides a fully functional simulator for both SGDs and UCMs. Through the use of different cable sets, both AC and DC form factors are supported. This manual describes how to use this software to emulate both device types and all three message categories of data link, basic demand response (DR) messages, and intermediate DR messages. Benefits and Value This application has a number of uses to benefit utilities, manufacturers, and vendors. • • • • Simulate an SGD – In this mode, the application can be used to test UCMs to evaluate their compliance with the CTA-2045 standard. Simulate a UCM – In this mode, the application can be used to test SGDs to evaluate their compliance with the CTA-2045 standard. Simulate both SGD and UCM – In this mode, the application can act as a tutor for developers who are unfamiliar with the CTA-2045 standard in understanding how to implement the standard by viewing example exchanges and performing “what if” testing. Act as an automated test system – Using the test script mode, repetitive testing can be simplified and allow product testing with minimal human involvement. This simulator application may assist in reducing the cost of product evaluations, development, and testing. Platform Requirements This software has been tested on Microsoft Windows 10 and Windows 7, both 32- and 64-bit. It should also operate on all current Microsoft platforms such as Windows Vista, and Windows 8. iii ABSTRACT The CTA-2045 simulator software acts as a smart grid device (SGD) or universal communications module (UCM) for the purposes of testing and evaluating devices that are compliant with the CTA-2045 standard. Description This application provides a fully functional simulator for both SGDs and UCMs. Through the use of different cable sets, both AC and DC form factors are supported. This manual describes how to use this software to emulate both device types and all three message categories of data link, basic demand response (DR) messages, and intermediate DR messages. Keywords CTA-2045 CEA-2045 Simulator Smart Grid Device (SGD) Universal Communication Module (UCM) Demand Response v CONTENTS 1 CTA-2045 SIMULATOR OVERVIEW ...................................................................................1-1 EPRI CTA-2045 Simulator Specifications ...........................................................................1-1 Functions Currently Supported ...........................................................................................1-1 Link Layer Messages....................................................................................................1-1 Basic Demand Response .............................................................................................1-1 Intermediate Messages ................................................................................................1-2 Bug Tracking and Improvements ..................................................................................1-2 2 BUILDING THE APPLICATION FROM SOURCE ................................................................2-1 Install Visual Studio 2015 or Visual Studio Community Edition ...........................................2-1 Build the Application ...........................................................................................................2-1 3 INSTALLATION AND STARTUP .........................................................................................3-1 Installation of EPRI Software at Client Site .............................Error! Bookmark not defined. If you experience difficulties accessing the application ........... Error! Bookmark not defined. Installation Steps ................................................................................................................3-1 Cables and Connection ......................................................................................................3-1 AC Form Factor Cables ................................................................................................3-1 DC Form Factor Adaptors.............................................................................................3-2 Simulator Panel Layout ......................................................................................................3-3 Configuration Settings ..................................................................................................3-3 Data Displays ...............................................................................................................3-5 Command Tabs ............................................................................................................3-5 Running the Simulator ........................................................................................................3-6 4 COMMAND TABS ................................................................................................................4-1 Device Information .............................................................................................................4-1 Device Info ...................................................................................................................4-2 Get Device Info.............................................................................................................4-3 Msg Types Supported ..................................................................................................4-3 Max Payload.................................................................................................................4-4 Temp Get/Set ...............................................................................................................4-5 Commodity ...................................................................................................................4-6 Common Commands .........................................................................................................4-8 Change Bit Rate ...........................................................................................................4-8 Simulate Errors.............................................................................................................4-9 Timing Variables .........................................................................................................4-10 Pass Through .............................................................................................................4-12 Universal Communication Module Commands .................................................................4-12 Basic Commands .......................................................................................................4-13 Query Operating State................................................................................................4-17 vii Comm Status..............................................................................................................4-17 Time Sync ..................................................................................................................4-17 Intermediate ...............................................................................................................4-18 Smart Grid Device Commands .........................................................................................4-19 Operating State ..........................................................................................................4-20 Get UTC Time ............................................................................................................4-21 Test Scripts ......................................................................................................................4-21 Available Script Commands........................................................................................4-21 Testing a Script ..........................................................................................................4-22 Running a Script .........................................................................................................4-22 Command List ............................................................................................................4-22 Real Device Options.........................................................................................................4-25 Common Functions ....................................................................................................4-26 UCM Functions...........................................................................................................4-27 SGD Functions ...........................................................................................................4-27 5 ADDITIONAL TUTORIALS ...................................................................................................5-1 Simultaneously Simulate Both UCM and SGD ...................................................................5-1 Test Cases .........................................................................................................................5-3 Shed Command ...........................................................................................................5-3 Override Command ......................................................................................................5-5 Scripting Example ........................................................................................................5-7 6 CABLE SET INFORMATION ................................................................................................6-1 AC Cable............................................................................................................................6-1 Schematic ....................................................................................................................6-1 DC Cables ..........................................................................................................................6-2 Loading the Application to the Arduino Uno ..................................................................6-2 A TEST SCRIPT EXAMPLE ................................................................................................... A-1 viii LIST OF FIGURES Figure 2-1 Setting platform and configuration ...........................................................................2-1 Figure 2-2 Cleaning solution ....................................................................................................2-2 Figure 2-3 Building solution ......................................................................................................2-2 Figure 3-1 Installing Drivers .....................................................................................................3-1 Figure 3-2 AC Cable Set – SGD on the left and UCM on the right ...........................................3-2 Figure 3-3 Simulator acting as UCM connected to AC form factor SGD ...................................3-2 Figure 3-4 DC form factor SGD (left) and UCM (right) adaptors ...............................................3-3 Figure 3-5 Configuration settings .............................................................................................3-4 Figure 3-6 Real Device Simulation Mode .................................................................................3-4 Figure 3-7 Data exchange for a shed load command ...............................................................3-5 Figure 3-8 Command Tabs ......................................................................................................3-6 Figure 3-9 Driver Installation ....................................................................................................3-6 Figure 3-10 Running the Simulator...........................................................................................3-7 Figure 3-11 Select Comm Port .................................................................................................3-8 Figure 3-12 Select Bit Rate ......................................................................................................3-8 Figure 3-13 Select Simulated Device .......................................................................................3-9 Figure 3-14 Enter Log File Location .........................................................................................3-9 Figure 3-15 Connect to Port .....................................................................................................3-9 Figure 4-1 Device Information Tab ...........................................................................................4-1 Figure 4-2 Device Info Tab .......................................................................................................4-2 Figure 4-3 Device Info Tab .......................................................................................................4-3 Figure 4-4 Message Types Supported Tab ..............................................................................4-4 Figure 4-5 Max Payload Tab ....................................................................................................4-5 Figure 4-6 Temperature Get/Set Tab .......................................................................................4-6 Figure 4-7 Commodity Tab.......................................................................................................4-7 Figure 4-8 Common Commands Tab .......................................................................................4-8 Figure 4-9 Change Bit Rate Tab ..............................................................................................4-8 Figure 4-10 Simulate Errors Tab ............................................................................................4-10 Figure 4-11 Timing Variables .................................................................................................4-11 Figure 4-12 Timing Variables Tab ..........................................................................................4-11 Figure 4-13 Pass Through Tab ..............................................................................................4-12 Figure 4-14 UCM Commands Tab .........................................................................................4-13 Figure 4-15 Curtailments Tab.................................................................................................4-14 Figure 4-16 Grid Guidance Tab ..............................................................................................4-14 Figure 4-17 Next Period Relative Price Tab ...........................................................................4-15 Figure 4-18 Present Relative Price Tab..................................................................................4-15 Figure 4-19 Power Level Tab .................................................................................................4-16 Figure 4-20 Time Remaining Tab ...........................................................................................4-16 Figure 4-21 Query Operating State Tab .................................................................................4-17 Figure 4-22 Comm Status Tab ...............................................................................................4-17 Figure 4-23 Time Sync Tab ....................................................................................................4-18 Figure 4-24 Set UTC Tab .......................................................................................................4-18 Figure 4-25 Autonomous Cycling Tab ....................................................................................4-19 Figure 4-26 SGD Commands Tab ..........................................................................................4-20 Figure 4-27 Operating State Tab ............................................................................................4-20 Figure 4-28 Get UTC Time Tab..............................................................................................4-21 Figure 4-29 Test Scripts Tab ..................................................................................................4-21 Figure 4-30 Real Device Options Tab ....................................................................................4-26 ix Figure 4-31 Common Functions Tab ......................................................................................4-27 Figure 4-32 UCM Functions Tab ............................................................................................4-27 Figure 4-33 SGD Response Options ......................................................................................4-29 Figure 4-34 Comm Status Timeout ........................................................................................4-29 Figure 4-35 SGD Internal Clock Support ................................................................................4-30 Figure 5-1 Two Simulator Instances .........................................................................................5-1 Figure 5-2 Select Appropriate Settings .....................................................................................5-2 Figure 5-3 Set Real Device Simulation Mode ...........................................................................5-2 Figure 5-4 Send Shed Load Command ....................................................................................5-3 Figure 5-5 UCM shed command example ................................................................................5-4 Figure 5-6 SGD shed command results example .....................................................................5-5 Figure 5-7 Unchecked Customer Override ...............................................................................5-6 Figure 5-8 SGD customer override command results example ................................................5-6 Figure 5-9 UCM customer override command results example ................................................5-7 Figure 5-10 SGD scripting simulation settings ..........................................................................5-8 Figure 5-11 Test script demonstration ......................................................................................5-9 Figure 5-12 Test script after validation .....................................................................................5-9 Figure 5-13 Script example results .........................................................................................5-10 x LIST OF TABLES Table 1-1 Link Layer Messages ...............................................................................................1-1 Table 1-2 Basic Messages .......................................................................................................1-1 Table 1-3 Intermediate Messages ............................................................................................1-2 xi EPRI Proprietary Licensed Material 1 CTA-2045 SIMULATOR OVERVIEW EPRI CTA-2045 Simulator Specifications To assist integrators and OEMs with implementing the CTA-2045 standard, EPRI has developed a software application that developers can use to test the link and application layers of interfaces designed to support it. This tool should be used by those developing hardware for EPRI’s CTA2045 Field Demonstrations Project to help ensure interoperability between products. Functions Currently Supported The following functions are currently supported in the EPRI CTA-2045 Simulator: Link Layer Messages Table 1-1 Link Layer Messages Description Codes Link ACK 0x06 0x00 Message Type Supported Bit Rate Negotiation Max Payload Size 0x08 0x## 0x00 0x00 Link NAK 0x15 0x## (error code) 0x08 0x03 0x## 0x## 0x17 0x08 0x03 0x## 0x## 0x19 Basic Demand Response Table 1-2 Basic Messages Description Shed End Shed Application ACK Application NAK Power Level Present Relative Price Next Relative Price Time Remaining Critical Peak Event Grid Emergency Grid Guidance Comm Connection Status Customer Override State Query State Query Response Sleep Wake Codes 0x08 0x01 0x## 0x## 0x01 0x08 0x01 0x## 0x## 0x02 0x08 0x01 0x## 0x## 0x03 0x08 0x01 0x## 0x## 0x04 0x08 0x01 0x## 0x## 0x06 0x08 0x01 0x## 0x## 0x07 0x08 0x01 0x## 0x## 0x08 0x08 0x01 0x## 0x## 0x09 0x08 0x01 0x## 0x## 0x0A 0x08 0x01 0x## 0x## 0x0B 0x08 0x01 0x## 0x## 0x0C 0x08 0x01 0x## 0x## 0x0E 0x08 0x01 0x## 0x## 0x11 0x08 0x01 0x## 0x## 0x12 0x08 0x01 0x## 0x## 0x13 0x08 0x01 0x## 0x## 0x14 0x08 0x01 0x## 0x## 0x15 1-1 EPRI Proprietary Licensed Material Time Sync Load Up 0x08 0x01 0x## 0x## 0x16 0x08 0x01 0x## 0x## 0x17 Intermediate Messages Table 1-3 Intermediate Messages Description Device Information Get/Set UTC Time Get/Set Temperature Offset Get/Set Temperature Setpoint Get Present Temperature Autonomous Cycling Commodity Read & Subscription Codes 0x08 0x02 0x## 0x## 0x01 0x08 0x02 0x## 0x## 0x02 0x08 0x02 0x## 0x## 0x03 0x02 0x08 0x02 0x## 0x## 0x03 0x03 0x08 0x02 0x## 0x## 0x03 0x04 0x08 0x02 0x## 0x## 0x04 0x08 0x02 0x## 0x## 0x06 Bug Tracking and Improvements If errors are encountered while installing or running the simulator; or to make recommendations to improve the application, please contact EPRI. Please submit a description of the error or recommendation to cthomas@epri.com. 1-2 EPRI Proprietary Licensed Material 2 BUILDING THE APPLICATION FROM SOURCE Install Visual Studio 2015 or Visual Studio Community Edition This application builds using Microsoft Visual Studio 2015. At the time of this document publication, Visual Studio Community 2015 was available from https://www.microsoft.com/enus/download/details.aspx?id=48146. Follow the instructions from Microsoft to install the development environment. The default install includes Visual Basic which is all you need to complete the build. Build the Application Download the source code from the GitHub repository. If the zip file is selected, unzip it in the Documents\Visual Studio 2015\Projects\CTA2045Sim folder. The CTA2045Sim.sln file should be in the top level of the CTA2045Sim folder. Double click the CTA2045Sim.sln file and visual studio should open the project. It will take a few minutes the first time the program is run. Select the desired solution platform and solution configuration in the two dropdown boxes as shown in Figure 2-1. Figure 2-1 Setting platform and configuration Select Build/Clean Solution as shown in Figure 2-2. 2-1 EPRI Proprietary Licensed Material Figure 2-2 Cleaning solution Select Build/Build Solution as shown in Figure 2-3. The application should build without errors. Figure 2-3 Building solution The executable will be placed in the bin folder. 2-2 EPRI Proprietary Licensed Material 3 INSTALLATION AND STARTUP Installation Steps The application is provided to participants of the CTA-2045 Field Demonstrations Project. Unzip the files into a temporary location on your computer for access. IMPORTANT: Before running the setup.exe file, the serial drivers must be installed. Connect the USB adapters to the computer and allow time for the communication port to register with the operating system. During installation of the serial drivers, you should see a notification similar to the one shown in Figure 3-1. Figure 3-1 Installing Drivers Once these drivers are installed, double click on the Setup.exe file. Follow the prompts to complete the installation. As always, it is a good idea to uninstall old versions before loading a new revision. Cables and Connection CTA-2045 has two form factors, AC and DC. The AC form factor is larger and provides access to the AC power lines, making power line communications a possibility. The UCM is responsible for converting the AC line voltage to the DC power required to supply the module. The DC form factor is a much smaller physical size for the UCM module but depends on the SDD to provide the 3.3VDC required to supply the module. It cannot support PLC since the AC power connections are not available. The simulator cable set supports both of these form factors, so both AC and DC devices can be tested. The connection method varies slightly depending on the form factor under test. AC Form Factor Cables The AC cables, one for simulating an SGD and one for a UCM, are shown in Figure 3-2. 3-1 EPRI Proprietary Licensed Material Figure 3-2 AC Cable Set – SGD on the left and UCM on the right To use the AC form factor cables, insert the USB connector end into the PC and connect the other end to the device to be tested. For the SGD cable, plug the AC power cord into a standard 120VAC outlet to provide power to the UCM under test. Allow time for the communication port to be discovered and follow steps 1-7 listed above in ‘Running the Simulator.’ Figure 3-3 shows a notebook computer connected to a small water heater using an AC cable. Figure 3-3 Simulator acting as UCM connected to AC form factor SGD DC Form Factor Adaptors To use the DC form factor adaptors the Arduino drivers must first be loaded on the PC running the simulator software. This applies to both the UCM and SGD adaptors. The DC form factor adaptors are shown in Figure 3-4 with the SGD adaptor on the left and the UCM adaptor on the right. 3-2 EPRI Proprietary Licensed Material Figure 3-4 DC form factor SGD (left) and UCM (right) adaptors To load the drivers: • Connect a USB cable between the adaptor and the PC. • After plugging in the USB cable, Windows will try to install the driver and fail. Dismiss any notifications of the failure and open Internet Explorer. Navigate to the Arduino website (http://arduino.cc/en/guide/windows). The drivers for the Arduino Uno (used in the EPRI DC form factor adapters) and instructions for installing them can be found at this site. If the provided link to the drivers should fail, then navigate to http://arduino.cc/en/, click on the Download menu item, and Windows Installer. • Once Windows acknowledges the proper installation of the device driver the simulator will be able to communicate with the connected device. PLEASE NOTE: If the device under test is a UCM, insert the UCM into the SGD DC form factor adaptor. If the device under test is an SGD, insert the tethered UCM module of the DC form factor adaptor into the SGD device under test. The simulator should now be ready to operate normally. When using the DC form factor adaptors, keep in mind that the bit rate of the simulator must be set to 115200. Allow time for the communication port to be discovered and follow the steps listed under ‘Running the Simulator.’ Simulator Panel Layout The simulator panel is broken into three basic areas. Configuration Settings The area at the top left corner of the simulator panel contains the configuration settings. Here you can manually select the communications port to use, set the bit rate, connect or disconnect to a communication port, select the device type to be emulated (UCM or SGD), refresh the communication port list, select the real device simulation mode, set the location for the log file, disable the logging function, and select the verbose feature. See Figure 3-5. 3-3 EPRI Proprietary Licensed Material Figure 3-5 Configuration settings Real Device Simulation (RDS) Mode Among the configuration settings is a checkbox labeled “Real Device Simulation Mode,” which is unchecked by default. If this box is left unchecked, the simulator is in manual mode and message exchanges between devices will not change the responses generated by the simulator. For example, if the simulator is acting as the SGD, a shed command received will not change the operating state returned by an operating state query. Only the operator changing the state will alter the response. See Figure 3-6. Figure 3-6 Real Device Simulation Mode If the “Simulate device responses” checkbox is marked, RDS mode is enabled. This function allows the simulator to respond to commands like a real device. Turning this mode on alone does not make the simulator start sending or replying to messages automatically, but enables a new Real Device Options tab which holds options for functions detailed below. At this time, many but not all messages are automated. Disable Log File The checkbox located inside the log-file group box labeled “Disable Log File” prevents any data from being written to the log file if it is checked. This includes data collected during the operation of test scripts. If left unchecked, data will be written to a .csv file. 3-4 EPRI Proprietary Licensed Material Verbose The checkbox located inside the log-file group box labeled “Verbose” adds additional information to the log file. Normally, only the hex strings representing the data exchanged between the UCM and the SGD are recorded with a timestamp and direction. When the verbose checkbox is checked, an additional line of information is displayed under the hex string with a human readable version of the information passed between the devices. Data Displays Whenever data is exchanged with a connected device, the data is displayed in the Serial Data text box on the left side of the application window. Each line begins with a timestamp in seconds since 1/1/2000. Next, the simulator prints “Sent” if it sent data to the connected device or “Recv” if it received data from the connected device. The hexadecimal data is then displayed with a forward slash “/” separating each byte. The exchange shown below is the result of a shed load command. If the verbose option is checked, a human readable line will be printed after each byte string as illustrated in Figure 3-7. Figure 3-7 Data exchange for a shed load command The data displayed in this text box is limited to the most recent 4096 characters. To view older data, look at the log file which is not limited in size. Command Tabs The area at the right side of the simulator panel contains the command tabs. The functions enabled in these tabs change based on the device type being emulated, SGD or UCM. See Figure 3-8. 3-5 EPRI Proprietary Licensed Material Figure 3-8 Command Tabs Running the Simulator To use the simulator: 1. Connect the device to be tested to the USB-to-RS485 adaptor or DC adaptor (depending on the device’s form factor, AC or DC). Allow time for the communication port to register with the operating system. You should see a notification that the USB device was successfully registered as shown in Figure 3-9. Figure 3-9 Driver Installation Note: Do not start the simulator application when the USB adapter is not connected to the PC. Doing so will cause an error notification to show. 2. Run the application by selecting it from the Windows Start menu as shown in Figure 3-10. 3-6 EPRI Proprietary Licensed Material Figure 3-10 Running the Simulator 3. After the application opens, click the arrow in the Com Port dropdown box as shown in Figure 3-11 to select the adaptor from the list of available communication ports. If the port to which you have connected your device does not show up in the list, try clicking the refresh button. The simulator does not automatically update the available ports except at startup. 3-7 EPRI Proprietary Licensed Material Figure 3-11 Select Comm Port 4. Select the bit rate if necessary (default is 19200 for the AC form factor). The DC form factor requires a bit rate of 115200. See Figure 3-12. Figure 3-12 Select Bit Rate 5. Select the device to be simulated: Universal Communication Module (UCM) or Smart Grid Device (SGD). See Figure 3-13. 3-8 EPRI Proprietary Licensed Material Figure 3-13 Select Simulated Device 6. Click the browse button as shown in Figure 3-14, navigate to the desired location for the log file, and enter a name for the log file. Figure 3-14 Enter Log File Location 7. Click Connect as shown in Figure 3-15. Figure 3-15 Connect to Port 3-9 EPRI Proprietary Licensed Material 4 COMMAND TABS There are three levels of tabs in the right pane, with six choices on the top level: • Device Information • Common Commands • UCM Commands • Smart Grid Device Commands • Test Scripts • Real Device Options The lower tabs change based upon which tab in the upper level is chosen. Device Information Device Information Tab Figure 4-1 Device Information Tab This tab (shown in Figure 4-1) provides six sub-tabs: • Device Info • Msg Types Supported • Set Max Payload 4-1 EPRI Proprietary Licensed Material • Temperature Offset • Commodity Device Info This tab (shown in Figure 4-2) provides the data entry area for information returned from a Device Info Request. Default data is loaded, but it can be modified as needed. Figure 4-2 Device Info Tab 4-2 EPRI Proprietary Licensed Material Get Device Info This tab (shown in Figure 4-3) allows the operator to generate a Query Device Info message and display the result on the screen. The simulator has a block of default data that it loads into the device information on startup. This data can be edited by navigating to Device Information/General Info. To query the connected device’s information, navigate to Device Information/ Get Device Info. Click the button Query Other Device. Figure 4-3 Device Info Tab Msg Types Supported This tab (shown in Figure 4-4) has two functions. The top section allows messages to be added to the supported list, and the lower section allows the user to query the connected device to see what types of messages it supports. To add a message pair to the simulator as being supported, enter the hex values in the MSB and LSB text boxes and click the Add button. To remove a message from being reported as supported, enter the hex values in the MSB and LSB text boxes, or select the message type in the box and click the Remove button. To query the connected device to determine if it supports a specific message type, enter the hex opcodes and click the Send Query button. The Code Lookup button provides a list of message types. The message types supported by the connected device will appear in the list box labeled “Other Device.” The refresh button will clear and relist the contents if needed. 4-3 EPRI Proprietary Licensed Material Figure 4-4 Message Types Supported Tab Max Payload This tab (shown in Figure 4-5) provides a set of radio buttons to set the maximum payload of the device. Click the desired value to be returned for a maximum payload request. The simulator defaults to a maximum payload size of 2 (returns opcode of 0). Clicking the Query button on the right generates a Query Max Payload message. The resulting messages are displayed in the Serial Data window with the returned value displayed in the information box located below the Serial Data window. When in Real Device Simulation (RDS) Mode, if a Max Payload Query returns a smaller max Payload than the one selected, the simulator will lower its max payload to match that of the other connected device. 4-4 EPRI Proprietary Licensed Material Figure 4-5 Max Payload Tab Temp Get/Set This tab (shown in Figure 4-6) is another multi-function tab. It handles three function types, two of which are dual Get/Set functions. The Common group allows the operator to select the temperature units (C or F) and to enter the device type hex code. These items are common to the temperature commands. Get/Set Temperature Offset The left function group is the get/set temperature offset. Clicking the current offset entry box allows the user to enter the desired temperature offset in degrees to be applied. The range of the offset is from -128 to 127 degrees. Clicking the Set Offset button will send the units and temperature offset displayed under the button to the connected unit. Clicking the Request Offset button in the offset group will request the units and temperature offset from the connected unit. The current offset and response code values are displayed in the fields under the button while the units are displayed in the Common group. Get/Set Temperature Setpoint The center function group is the get/set temperature setpoint. Clicking the setpoint 1 and setpoint 2 entry boxes allows the user to enter the desired temperature setpoints in degrees to be applied. The range of the setpoints is from -128 to 127 degrees. Clicking the Set Setpoint button will send the device type, units and temperature setpoints displayed under the button to the connected unit. The supported checkbox must be checked for setpoint 2 to be transferred. Clicking the Request Setpoint button in the setpoint group will request the device type, units and temperature setpoints from the connected unit. The setpoints and response code values are 4-5 EPRI Proprietary Licensed Material displayed in the fields under the button while the units and device type are displayed in the Common group. Get Present Temperature The right function group is the get present temperature. Clicking the Temp entry box allows the user to enter the desired temperature to be reported to the connected device on a Get Present Temperature request. Clicking the Get Present Temp button will request the present temperature from the connected device. The present temperature and response code values are displayed in the fields under the button while the units and device type are displayed in the Common group. Figure 4-6 Temperature Get/Set Tab Commodity Before the simulator can supply commodity information, a table must first be populated with the required data. This tab (shown in Figure 4-7) provides the data entry form for the Get/Set Commodity function. Fill in all of the fields. If the “Supported” checkbox is not checked, then the record will not be sent to the connected device during a get/set message exchange. If more than one commodity code has the “Supported” checkbox checked, then multiple records will be set to the connected device during a get/set message. After the data for a specific commodity code is entered, click the Save button to store the data. To view the data for a specific commodity code, select the code in the commodity code drop down box. The data fields will be populated with the stored data. 4-6 EPRI Proprietary Licensed Material Figure 4-7 Commodity Tab The Connected Device group of the Commodity tab has four buttons. Clicking on the Get Commodity button requests the connected device’s commodity information. Information received is displayed by selecting a commodity code desired. Clicking the Set Commodity button sends the commodity data configured in the simulator to the connected device. The resulting messages are displayed in the Serial data window. Clicking on the Get Commodity Subscription button requests the connected device’s commodity subscription information. This will fill in the “Update Frequency in Seconds” text box for each “Commodity Code.” Clicking the Set Commodity Subscription button sends the commodity subscription data configured in the simulator to the connected device. The resulting messages are displayed in the Serial data window. 4-7 EPRI Proprietary Licensed Material Common Commands Common Commands Tab Figure 4-8 Common Commands Tab This tab (shown in Figure 4-8) supports the common commands available to both the UCM and the SGD. Clicking this tab will display a set of six additional tabs: • Change Bit Rate • Simulate Errors • Timing Variables • Pass Through Change Bit Rate In this tab, select the desired bit rate from the drop down list and click the Change Bit Rate button as shown in Figure 4-9. Figure 4-9 Change Bit Rate Tab 4-8 EPRI Proprietary Licensed Material Simulate Errors This tab allows the operator to simulate several types of errors such as Bad Checksum, Message Too Long (additional bytes on the end of the message), and Custom Commands/Opcode Errors. Custom Bytes If a byte’s checkbox is checked, the value in the box will replace the value of the corresponding index when any message is sent. In Figure 4-10 below, if a Shed Event was issued, the simulator would send /0x8/0x6/0x0/0x2/0x1/0x0/0xED/0x56 instead of /0x8/0x1/0x0/0x2/0x1/0x0/0xC/0x3D. Bad Checksum If checked, the simulator will send an invalid checksum in every message. Message Too Long If checked, the simulator will send an additional byte on the end of every message. Message Too Short If checked, the simulator will not send the last byte of every message. Link NAK Message If checked, the simulator will send a link NAK for every message received. The NAK value sent can be selected in the NAK Return numeric box. App NAK Message If checked, the simulator will send an application NAK for every message received. The NAK value sent can be selected in the App NAK Return numeric box. 4-9 EPRI Proprietary Licensed Material Figure 4-10 Simulate Errors Tab Timing Variables This tab (shown in Figure 4-12) allows the operator to change the timing between messages according to the diagram in Figure 4-11. 4-10 EPRI Proprietary Licensed Material Figure 4-11 Timing Variables Figure 4-12 Timing Variables Tab 4-11 EPRI Proprietary Licensed Material Pass Through This tab (shown in Figure 4-13) allows the operator to send a binary pass through file with or without a CTA-2045 wrapper. To do this: 1. Use a hex editor to create a data file with the desired contents and save it in a known location 2. Navigate to the Common Commands/Pass Through tab 3. Check the Add wrapper checkbox if it is desired to add the preceding 0x09/0x## and checksum to the message, otherwise clear the checkbox 4. Click the browse button and navigate to the file to be sent and select open 5. If the Add wrapper checkbox is checked, select the protocol from the protocol drop down list box 6. Click the Send File button to send the file Figure 4-13 Pass Through Tab Universal Communication Module Commands This tab (shown in Figure 4-14) supports the commands available to the UCM. Clicking this tab will display a set of five additional tabs: • Basic Commands • Query Operating State • Comm Status 4-12 EPRI Proprietary Licensed Material • Time Sync • Intermediate UCM Commands Tab Figure 4-14 UCM Commands Tab Basic Commands This tab provides six sub-tabs, Curtailments, Grid Guidance, Next Period Relative Price, Present Relative Price, Power Level, and Time Remaining. Curtailments This tab (shown in Figure 4-15) allows the operator to initiate a curtailment event. These include Shed, Grid Emergency, Critical Peak Pricing and Load Up events. The duration can be entered by using the slider. As the pointer is moved, the time is displayed in the Duration text box ranging from 00:00:00 to 36:07:30. Clicking one of the buttons on the left sends the corresponding command to the SGD. Because SGDs are not required to support an internal timer, the UCM must send an end shed command for every shed command. When in RDS Mode, the simulator will automatically send an end shed command after the given amount of time set by the command. This affects the Shed, Critical Peak, Grid Emergency, and Load Up commands. Clicking the Run Normal/End Event button sends the command to the SGD which terminates any currently active curtailment events. 4-13 EPRI Proprietary Licensed Material Figure 4-15 Curtailments Tab Grid Guidance This tab (shown in Figure 4-16) allows the operator to send Grid Guidance to the SGD. The operator can select either Bad Time to Use Energy, Neutral, or Good Time to Use Energy. Click the Send Guidance button to send the selected guidance to the SGD. Figure 4-16 Grid Guidance Tab Next Period Relative Price This tab (shown in Figure 4-17) allows the operator to set the next period relative price. The slider adjusts the value from 0 to 9.79 as a ration of the “normal” price. The lowest and highest values have special meanings, “unknown” and “maximum,” respectively. Clicking the Set Price button sends the indicator to the SGD. 4-14 EPRI Proprietary Licensed Material Figure 4-17 Next Period Relative Price Tab Present Relative Price This tab (shown in Figure 4-18) allows the operator to set the present relative price. The slider adjusts the value from 0 to 9.79 as a ratio of the “normal” price. The lowest and highest values have special meanings, “unknown” and “maximum,” respectively. Clicking the Set Price button sends the indicator to the SGD. Figure 4-18 Present Relative Price Tab Power Level This tab (shown in Figure 4-19) allows the operator to request a power level to be produced or absorbed. The slider adjusts the requested power level from 0 to 100 percent. The radio buttons 4-15 EPRI Proprietary Licensed Material allow the user to select whether the SGD is to produce or absorb power. Clicking Request sends the command. Figure 4-19 Power Level Tab Time Remaining This tab (shown in Figure 4-20) allows the operator to set the time remaining in the present relative price period, shed event, critical peak event, and grid emergency. The duration is entered by using the slider. As the pointer is moved, the time is displayed in the Duration text box ranging from 00:00:00 to 36:07:30. The lowest and highest values have special meanings, “unknown” and “greater than maximum,” respectively. Clicking Set Time Remaining sends the command to the SGD. Figure 4-20 Time Remaining Tab 4-16 EPRI Proprietary Licensed Material Query Operating State This tab allows the operator to query the operating state by clicking the Operating State button. The operating state returned by the SGD will be displayed in the SGD Current State box and, if the Verbose checkbox is checked, in the Serial Data box. Figure 4-21 Query Operating State Tab Comm Status This tab (shown in Figure 4-22) allows the operator to set the communication status that the UCM reports to the SGD. Select the desired status message from the dropdown list. The Send Comm Status button sends a one-time comm status message to the SGD. Figure 4-22 Comm Status Tab Time Sync This tab (shown in Figure 4-23) provides two buttons, one to enable sending time sync messages and the other to disable sending time sync messages. Clicking the Enable button will send a time sync message every hour on the hour. 4-17 EPRI Proprietary Licensed Material Figure 4-23 Time Sync Tab Intermediate This tab will display an additional row of sub-tabs that allow access to two additional intermediate functions used only from the UCM. Set UTC This tab (shown in Figure 4-24) provides two fields to input the daylight savings time offset and the coordinated universal time offset in 15-minute blocks. The Set UTC Time button then sends these values to the SGD. Figure 4-24 Set UTC Tab Autonomous Cycling The Autonomous Cycling tab (shown in Figure 4-25) provides a method to either start an autonomous cycling event or halt an event. 4-18 EPRI Proprietary Licensed Material Figure 4-25 Autonomous Cycling Tab Smart Grid Device Commands This tab (shown in Figure 4-26) supports the commands available to the SGD. Two sub-tabs are available. • Operating State • Get UTC Time 4-19 EPRI Proprietary Licensed Material SGD Commands Tab Figure 4-26 SGD Commands Tab Operating State This tab (shown in Figure 4-27) provides a method to define the Operating State of the simulator. The operator can choose the State from the Current Operating State dropdown menu. The selected state is what will be returned when the UCM queries the SGD. The second function is to set the manual override state. Checking or un-checking the Customer Override box will send a customer override message to the UCM with the current state of the switch. Figure 4-27 Operating State Tab 4-20 EPRI Proprietary Licensed Material Get UTC Time This tab (shown in Figure 4-28) provides a single button. The value for the returned time is displayed in the Serial Data window if the verbose option is checked. Figure 4-28 Get UTC Time Tab Test Scripts This tab (shown in Figure 3 30) supports the custom scripting feature of the simulator. Test Scripts Tab Figure 4-29 Test Scripts Tab Available Script Commands The following commands in this section are available for use in custom scripts. A few things to note when generating a custom script file: • Use the pound sign (#) to precede all comment lines. • Blank lines cannot be used. • All commands are case-sensitive. 4-21 EPRI Proprietary Licensed Material • Parameters are in decimal format. • A script file must end with the “EndScript” command Testing a Script After writing a custom script, the simulator can run a preliminary test on the script to check for major errors. The Test Script function will not cause the simulator to run any tests. 1. Click on the “Open Script” button and select the desired file to load. 2. Click on Test Script and the simulator will then check the commands specified in the script. A running script check can be stopped at any point by pressing the Kill Script button. The Script Feed text box will be cleared before testing. Running a Script To load a custom script, 1. Click on the “Open Script” button and select the desired file to load. 2. Click on Execute Script and the simulator will then execute the commands specified in the script. A running script can be stopped at any point by pressing the Kill Script button. The Script Feed text box will be cleared before running. Command List The following is a list of available commands that can be used in the simulator. Refer to the appendix section of this manual to see an example of a custom script for the simulator. If the script is a normal CTA-2045 function, see the ANSI/CTA-2045 Modular Communications Interface for Energy Management standard available from the Consumer Electronics Association for a description of the parameters for each specific command. Device – The Device command confirms you are running on the correct type of device. Usage: Device (UCM | SGD) Example: Device UCM LogComment – Inserts a comment into the log file with a LogComment command Usage: LogComment (string) Example: LogComment This is the beginning of the evaluation on March 19, 2014 Shed – this is the shed command with the normal duration byte as the parameter Usage: Shed (integer) Example: Shed 100 Delay – Delay tells the program to wait the specified number of milliseconds before executing the next command. The parameter is the delay time in milliseconds. Usage: Delay (integer) Example: Delay 2000 ValidateResult – Each pair of numbers each represent a (zero indexed) byte index and the passable byte value. If there can be multiple correct values per byte index, simply add 4-22 EPRI Proprietary Licensed Material each possibility as its own pair. In the example below, the 6th byte in the stream can either be 0 or 1, while the 5th byte must be 3. Usage: ValidateResult (integer) (integer) … Example: ValidateResult 4 3 5 0 5 1 RunNormal – Run Normal/End Shed command to end a DR event. Usage: RunNormal (no parameters) Example: RunNormal Pause – The test following the Pause command will be displayed for the user. To continue, the user must press the Manual Continue button. Usage: Pause (string) Example: Pause Please switch the SGD to manual override mode ReqPowerLevel – Requests Power Level with the standard percent bytes as the parameter. Usage: ReqPowerLevel (integer 0 – 100) Example: ReqPowerLevel 89 LoadUp – Requests Load Up with the normal duration parameter byte. Usage: LoadUp (integer) Example: LoadUp 125 QueryOpState – Queries the operating state. Usage: QueryOpState (no parameters) Example: QueryOpState PresRelPrice - Sets present relative price Usage: PresRelPrice (integer) Example: PresRelPrice 62 CriticalPeak – Initiates Critical Peak Price event Usage: CriticalPeak (integer) Example: CriticalPeak 75 GridEmergency – Initiates Grid Emergency event Usage: GridEmergency (integer) Example: GridEmergency 80 NextRelPrice – Sets Next Period Relative Price Usage: NextRelPrice (integer) Example: NextRelPrice 88 TimeRemain – Sets Time Remaining in current event or price period Usage: TimeRemain (integer) Example: TimeRemain 96 4-23 EPRI Proprietary Licensed Material GridGuidence – Sets Grid Guidance. 0 represents Bad Time to Use Energy, 1 represents Neutral, and 2 represents Good Time to Use Energy. Usage: GridGuidence (0 | 1 | 2) Example: GridGuidence 1 SetUTCTime – Sets UTC Time Usage: SetUTCTime (UTC offset) (STO offset) Example: SetUTCTime 20 4 AutoCyclingStart – Starts Autonomous Cycling – The user fills out the form in the operator interface before issuing this command Usage: AutoCyclingStart (no parameters) Example: AutoCyclingStart AutoCyclingStop – Stops Autonomous Cycling – The user fills out the form in the operator interface before issuing this command. Usage: AutoCyclingStop (no parameters) Example: AutoCyclingStop MsgTypeSupport – Sends Message Type Supported query. Make sure to set your message types supported before using this command Usage: MsgTypeSupport (MSB) (LSB) Example: MsgTypeSupport 8 2 DeviceInfo – Sends Device Information query. Go to Common Commands/Device Info tab to see results Usage: DeviceInfo (no parameters) Example: DeviceInfo CommodityGet – Sends Get Commodity command. Go to Common Commands/Device Info tab to see results Usage: DeviceInfo (no parameters) Example: DeviceInfo ManualValidate – Manually validates result. Test will pause until Pass or Fail button is clicked. Usage: ManualValidate (no parameters) Example: ManualValidate EndScript – Terminates the script. Any commands that follow are ignored. Usage: EndScript (no parameters) Example: EndScript 4-24 EPRI Proprietary Licensed Material CommStatus - Takes two parameters: status, auto update time in ms. Sends command status and continues to send according to the auto update time. Must have the Real Device Simulation Mode checkbox checked to send auto updates. Usage: CommStatus (Good | None | Poor) (integer) Example: CommStatus Good 60000 QueryMaxPayload – Sends query for max payload Usage: QueryMaxPayload (no parameters) Example: QueryMaxPayload BadOpCode – Sets bad Opcode Bytes to be sent with the following commands. Usage: BadOpCode (integer – OpCode 1) (integer – OpCode 2) Example: BadOpCode 09 32 ResetBadOpCode – Resets bad opcode simulation such that following commands are not altered Usage: ResetBadOpCode (no parameters) Example: ResetBadOpCode CustomCommand – Accepts pairs of numbers. The first of each pair indicates the index (0-5) at which the second number will be placed. Like BadOpCode, the second number replaces the value that would have normally been in that position. Usage: CustomCommand (integer – Index) (integer – Value) Example: CustomCommand 0 9 1 5 5 66 ResetCustomCommand – Resets all custom command boxes (including Bad Opcode boxes) Usage: ResetCustomCommand (no parameters) Example: ResetCustomCommand Real Device Options This tab (shown in Figure 4-30) is enabled by checking the 'Real Device Simulation Mode' checkbox. When enabled, this function allows the simulator to respond to commands like a real device. Turning this mode on alone does not make the simulator start sending or replying to messages automatically, but enables a new 'Real Device' tab which holds options for functions detailed below. The 'UCM Functions' sub-tab and the 'SGD Functions' sub-tab each contain settings for functions that are unique to their respective devices. The 'Common Functions' tab contains settings for functions that are common between the SGD and UCM. 4-25 EPRI Proprietary Licensed Material Real Device Options Tab Figure 4-30 Real Device Options Tab Common Functions This tab (shown in Figure 4-31) holds options regarding both UCM and SGD commands when in RDS mode. The Ignore Maximum Payload Size, when unchecked, gives the simulator the ability to respond differently to messages that are larger than the set maximum payload. When first launched, the simulator will ignore message size, even if it is in RDS Mode. To enable the checking of message sizes, the user must uncheck the 'Ignore Maximum Payload Size' box under the Real Device -> Common Functions tab. When the simulator is set to examine message sizes, it will neither send nor support a received message longer than the maximum payload. If the device is prompted for a message longer than it can support (like in a Device Info request), the simulator will respond with an Application level Nak. If the simulator receives a message longer than its supported maximum payload, the simulator will send a data link Ack, followed by an Application level Nak. The simulator will then print the message to the screen, although it will not be processed, and will not follow any instructions contained within. The Command Retry function is enabled when the user activates RDS Mode and checks the 'Command Retry Enable' checkbox under the Real Device -> Common Functions tab. When enabled, this function will make the simulator resend any command up to three times, with a random interval between 100 and 2000ms if no Link Level Ack is received. 4-26 EPRI Proprietary Licensed Material Figure 4-31 Common Functions Tab UCM Functions This tab (shown in Figure 4-32) supports options for the Automatic Comm Status Updates function, available only to the UCM. The Automatic Comm Status Updates function is enabled when the user activates RDS Mode and selects a setting under 'Comm Status to be Sent' other than 'Manual.' To disable this function, set the simulator off of RDS Mode, or select 'Manual' in the 'Comm Status to be Sent' box. When enabled, this function will continually send a Comm Status Message to the SGD with the interval set in the 'Transmission Interval' box. The Comm Status message that is sent is determined by the selection in the 'Comm Status to be Sent' box, with the exception of the 'Manual' selection. When 'Manual' is selected, no Comm Status is automatically sent, instead, the user must send Comm Status messages manually via the UCM Commands -> Comm Status tab. Figure 4-32 UCM Functions Tab SGD Functions This tab is supports options specific to the SGD. The following are options under this tab (shown in Figure 4-33). Command Responses The Shed Start Command Response function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator 4-27 EPRI Proprietary Licensed Material receives a Shed Start Command. If the 'Shed Command Response' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The other selections in the 'Shed Command Response' box set the simulator to change its Op State to the indicated state. The Shed Event function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state when the simulator receives a Shed End Command, or any other time the simulator ends a shed. If the 'End Shed Command Response' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Pre-Shed state' selection will return the simulator's Op State to either Running Normal or Idle Normal, depending on what the Op State was before the Shed Event started. The other selections in the 'End Shed Command Response' box set the simulator to change its Op State to the indicated state. The Critical Peak Start function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives a Critical Peak Command. If the 'Critical Peak Response' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Not Supported' selection will set the simulator to send an Application Level Nak in reply to a Critical Peak Command. The other selections in the 'Critical Peak Response' box set the simulator to change its Op State to the indicated state. The Load Up Start function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives a Load Up Response. If the 'Load Up Response' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Not Supported' selection will set the simulator to send an Application Level Nak in reply to a Load Up Command. The other selections in the 'Load Up Response' box set the simulator to change its Op State to the indicated state. The Grid Emergency Start function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives a Grid Emergency Command. If the 'Grid Emergency Response' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Not Supported' selection will set the simulator to send an Application Level Nak in reply to a Grid Emergency Command. The other selections in the 'Grid Emergency Response' box set the simulator to change its Op State to the indicated state. The Good Time Guidance function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives Good Time to Use Energy Grid Guidance. If the 'Good Time Grid Guidance' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Not Supported' selection will set the simulator to send an Application Level Nak in reply to Good 4-28 EPRI Proprietary Licensed Material Time to Use Energy Grid Guidance. The other selections in the 'Good Time Grid Guidance' box set the simulator to change its Op State to the indicated state. The Neutral Guidance function becomes enabled when the user enable RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives Neutral Grid Guidance. If the 'Neutral Grid Guidance' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op State from the Smart Grid Device Commands -> Operating State -> Current Operating State Box. The 'Pre-guidance' selection sets the simulator to change its Op State to its previous state when it receives Neutral Grid Guidance. The Bad Time Guidance function becomes enabled when the user enables RDS Mode. This function automatically changes the operating state (Op State) when the simulator receives Bad Time to Use Energy Grid Guidance. If the 'Bad Time Grid Guidance' box is set to 'Manual,' the simulator's Op State will not change unless the user manually selects a new Op state from the Smart Grid Device Commands -> Operating State -> Current Operating State box. The 'Not Supported' selection will set the simulator to send an Application Level Nak in reply to Bad Time to Use Energy Grid Guidance. The other selections in the 'Bad Time Grid Guidance' box set the simulator to change its Op State to the indicated state. Figure 4-33 SGD Response Options Comm Status Timeout This function becomes enabled when the user clicks the button labeled Enable in the Real Device -> SGD Functions tab (shown in Figure 4-34). The simulator must also be in RDS Mode and an SGD Internal Clock must be checked as supported. When enabled, this function starts a timer countdown until the next Comm Status message. The countdown time (in seconds) can be set by the user with the Comm Status Timeout box. If no Comm Status message is received when the counter reaches the set time, any Grid Guidance is reset and then the timer is reset. To disable the timeout, click the Comm Status Timeout button now labeled Disable. Figure 4-34 Comm Status Timeout 4-29 EPRI Proprietary Licensed Material SGD Internal Clock Support This function becomes enabled when the user checks the 'SGD Internal Clock' checkbox (shown in Figure 4-35). When enabled, this function allows the simulator to simulate a timer for certain functions. For the Begin Shed, Critical Peak, Load Up, and Grid Emergency commands, when the SGD supports an internal clock, the simulator will automatically end a shed event after the specified time accompanying the command. For the Command Retry and Comm Status Timeout functions, the SGD must be supported. Figure 4-35 SGD Internal Clock Support 4-30 EPRI Proprietary Licensed Material 5 ADDITIONAL TUTORIALS This section provides advanced tutorials on how to operate the simulator. Simultaneously Simulate Both UCM and SGD This tutorial demonstrates how to simulate UCM and SGD on the same machine, giving users access to all messages sent between the UCM and SGD for their own reference. 1. Connect both USB connectors for the SGD and UCM cable sets to the computer. 2. Connect the SGD to the UCM. 3. Open two separate instances of the simulator as shown in Figure 5-1: Figure 5-1 Two Simulator Instances 4. Make sure to configure each instance to have its own assigned communication port as well as device role (one set to UCM and the other to SGD). The bit rates must match as well (see Figure 5-2). 5-1 EPRI Proprietary Licensed Material Figure 5-2 Select Appropriate Settings 5. If state behavior and response need to be observed, check the checkbox next to “Real Device Simulation Mode” on the responding unit (see Figure 5-3). Refer to Chapter 2, “Real Device Simulation (RDS) Mode” for more information. Figure 5-3 Set Real Device Simulation Mode 5-2 EPRI Proprietary Licensed Material 6. Click on connect for both instances. The devices should connect, and commands can now be sent from the UCM to the SGD configured instance. 7. Once connection to both devices is active, commands can be sent from the UCM instance and received from the SGD instance of the simulator. Test Cases Shed Command This section provides two simple test cases to demonstrate that the software is operating normally. In the UCM instance, select UCM Commands -> Basic Commands -> Curtailments. Adjust the slider to set the duration to 02:00:00 as shown in Figure 5-4. Figure 5-4 Send Shed Load Command Click the Shed Load button. The UCM instance Serial Data text box will display the data shown in Figure 5-5. Note that the time stamp values will be the time the command is issued, but all other values will be identical. The human readable strings will only be printed if the Verbose box is checked. 5-3 EPRI Proprietary Licensed Material Figure 5-5 UCM shed command example The SGD simulator Serial Data window will display the information shown in Figure 5-6. Note that the only differences are the “Sent” and “Recv” labels are reversed and times are slightly different by a few milliseconds. 5-4 EPRI Proprietary Licensed Material Figure 5-6 SGD shed command results example Override Command This example will demonstrate communication initiated by the SGD. Left click the X button next to the Serial Data textbox in both the SGD and UCM application instances to clear the serial data boxes. In the SGD application instance, select Smart Grid Device Commands -> Operating State tabs to see the Customer Override checkbox as shown in Figure 5-7. 5-5 EPRI Proprietary Licensed Material Figure 5-7 Unchecked Customer Override Check the SGD Customer Override checkbox and the text shown in Figure 5-8 will appear in the SGD Serial Data textbox. Figure 5-8 SGD customer override command results example The UCM simulator Serial Data window will display the information shown in Figure 5-6. Again note that the only differences are the “Sent” and “Recv” labels are reversed and times are slightly different by a few milliseconds. 5-6 EPRI Proprietary Licensed Material Figure 5-9 UCM customer override command results example Scripting Example This example will demonstrate how to use a simple script. The test script provided in appendix A is designed to be run against a production water heater and will not pass unless the simulator is configured to act exactly like the water heater. This is not necessary to run the script as will be demonstrated. The first step is to copy the text of the script into a text editor. Save the file to a known location so it can be easily found in the next steps. Do not use a word processor for this task as they add hidden characters to the file. Use a program such as PSPad, Bluefish or any UTF-8 text editor for this task. The test script was also provided with the zip file containing the simulator software, named testscript.txt. Left click the X button next to the Serial Data textbox in both the SGD and UCM application instances to clear the serial data boxes. 5-7 EPRI Proprietary Licensed Material Configure the SGD to respond like a typical water heater that is in a heating cycle with its water temperature above the shed set point. In the SGD application select the “Real Device Options” tab and select the “SGD Functions” sub-tab. Configure it to match Figure 5-10. Figure 5-10 SGD scripting simulation settings Confirm that the “Real Device Simulation Mode” checkbox in the upper left quadrant is checked. See Figure 3-6. In the SGD application select the “SGD Commands” tab and confirm the “Customer Override” checkbox is not checked. See Figure 4-27. Set the current operating state of the SGD to “Running Normal” by selecting it from the Current Operating State drop down list box. In the UCM application instance, select the Test Scripts tab and click Open Script to browse for the test script file. See Figure 5-11. 5-8 EPRI Proprietary Licensed Material Figure 5-11 Test script demonstration After selecting the file click on the “Test Script” button verify that the script file has no errors that will prevent it from running. This does not mean that the script is correct, only that the command syntax is correct. The screen should appear as shown in Figure 5-12. Figure 5-12 Test script after validation Now it is time to actually run the script. Click the “Execute Script” button. The script will take approximately 15 seconds to run and when complete it will show the results in the “Script Feed” text box. See Figure 5-13. 5-9 EPRI Proprietary Licensed Material Figure 5-13 Script example results 5-10 EPRI Proprietary Licensed Material 6 CABLE SET INFORMATION The cable set parts list and schematics are provided in this section. See the Installation and Startup chapter for details on how to use the cable sets. AC Cable The part numbers provided only include the connector information and not a suitable enclosure. It is up to the builder to determine a safe enclosure for these connectors. Cable parts list: CTA-2045 SGD Socket is Part No. 420C2PM12FL0 available from On-Shore Technology, Inc. The crimp pins for this socket are part number 420CP-T-X where the X is codes 1 through 6 for different materials, and wire gauge. Contact the manufacturer for details. CTA-2045 UCM Connector is Part No. 420B2V12FL0 available from On-Shore Technology, Inc. USB to RS485 / RS422 Converter FTDI CHIP with Terminals - SKU: GM-482422 available from www.gearmo.com and other sources. Schematic UCM Simulator Cable Schematic USB to RS485 Adaptor USB D+ D- 7 1 8 Male Connector Gnd SGD Simulator Cable Schematic USB to RS485 Adaptor D+ D- USB Gnd 120V Gnd N 6-1 7 1 8 12 10 5 Female Connector EPRI Proprietary Licensed Material DC Cables The DC cable set is more complicated, consisting of connectors, an Arduino Uno single board computer, custom Arduino shields, and source code for the Arduino boards. The Gerber files, parts list, and Arduino source code are in the GitHub repository along with the CTA-2045 simulator source code. Loading the Application to the Arduino Uno After the DC cable set has been constructed it must have the software loaded to function. See the Installation and Startup chapter of this document for details on how to load the drivers to support the Arduino Uno boards. Once the drivers are installed and the computer recognizes the devices the applications can be loaded. 1. The applications are different for the UCM and SGD devices. Select the matching Arduino file and double click it to start the Arduino GUI. Arduino GUI version 1.6.5 was used for development by EPRI. 2. In the GUI, click Tools and hover over Board to confirm that the Arduino Uno is selected. 3. Then hover over Port to confirm there is a check mark on the port with the Arduino connected. 4. On the GUI click right arrow upload icon to transfer the application code the Arduino Uno. The message window at the bottom of the GUI will display the status of the file transfer and success when completed. This process only needs to be done once. The program is stored in nonvolatile memory. There is one issue with the SPI communications with the SGD cable that does not meet specification. The slowest speed available on Arduino SPI port as master is 125KHz where the CTA-2045 specification call for a clock rate of 19.2KHz. This may cause problems when connected to some UCM devices incapable of supporting the higher clock speeds. Cable parts list: CTA-2045 SGD connector – Micro SATA Receptacle AMP 1735583-1 available from Heilind Electronics, Inc. CTA-2045 UCM connector – Micro SATA Plug AMP 1735452-1 available from Heilind Electronics, Inc. 6-2 EPRI Proprietary Licensed Material A TEST SCRIPT EXAMPLE The following example script performs a test of the shed command simulating a UCM against an SGD. # CTA-2045 Simulator Test Script - Shed # March 21, 2014 Device UCM LogComment Test1 - Initiate Shed Command Test QueryOpState Delay 2000 LogComment Confirm Operating State = Running Normal ValidateResult 4 19 5 1 LogComment Issue Shed command with opcode2 = 100 Shed 100 Delay 2000 LogComment Confirm SGD accepted the Shed command ValidateResult 4 3 QueryOpState Delay 2000 LogComment Confirm Operating State = Running Curtailed Grid ValidateResult 4 19 5 2 LogComment Issue Run Normal command RunNormal Delay 2000 QueryOpState Delay 2000 LogComment Confirm Operating State = Running Normal ValidateResult 4 19 5 1 LogComment Test1 - Terminate Shed Command Test LogComment EndScript Electric Power Research Institute 3420 Hillview Avenue, Palo Alto, California 94304-1338 • PO Box 10412, Palo Alto, California 94303-0813 • USA 800.313.3774 • 650.855.2121 • askepri@epri.com • www.epri.com
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Author : Gary Aumaugher Company : Electric Power Research Institute (EPRI) Create Date : 2018:04:26 15:10:51-04:00 Keywords : EPRI, Software, Manual, Template Modify Date : 2018:04:26 15:11:08-04:00 Source Modified : D:20180426190958 Subject : Enter Product ID # Here Language : EN-US Tagged PDF : Yes XMP Toolkit : Adobe XMP Core 5.6-c015 84.159810, 2016/09/10-02:41:30 Metadata Date : 2018:04:26 15:11:08-04:00 Creator Tool : Acrobat PDFMaker 18 for Word Document ID : uuid:7d62ba17-13c8-4a56-9807-da2d1cc686d2 Instance ID : uuid:e1ddf8cb-aadc-42f5-99d3-059acf371b44 Format : application/pdf Title : Enter Report Title Here Description : Enter Product ID # Here Creator : Gary Aumaugher Producer : Adobe PDF Library 15.0 Headline : Enter Product ID # Here Page Layout : OneColumn Page Count : 71EXIF Metadata provided by EXIF.tools