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 Common [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.
Select the address type from [Bit Address], [Word Address], [Temporary Address].
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.
Refer to the following for details on the internal device.
A.1.2 Communicating with a Device/PLC Using the Direct Access Method
A.1.3 Using the Memory Link Method with Unsupported Devices/PLCs
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 0x 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)], or [Korean].
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 21.11.7.1 Debug Function.
Lock Password
Select whether to enable the Lock Password feature.
Select the check box to display the [User Level Settings] screen.
Select the user level from among [Standard User], [Power User] and [Super User], and then click [OK].
Enter [Password] and click [OK].
When you select the [Remember Password] check box, the password is saved and the Unlock Password dialog box will not display.
Trigger
Select the trigger condition to run scripts from [Continuous Action], [Timer], [When Bit is ON], [Bit is ON], [When Bit is OFF], [Bit is OFF], [On Bit Change], [When Condition is True], [Condition becoming true], [When Condition is False], [Condition is false]. For more information about these operations, please refer to 21.8 Trigger Condition Setup.
Extended scripts do not have the trigger condition setting.
Data Type
Set the data format for the script to Bin or BCD.
For Extended Scripts, Bin is fixed.
Bit Length
Set the data length for the script to 16 bit or 32 bit.
Sign +/-
Select this when you want to insert negative numbers.
This can only be set when the data type is Bin.
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.21.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 about user-defined functions, see 21.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.
For information about instructions, see 21.11 Built-In Function (Instruction) / Conditional Expressions.