Using an LXI product in LabVIEW

During the installation of the LXI diver package, all the necessary folders and files required to use the instrument from LabVIEW are copied into place on your system, assuming of course that LabVIEW is already installed.

Additionally a suite of example LabView programs is installed, these programs demonstrate most aspects of Pickering product control. They are to be found in the installation folder, usually C:\Pickering\60 Series\Example\LabView and they demonstrate many aspects of LXI programming, including automated discovery of IP address, control of more complex cards such as the Precision Resistor series of cards, examples of how the query an LXI unit to emunerate the cards fitted, to get card identity details and much more.

What follows here is a simple guide to constructing a LabVIEW program for a Pickering LXI product.

Constructing a Program

From the LabVIEW Block Diagram, right-click the mouse on the page to access the Functions palette and navigate to the PIPLX driver as shown in the diagram below:

Screenshot of the Functions palette


From this palette, start to construct your program.

There are five basic building blocks required to control a Pickering LXI device, as shown in the following diagram.

Diagram of a simple program using the palette

The steps required to operate a switch are these:

  1. Open a connection to the remote LXI device
  2. Open a control session on a switch card in the LXI device
  3. Operate a switch
  4. Close the card
  5. Close the session

The last two steps are only required when use of the LXI device is no longer required, they free the card for access by other users. in practice the card will be kept open for the duration of the program and only released as the program exits.

Step-by-step

  1. Connecting to the LXI device

    The IP address of the LXI device must be known and passed to the Connect function. Various applications exist to allow the user to discover the IP address of a connected LXI device, this is documented in our Knowledgebase article "LXI Discovery" and in the product manuals. For the moment we assume that the IP address is '192.168.1.208'. Shown below is a screen shot of the Pickering Find LXI Cards application which provides all the information needed for this, and the following, step.

    Screenshot of the Find LXI cards tool

    In LabVIEW, go to the PIPLX palette, and select the Connect palette, from there select the Conn function, place it on the Block Diagram and then hover over the icon to make its connection visible, right-click on the 'Remote Machine' connection and select Create Constant, then type the IP address of the LXI device.

    None of the other function inputs need to be defined at this stage since the default values are likely to be suitable.

  2. Open a card

    From the OPEN/CLOSE palette, select the Open Spec Card (Open Specified Card) function.

    Next it is necessary to know the bus and slot (or device) number of the card in the LXI device. These numbers are visible in the Find LXI Card application in the lower window where the VISA address string is shown. The Bus and Slot numbers are the digits following the IP address separated by double colon separators, in the above example ::0.6::, the Bus is 0 and the Slot is 6. Add constants to the Bus and Slot input of the Open Specified Card function.

  3. Control a switch

    Next select the Op Bit function from the Output palette.

    Add constants to the Output Subunit and Bit Number input on the left of the icon, and to the Action input at the top.

    Every Pickering switch card has one or more sub-units each containing one or more bits, each bit corresponding to a switch ( or input in the case of a Digital IO card). The user must refer to the manual for the card being controlled to establish the details of sub-units for the card being controlled. Since all Pickering cards have at least one sub-unit with at least one switch, the choice of 1 and 1 in the example will always work.

  4. When all switching operations are completed, it is a good idea to release the card, and the LXI unit, thus freeing them for use by other programs. To do this, place Close Specified Card and Discon functions on the Block Diagram.

  5. Finally wire all the Session Id lines in a daisy-chain, also the the Error lines, attaching an Error Out indicator on the last.

    The program is ready to run.

Of course, there are many other functions available in the driver for more complex control of switch cards. The user should refer to the documentation for the driver software, and the product manual, for more detail on control of a specific switch card. Also the example programs in the driver install folder contain useful examples of LXI and card control.

The above example program can be downloaded by clicking on this link.

How did we do?
0 out of 0 people found this helpful.