22.9.1 D-Script/Common [Global D-Script] Settings Guide

The following is the Common [Global D-Script] dialog box. The settings you can specify for the D-Script are the same as those in the dialog box.
A portion of the ID and trigger condition settings are not specified for the [Common Settings] [Extended Script], however, the other settings are the same as the content in this dialog box.

Export

This can be selected from the File menu. Export writes the created script to a text file (.txt), which can then be imported into other scripts.

Import

This can be selected from the File menu. Import reads in exported scripts (text file).

Row Number

Shows the row number to the right of the program.

Auto Indent Control

Automatically indents statements as below.

Function Input Assistance

When the function and the opening bracket "(" are inputted as below, the function's format is displayed.

Auto Syntax Completion

When "if" or "loop" is typed from the keypad, the remaining syntax is completed.

Address Input

When creating a script, enter the opening square bracket ( [ ) to display the [Input Address] dialog box.

From the [Address Type], select the address or access type. The access type is generic for the [Bit Length], [Sign +/-], and [Data Type].

Address

You can specify the Device/PLC address, display unit's Internal Device and Bit Variable. For Extended Script, you can specify Internal Device only.

You can specify the Device/PLC address, display unit's Internal Device and Integer Variable. For Extended Script, you can specify Internal Device only.

This address can only be used for scripts.

The temporary addresses of D-Scripts and Global D-Scripts are shared.

The temporary addresses of D-Scripts and Global D-Scripts are managed independently from the temporary address of Extended Scripts. Therefore, changes made to the temporary addresses of D-Scripts and Global D-Scripts are not reflected in the temporary addresses of Extended Scripts.

Address Range: [t:0000]...[t:0089]

Access Type

Refer to the following for details on the internal device.

2.4.1 Minimizing the Load for Device/PLC Communication (Direct Access)

2.4.2 Communicating with Unsupported Device/PLC (Memory Link)

Auto Syntax Analysis

Checks the syntax during script creation. The check results will be displayed in the bottom portion of the window.

ID

Scripts are managed by an ID number.

When creating multiple scripts with different trigger conditions, set a value from 0 to 65535.

Extended scripts do not have this setting.

Comment

You can add a comment for the script, with 20 single-byte characters or less.

Language

Choose a language from the drop-down list: [ASCII], [Japanese], [Chinese (Traditional)], [Chinese (Simplified)], [Korean], or [Russian (Cyrillic)].

Enable Debug Function

Set whether or not to enable the debug function. If the _debug function exists in the body of the script, the _debug function will execute.

For more information about this function, please refer to the following.

22.11.10.1 Debug Function

Lock Password

In the [Project Information] dialog box's [Passwords] page, select the [Edit] area's [Enable] check box to use the Lock Password feature.

  1. Select the [Lock Password] check box to display the [User Level Settings] dialog box.

  2. Select the user level from among [Standard User], [Power User] and [Super User], and then click [OK].

  3. In the [Lock Password] dialog box, input the [Password] and click [OK].
    When you select the [Remember Password] check box, the password is saved and the [Unlock] dialog box will not display.

Extended scripts do not have this setting.

Trigger

Select the trigger condition to run scripts from [Continuous Action], [Timer], [When Bit turns ON], [While Bit is ON], [When Bit turns OFF], [While Bit is OFF], [On Bit Change], [When Condition becomes True], [While Condition is true], [When Condition becomes False], [While Condition is False]. For more information about this function, please refer to the following.

22.8 Trigger Condition Setup

Extended scripts do not have this setting.

Timer Settings

When [Trigger] is [Timer], define the interval between script processes from 1 to 32767.

Bit Address

When [Trigger] is [When Bit Turns ON], [While Bit is ON], [When Bit Turns OFF], [While Bit is OFF], or [On Bit Change], define the bit address that controls when to run the script.

Trigger Condition Expression

When [Trigger Condition] is [When Condition becomes True], [While Condition is True], [When Condition becomes False], or [While Condition is False], define the expression that controls when to run the script.

Data Type

Set the data format for the script to Bin or BCD. This applies to the script and trigger condition.

Extended scripts do not have this setting. For Extended Scripts, Bin is fixed.

Bit Length

Set the data length for the script to 16 bit or 32 bit. This applies to the script and trigger condition.

Sign +/-

Select this when you want to insert negative numbers.

This can only be set when the data type is Bin. This applies to the script and trigger condition.

Expand

Click the link to display the [Trigger Condition Expression] dialog box.

Expression Area

The contents of the script.

Built-In Function (Instruction)

Functions (Instructions) used in the System. Select a category from [Built-In Function (Instruction)]. The related functions appear in the bottom area. Select the function and click [Input]. The corresponding settings dialog box appears.

See the following for further information about functions (instructions) that are available.
22.11 Built-In Function (Instruction) / Conditional Expressions

User-Defined Functions

Register an existing script as a user-defined function so you can use it within other scripts.

Tool Box

As a shortcut, select commands from the Toolbox to insert them in the script.

Also, you can search and replace text in scripts.

See the following for further information about instructions that are available.

22.11 Built-In Function (Instruction) / Conditional Expressions

Script

You can view a list of the scripts used in a project.

Search

You can search and replace text in scripts.