Example Code

Prologix GPIB-USB Controller

Code and Documents

Attachment

Overview:

This is a clear front-end used to communicate from USB to GPIB Instruments using the Prologix GPIB-USB Controller

Description:

This vi handles all of the base FTDI chipset commands and will poll all of the GPIB Addresses to determine what instruments are available for communication.  All SCPI (Standard Commands for Programmable Instruments) as well as the FTDI chipset commands are permitted.

Requirements:

  1. A GPIB-USB Controller from www.prologix.biz
  2. This controller device requires an USB-b plug cable for communications and power
  3. This controller device can be placed directly on the back of an instrument or can be used as a bus controller with multiple GPIB cables and 24-pin Centronics connectors
  4. The FT245R chip drivers need to be downloaded from the www.ftdichip.com website in order for proper operation of the controller device. Install the drivers according to the directions on the website.

Steps to Implement or Execute Code:

  1. The 'VISA resource name' is where the appropriate USB port connecting this device gets assigned.
  2. If the controller device is properly assigned, run the vi with all other default settings.
  3. The vi will poll each of the GPIB Addresses and determine which addresses respond to an *stb? query.
  4. Any Instrument that responded to the *stb? query will be active and not greyed out under the 'GPIB Addr' enumeration field.
  5. If your Instrument is active, jump over the next step and continue, else continue to the next step.
  6. Not all Instruments respond to the *stb? query.  Check the documentation for your Instrument and select a common query that all instruments will respond to or select a command that will permit that instrument to respond.  Enter that query command in the 'Query (*stb?)' field then re-run the in poll mode by selecting Poll in the 'GPIB Addr' enumeration field before hitting the run button.
  7. Once your Instrument is active and selected in the 'GPIB Addr' field, you can send any valid Instrument command or query in the 'write buffer (*idn?)' field.  If the command string contains a '?' in the field, then it will display the intrument response in the 'Readback' field upon successful completion.
  8. All following commands or queries to the same address will result in a change of the 'GPIB Addr' field to Previous such that it will continue there until changed to a new GPIB Address.

Additional Information or References:

Prologix.gif

NOTE:

Any FTDI chipset commands entered into the 'write buffer (*idn?)' field only require the correct 'VISA resource name' assignment for the controller and will ignore any GPIB Addressing.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors