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].
Common settings for scripts
Bit Address
You can specify the Device/PLC address, display unit's Internal Device and Bit Variable.
Word Address
You can specify the Device/PLC address, display unit's Internal Device and Integer Variable.
Temporary Address
This address can only be used for scripts.
Individual address settings
D-Script and Global D-Script
16 Bit BCD Address
16 Bit Bin(+/-) Address
16 Bit Bin Address
32 Bit BCD Address
32 Bit Bin(+/-) Address
32 Bit Bin Address
Extended Script
16 Bit (+/-) Address
16 Bit Address
32 Bit (+/-) Address
32 Bit Address
You can define the data type for each address.
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)
In the scripts, please do NOT set any passwords, and so on, that begin with "0". All numeric values beginning with "0" are processed as Oct (base-8) data.
How to describe
different input data formats
For example)
DEC (Base-10) |
Non-zero starting value For example, 100 |
HEX (Base-16) |
Value starting with 0x For example, 0x100 |
OCT (Base-8) |
Value starting with 0 For example, 0100 |
Example operation with different data formats using the AND operator (Hex and BCD)
Format |
Condition |
Result |
---|---|---|
Hex only |
0x270F & 0xFF00 |
0x2700 |
BCD and Hex |
9999 & 0xFF00 |
0x9900 |
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.
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.
Select the [Lock Password] check
box to display the [User Level Settings] dialog box.
Select the user level from among [Standard User], [Power User] and [Super User], and then click [OK].
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.
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.
This setting displays when [Trigger Condition] is [When Condition becomes True], [While Condition is True], [When Condition becomes False], or [While Condition is False].
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.
For more details
on user-defined functions, refer to the following:
22.9.2 User-Defined
Functions Settings Guide
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.