Velocity Micro MS-3 manual Using JavaScript to set task parameters, Where scripts are written

Page 25

Chapter 1: Introduction

Microscan MS-3 Laser Scanner Device Driver User Guide

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.

Image 25
Contents July VWorks3 and BenchWorks Microscan MS-3 Laser Scanner Device Driver User GuideCopyright 2007 Velocity11 Contents Table of Contents Introduction1 Job roles Who should read this guideRelated topics About Velocity11 user guides Where to find user information Online helpAbout this topic To open the online helpPrinting and searching More information Also read What this guide coversDriver version What this guide does not coverDevice defined About devicesDevice file defined About device drivers What functions do the device drivers provide? Related topics IWorks interfaceProcedure Installing device driversTo install device drivers To add devices to a device file Adding devicesBackground About diagnosticsTo open Diagnostics Opening diagnosticsIf you are using VWork3 or BenchWorks software Related topics About profiles Stored settingsProfiles defined Before you start Setting general properties Setting the properties for a deviceTo set the general properties for a device Setting location properties Setting teachpointsTo set the teachpoint properties To set the barcode readers property Setting the Use linked location Sub Process task defined Adding a Sub Adding and linking Sub Process tasksTo link the Sub Process task to the correct sub-process To link a Sub Process task to a device Where scripts are written Using JavaScript to set task parametersAbout reader output files Plug-in defaultOutput file Example Profile default output file name Filename suffixesOverriding output file names with tasks About device initialization Homing motors Setting profile parametersIntroduction Microscan MS-3 Laser Scanner Workflow Workflow for configuring the Microscan MS-3 LaserBefore you start Creating a Microscan MS-3 Laser profileTo create an Microscan MS-3 Laser profile About Microscan MS-3 Laser tasks Setting Microscan MS-3 Laser task parametersTo set the Scan bar code task parameters Scanning a barcode To scan a barcode Operating the Microscan MS-3 Laser with diagnosticsTo initialize the Microscan MS-3 Laser Managing profiles To manage Microscan MS-3 Laser profiles Managing Microscan MS-3 Laser profilesRelated topics