Changing the Source of Serial Numbers
There are alternative methods to provide the system with the board's serial number: a dialog box can be used to ask the operator to enter one, or the serial number can come from an XJEase function inserted into the test list. Both options can be used in conjunction with bar-code scanners.
If a test executive such as TestStand is being used, it is best to use an XJEase function because this can avoid the need for a dialog box.
The method is selected via radio-buttons in the Serial Number tab:

Figure 12: Changing the Source of Serial Numbers
The serial number of the unit being tested is held in a built-in global string variable called SERIAL_NUMBER. If the option to take serial numbers from the test system is selected, the software must be told that the strings are being generated in XJEase so that it knows to read them and put them into the log file(s). This is done by including a test function named NEW_SERIAL_NUMBER (from a circuit code file) in the test list. The function will normally contain code that takes a string from the user to set SERIAL_NUMBER.
If a test executive such as TestStand is providing the serial number, the NEW_SERIAL_NUMBER function is still required in the test list because running it tells the XJTAG system that the serial number string has been set. However, in this instance it is not necessary to set the number within the function because SERIAL_NUMBER can be set directly from the test executive, although it can be beneficial to include some validation checks on the entered serial number.
- If the test list contains a test function called NEW_SERIAL_NUMBER, the only selectable option in the settings will be Take serial numbers from test system. If that function does not exist in the test list, the option Take serial numbers from test system will not be available and will be greyed out.
- If the log file's name is configured to include the unit's serial number but no serial number is set during testing, the log file's name will include the text NO SERIAL NUMBER.
User-Entered Serial Numbers
To make XJRunner open a dialog box for a serial number, select the User enters serial numbers option. Although this is simpler than creating a test function, it is less flexible and does not perform validation checks on what is entered.
Using a Test Function
An XJEase test function in a circuit code file can be inserted into the test list to set the global string variable SERIAL_NUMBER. The function can be used to open a dialog box into which the operator is asked to enter a number, and the advantage of using a test function to do this rather than the inbuilt method is that it provides flexibility and can perform validation checks on the string. To use this option, select Take serial numbers from test system.
Use With Bar-Code Scanners
Both methods are suitable for use with bar-code scanners. If a dialog box is being used for an operator to enter a serial number, the scanner should be set to enter text directly into the dialog box. This can be made more efficient by configuring the bar-code scanner to append a carriage return character to the sequence it generates.
- The XJTAG Help system includes a tutorial for XJDeveloper that takes you through a worked example (for the XJDemo v4 board) of using serial numbers and creating a suitable test function.
XJTAG v4.1.101