Specifying set command parameters

To specify set command parameters, first, please select the batch in the corresponding batch list. You will see its properties in the right pane of the dialog.

Tag Type #

Select a Tag Type to write values to the PLC.

17.2.1

Tag  – you can write the tag straight into the Tag field; you can also click on the ‘’ button to prompt the tag database.

Connection  – set the connection to the PLC. Connection parameter is the same for all set commands in the batch.

Title – Set title for this set command. If you require a response from the user in the form of dialogue, the title of the dialogue will be this title.

translate Use the translation button to provide a translation for this set command.

Lock Enable  – check this option if you want to use On Touch Lock for this element.

Log  – check this checkbox to log this user action. The user action will be logged with the provided message.

Memory Type #

Select a Memory Type to set View Script Variables.

17.2.2

Constants – If you select contacts you will be able to select out of constants in myDESIGNER such as „dateTo“, „dateFrom“, „dateRange“

Active Recipe  – Active recipe option will let you select out of Recipe variable it’s usage is described in Recipe section

Custom  – Will let you specify the custom variable

Title – Set title for this set command. If you require a response from the user in the form of dialogue, the title of the dialogue will be this title.

translate Use translation button to provide a translation for this set command.

Lock Enable  – check this option if you want to use On Touch Lock for this element.

Log  – set this checkbox to log this user action. The user action will be logged with the provided message.

SQL Type #

Select SQL to write values to the database:

http://myscada.org/downloads/manuals_image/myDESIGNER_NEW/Screenshot_105.jpg

Connection  – set connection to the database. Connection parameters are the same for all set commands in the batch.

SQL  – specify SQL that will be used to write values to the PLC. The SQL parameter is the same for all set commands in the batch. When the batch is processed, all values from the batch are inserted into the specified SQL. The top set command in the batch will replace #1# keyword in the SQL; the second set command in the batch will replace #2# keyword, and so on.

Title – Set title for this set command. If you require a response from the user in the form of dialog, the title of the dialog will be this title.

translate Use the translation button to provide a translation for this set command.

Lock Enable  – check this option if you want to use On Touch Lock for this element.

Log  – check this checkbox to log this user action. The user action will be logged with the provided message.

Multiple Values Write Example #

The following example will explain how to write multiple values into the SQL database with one batch set command. We will ask the user to enter two values which will be then written to the database using the SQL command.

b. Create a connection to your database.

17.2.4

2. In your view, navigate to the button element and in Properties -> Commands, select Write/Set Command.

17.2.5

3. Now in the set dialog, create two items in one batch like in the following picture:

17.2.6

4. Now test your project. If you click on the button, the user will be asked twice to enter the value. Once the user has entered both values, mySCADA will execute the SQL. #1# will be replaced with the first value; #2# will be replaced with the second value.

Script Type #

This very useful feature allows you to oversee, set up, and enrich the whole Write/Set command functionality from the scripting level (i.e. you can freely create and add your own new arbitrary functionalities). When the set command is processed, the corresponding View Script is called.

17.2.7

For a detailed description of how View Scripts work, please see section View Scripts.