Chapter 1: Introduction
Related topics
For information about... | See... |
|
|
Device drivers | “About device drivers” on page 7 |
|
|
Setting common device properties | “Setting the properties for a device” on |
| page 16 |
|
|
Adding a device to the device | “Adding devices” on page 10 |
manager |
|
|
|
Creating protocols | ❑ VWorks Version 3 Automation |
| Control User Guide |
| ❑ BenchWorks Automation Control |
| User Guide |
|
|
|
|
21
Using JavaScript to set task parameters
About this topic | JavaScript programs (scripts) can be used to change the parameters of a |
| protocol task immediately before it is scheduled. This extends the |
| capability of VWorks or BenchWorks software because the parameters |
| can be changed dynamically during a run, based on the following: |
| ❑ Information passed from an external source, such as a database |
| ❑ The number of times the protocol has cycled |
| ❑ Feedback on changing conditions during the run |
Where scripts are written
This topic describes the use of JavaScript to set task parameters in a protocol.
Read this topic if you are an administrator or technician responsible for creating VWorks or BenchWorks software protocols and want to add functionality to a task using JavaScript.
Scripts can be written in two ways:
❑Directly into the box in the Advanced Settings tab of the Task Parameters toolbar
❑As an external file that is located by clicking Browse in the Advanced Settings tab and navigating to its location on the hard drive
Note: You can also call an external file by embedding the “open()” function in the box.
The following screenshot displays a short script that prints the parameters of a task to the log toolbar, just before the task runs. In this case, the script is written directly in the Advanced Settings box.