Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 2 out of 5     Rate this Document

Can I Use a Pre-written Script File of GPIB Commands in IBIC?

Primary Software:
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software:

Problem: I would like to use the Interactive Control (IBIC) to communicate with my instrument, but I would like to automate the process a little. Is there a way to use a script in IBIC, so that I don't have to type in everything over and over again?

Solution: The Interactive Control has a function called that executes scripts (also known as indirect files). The function has the following syntax:

    $ <path to file>

For example, if your script is a file called TestRun.txt (located in the C:\MyFolder directory), then you would use this command to load it and execute it in IBIC:

    $ C:\MyFolder\TestRun.txt

The script file can contain any commands that you use in IBIC, in the same format that you would use in IBIC, with one command per line of the file. Save the script file as a plain text file.

If you notice that your instrument is having trouble keeping up with the execution of the script file, you can insert a delay between your commands (as if you were typing them in manually) by using the ibwait function with an appropriate timeout value.

Related Links:

Attachments:





Report Date: 07/14/1998
Last Updated: 03/26/2001
Document ID: 1BDFCU6Y

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit