This series of posts covers how you can integrate XJTAG into your overall test system. This entry focuses on executing programs from within XJEase.

The XJEase keyword SYSTEM is used to execute a system command or program. It accepts the command in the form of a string and returns the exit code from the program. This is a 32 bit unsigned value in Windows. It can be used execute any program which contains additional tests and then check for success or failure by examining the return code.

All commands are executed using the Windows Command Processor, cmd.exe. If the Command Processor is unable to start the specified command line for any reason it returns an exit code of 1.


SYSTEM( STRING command ) ( INTEGER result );


An example of using this is to perhaps run an external program that measures a frequency. In the example below the “MeasureFrequency” program is assumed to return 0 as its exit code if the frequency is between the two values passed in or non-zero if it falls outside.

INT result;

SET TXEN := 1;  // Enable transmitter

SYSTEM("MeasureFrequency.exe 900000 1100000")(result);

SET TXEN := 0;  // Disable transmitter

IF result > 0 THEN
    PRINT("Incorrect frequency detected\n");

By using SYSTEM calls you can therefore run other tests from within XJEase, which can help to integrate all your tests together.