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. ID and trigger settings are not specified for the [Common Settings] [Extended Script], however, the other settings are the same.
Export
This can be selected from the File menu. Export writes a 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 an exported script (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 initial bracket "(" are inputted as below, the function's format gets 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 a left 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" will be 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 of 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.
Comment
Input a comment for the script.
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.
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 the trigger condition 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.
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 use in the script.
Also, you can select commands such as search and position text used in scripts.
See the following for further information about instructions that are available.
22.11 Built-In Function (Instruction) / Conditional Expressions