top of page

DNP3 Script Editor

The DNP3 Script Editor is a program that allows coding a script to drive the master station operation of CDOAN-DNP3 test tool. Complete capabilities are best learned from product documentation, located here. An overview of the key features is presented below.

Philosophy of a script file

  • A script file is a series of commands

  • Commands in the script are generally executed sequentially, but several commands exist to alter this flow

  • The main purpose of a script is to send messages to an outstation and analyze the responses

  • At any given time, the script exists in a success or failure state. The state is “success” at startup. Once a state is assigned, it remains unchanged until a new state is assigned. That is, nothing implicitly changes the state

  • Verify, Or, And, and Prompt commands are the only ones that may change the script state. Verify, Or, And are all defined identically, and include choices to select different parts of the outstation response message to evaluate. Any subset of these choices can be selected. The result of the evaluation is “success” if tests for all selected choices pass, or “failure” if at least one test fails.

    • Verify sets the script state to the result of the evaluation

    • Or sets the script state to success if the result of the evaluation is success. The script state is unchanged if the result of the evaluation is failure

    • And sets the script state to failure if the result of the evaluation is failure. The script state is unchanged if the result of the evaluation is success

    • Prompt asks the user a question. Answering yes sets the state to success. Answering no sets the state to failure.

  • Messages can be written to the communication view with the Log or LogIf commands. All messages written to the communication view are also written to the ChangeEvents view

    • Log write a message unconditionally

    • LogIf writes one message if the current script state is success, or a separate message if the state is failure. The command can also be used to stop the script after logging either the success or failure message

  • Script flow commands include:

    • Restart to restart the script from the first entry

    • Stop to stop

    • Repeat/Until to repeat a set of commands until a condition is met

    • If/Else/Endif to conditionally execute commands

    • Wait to pause for a specified time

  • Parameters and Options

    • Set is used to set selected DNP3 protocol options related to confirmed user data

    • ForceError instructs the script to enable or disable certain DNP3 protocol error conditions

    • Variable is used to assign, increment, or decrement values associated with any of 26 variables

More details are available by selecting the product documentation link from the top of this page

bottom of page