Using a Barcode Scanner with SpecView

<< Click to Display Table of Contents >>

Navigation:  Installation and Starting SpecView > Instrument Definition/Detection >

Using a Barcode Scanner with SpecView

Previous pageReturn to chapter overviewNext page

 

A barcode scanner is another way of entering alphanumeric data into a computer. A common question which is asked is: "Can SpecView do something such as download a recipe, start the process, check process parameters etc?"

 

All of these are possible providing the sequence of events can be broken down to simple 'If – Then' statements that the SpecView’s optional Strategy Controller can perform.

 

Consider the example of downloading a recipe based on a barcode. If there are only a limited set of possible barcodes, then having an event for each possible barcode is reasonable. The Strategy Controller would be set up as:

 

Event: Barcode = ABCDEFGH        Action: Recipe: Download Specific Recipe: 'Blue Widgets'

 

However, it is probable that there are far too many combinations to do a direct mapping; therefore a part of the barcode can be extracted using SpecView's Math Function to get the relevant characters.

 

Using the Math Function Divide operator on a text variable works as a 'mid' function, so the characters from the 'x'th position onward are taken, until the end of the text (where the first character is 0).

 

For example, the fourth character of the barcode might identify the recipe to be used for this process.

 

Therefore, to extract 'D' from 'ABCDEFGH' use divide by 3 giving 'DEFGH' and subtract 1 to give 'D'.

 

The Strategy Controller is now simplified to:

 

Event: Barcode = D        Action: Recipe: Download Specific Recipe: 'Blue Widgets'

 

If multiple barcode scanners are being utilized through multiple remote copies of SpecView, then it is strongly recommended to use method 1 mentioned below (Connecting the barcode scanner interface to a serial port).

Using method 1 will avoid conflicting inputs received simultaneously from multiple remotes.

 

How do I use a barcode scanner with SpecView?

 

There are two ways to communicate with a barcode scanner from SpecView:
 

1. By connecting the barcode scanner interface to a Serial port

 

2. In series with a keyboard, sometimes called a 'keyboard wedge'