Using XJAnalyser Integration
XJAnalyser Integration allows a user to control or read a JTAG device's individual pins, i.e. to access the functionality of XJAnalyser.
Creating a ChainRunner Instance
Once XJLink and AnalyserProject objects have been instantiated, an object of the ChainRunner class can be created. In C#, this is performed using the AnalyserProject.GetChainRunner() method and passing in the XJLink instance:
m_chainRunner = m_project.GetChainRunner(m_xjlink);
If the project uses multiple profiles then the above method will return a ChainRunner object using the default profile. To create a ChainRunner object for a specific profile, use the AnalyserProject.GetChainRunner() overload that takes the profile name as an argument:
m_chainRunner = m_project.GetChainRunner(m_xjlink, profileName);
In LabVIEW, StartRunning.vi (a sub-VI of the XJTAG Write Pin.vi example) can be used to do this as shown in Figure 13 below. This VI creates a ChainRunner instance using the provided AnalyserProject and XJLink refnums and starts the chain running. It returns 2 objects:
- the ChainRunner object, which can be used to control the running state of the JTAG Chain
- a Chain object, which can be used to access JTAG devices in the chain along with their pins

Figure 13: Starting a Chain with XJAnalyser Integration
Accessing XJAnalyser Functions
The ChainRunner object has methods that allow the chain to be started, paused and stopped.
Once a ChainRunner instance is available, its Chain property can be used to access Device objects, which provide access to details of the devices' pins. The Chain property also gives access to Pin objects, which can be used to set physical pins or to read their values.
- A list of all available methods and properties can be found in the XJTAG Help system – see the API Reference for details.
In C#, pins are controlled and read as follows:
var chain = chainRunner.Chain; var pins = chain.GetAllPins(); var devices = chain.Devices(); var pin1 = chain.GetPinByNumber("IC1", "A1"); var pin2 = chain.GetPinByNumber("IC5", "3"); pin1.SetOutput(PinValue.High); // set pin A1 of IC1 high var readValue = pin2.ReadValue; // read the value of IC5 pin 3.
Heavily documented C# code is available for further reference – refer to the section on Examples of Use.
Labview examples are also provided – see Examples of Use, extracts of which are shown below:

Figure 14: Setting pin values in LabVIEW

Figure 15: Reading Pins in LabVIEW
Disposing an XJAnalyser Object
XJAnalyser objects are disposed in a similar manner to XJRunner after all the testing has been completed on one particular board – see the section on Disposing an XJRunner Object.
XJTAG v4.1.101