Output a boolean bit on gpib using VISA

The program that is being developed is to test a California Instruments power supply model 801RP.
The problem  is with the function that switches the output of the power supply on and off, the command is "outp <boolean>".
The question I am raising, how can I send this command with a visa transfer over a gpib interface?

Hi,
Its as Dennis says,
Just send the string "outp 0" to set the output off and "outp 1" to set the output on.
If you have a boolean control, wire this to the boolean to numeric converter then use one of the string functions to concat or format the string with "outp ".
In fact there is a string function that provides a string output based on a boolean input.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • Output decimal number through GPIB or VISA

    I was wondering if it is possible to output a decimal number, as in not a string, through the GPIB or VISA commands. I am trying to communicate with a machine that I think wants to get a number, and can't understand what I am sending when it is in a string format.
    thanks

    It is possible to transmit such a number over GPIB. I would double check the instrument manual for what it requires. I'm going to assume that you are using a long to represent a floating pont number. Here is some example code for how you would pass this number to the GPIB ibwrt() function.
    int ud = ibdev(board,PAD,SAD,timeout,eot,eos);
    long myNumber = 4.2;
    ibwrt(ud, &myNumber, sizeof(long));
    Essentially, the driver will break down the 32-bit number into 4 8-bit chunks.
    Craig A.
    National Instruments Engineer

  • Why use Visa Vi's with GPIB? What are the advantages verses disadvantages if any?

    I have read most of the GPIB and Visa documentation in Labview Help.

    There is a great site at http://www.ni.com/visa/why.htm that discusses in detail why programming with VISA would be beneficial.
    In short, though, using VISA would allow you to communicate with your instruments regardless of the physical median: GPIB, Serial, VXI, PXI, etc. VISA is an industry standard with the goal of making software interoperable, reusable, and able to stand the test of time.

  • Controlling two GPIB instruments using VISA

    I'm using Labview 5.1.1 (unfortunatly I have no way of getting a better version) and I want to control a multimeter and a powersupply. I need the power supply to vary it's output while the multimeter reads the data for the different power supply outputs. This means that the multimeter and power supply need to work synchronously. How can I do this using VISA? or is there an easier way?
    -Labmonkey

    This isn't really operating "synchronously" - you're really just trying to set up a closed-loop system. Is there an easier way? Yes. Check if the power supply has remote sense capability. This does exactly what you're trying to do. This is a far better solution that trying to perform the closed-loop system in software. In fact, I would get a different power supply if the one you have doesn't have remote sense capabilities, but that's just me.
    If you *really* had to do in software you basically have to set up a while loop that get the measurements from the multimeter, compares it to the desired setting, sees if it's within your desired "error", calculates how much delta to apply to the programmed voltage for the power supply (taking into account that the
    programming resolution of the power supply won't be the same as the measurement resolution of the multimeter), and the programs the power supply to the new, corrected, setting.
    Still say you're better off with a power supply with remote sensing.
    -Saverio

  • Symbol output using VISA but it suppose to be normal string

    i used VISA to retrieve data from device(TADATAKER). when i unload the historical data to my computer. The data come out all symbols and i am sure that the data is in normal string format because i can receive it correctly in using VB.How to solve it?Is it the computer speed will affect the VISA or the VISA time out problem to receive data?I also not really understand the time out function. If within the time out the VISA also cant receive data it will gv a error message.How do i know when the device will return data to computer.why it can not stand there and keep going receive data without gv error.What is the best time out number or how to determine it?

    please post the exact VISA query you are using.
    As far as the timeout, I rarely change the value. I usually set it to 2 seconds and leave it alone unless I have a very long operation coming up. There is one particular setting a have to use on my power meter to measure a very low duty cycle noise waveform. The power meter can take up to 45 seconds to settle and return data. So before I send the query command I set the timeout to 45000mS. I believe you can set it to a very very large value. Check the VISA manual. ]
    The purpose for the timeout function is so that if you make a query and the instrument is not connected to the bus, or has an internal problem, or there is some other failure, your program doesn't have to just lock up. The query will fail with
    a timeout and your code can use the error information to notify the operator of the problem. So set it to some reasonable value and change it when you start a long operation.
    You mention using VB, but it is unclear if you are still using it. What are you programming with now? That may also be helpful to solving your problem.

  • How do I use VISA to perform GET (Group Execute Trigger) to three DMMs?

    Hi,
    My systems have about 4 GPIB instruments connecting to my computer via Agilent GPIB-USB Interface card.  I have to use VISA to communicate with the interface and instrument.  I wish I can use NI488,.2 but it does not seem to work with Agilent card.  In NI488.2, I could easily send a command such as X? (to read value from Agilent 3458A) to 3 DMMS at once using sendlist module.  However, I do not know how to do similar parallel poll in VISA.  Can anyone help?  There are three FLUKE8505A on the system.  My goal is to read the three measured values triggered  simultaneously on these three FLUKE DMMs. 
    Sincerely yours,
    Rose

    Hi Rose,
    The How Do I See My Agilent 82357A GPIB-USB Interface in MAX/LabVIEW? knowledgebase article explains how to use an Agilent USB-GPIB with NI-VISA. Using the NI-VISA driver will require you install the Agilent I/O Libraries 14.0 and uninstall the Agilent VISA driver.  Once you get your Agilent GPIB-USB device recognized in MAX, you should be able to control the instruments using LabVIEW. 
    Regards,
    Andy L.
    Applications Engineer
    National Instruments

  • Ethernet control of Tektronix scope using VISA

    Hi,
    I have got a new scope, TDS7104 and I want to remotely control it through the Ethernet port. Can anyone help me on how to do this using VISA. I haven't used VISA and I don't know how to start. Most of the examples I have seen are for GPIB and serial interface control. So, I am not clear as to how to use the Ethernet port to control the scope. With the scope, there is a TekVISA software but the examples they have given are for command line programming through C and I don't know how to do it in LabVIEW. Any example would be of great help.
    Thanx & Regards,
    Srini.

    There is a great Knowledge Base article on our website that discusses how to control Ethernet instruments with NI-VISA found here.
    While I am unfamiliar with using Tek-VISA, NI-VISA does have many cool features. Some of these features include the VISA Interactive Control where we can open VISA sessions on the fly without any programming, NI-Spy which allows us to log all NI-VISA driver calls helping us narrow down programming errors and behaviors, and seamless integration with Measurement and Automation Explorer allowing us to configure VISA and test our devices all in one place. More information on NI-VISA can be found at the following document links:
    ”NI-VISA and Tek-VISA; Which Do I Install?
    ”NI-VISA Product Information”
    Hope that helps!
    Craig H.
    NI Applications Engineering

  • Help with RS232 Communication without using VISA

    I'm a newcomer to LabVIEW, and am currently trying to interface with an instrument that communicates via an RS232 serial port.  This instrument is not compatible with the VISA tool, and since that (and the DAQ Assistant) is all I've used to interface with instruments, I'm at a loss as to where to head next.  I know the baud rate, data format, stop bit and parity bit, and am able to generate the ASCII commands that I want to send to the instrument; I just need a bit of help on knowing which function I can use to go the rest of the way.  Thanks for any help.

    Why is the "instrument is not compatible with the VISA tool"?
    VISA is a device driver interface that allows LabVIEW and other NI programs to communicate with the serial port on the PC.  It doesn't care about what instrument is on the other end of that serial connection.  Likewise, the instrument on the other end should have no idea whether it is being communicated to it by way of VISA, or any other device driver.
    If you are having problems, then it is probably in the way you are using VISA and not within VISA itself.  There may be some other ways that you could have your LabVIEW program access your PC's serial ports without VISA, but you are going to have more headaches and problems that way.
    Please provide more details on the problems you are having with using VISA.

  • When I try to install Firefox, I get a "can not open output file" error. I was using Firefox before and it stopped working, so I uninstalled. Cannot re-install now.

    When I try to install Firefox, I get a "can not open output file" error. I was using Firefox before and it stopped working, so I uninstalled. Cannot re-install now.
    == This happened ==
    Every time Firefox opened
    == I tried to download firefox. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AntivirXP08; GTB6.3; .NET CLR 2.0.50727; MS-RTC LM 8)

    When you click the download link on [http://getfirefox.com GetFirefox.com], you should be asked if you wish to Run or Save the file. If the described situation happens when trying to Run the download, try instead to Save it and put the file on your Desktop or a similar place where you are certain that you can find it again.
    When the download is complete, try double-clicking the downloaded file in the normal Windows Explorer (browse your way to the file from My Computer). This should start the installation.
    If you notice in the Explorer window that the file seems to be lacking the Firefox orange/blue icon, rightclick the file and select Properties. The picture should look somewhat like the attached picture (except that mine's in danish, but that is irrelevant) if saved correctly - if it does NOT look like this, please describe the contents or attach a screenshot of the box. Especially what it says under "File type" - it should be "Program"; if it's not, we'll have to look into what the problem could be here.
    Slightly off-topic, your Internet Explorer seems to be quite a bit out of date (IE 6, where current version is IE 8), so I would strongly recommend that you try to run Windows Update to get your system updated. If this is a company system (like a Terminal Server thin client machine), this may not be possible, and your system administrator will most likely have to help you.

  • Raw GPIB and VISA commands

    Hi,
    i have a software, written by an external company in labview 6, to
    control several devices. But I dont have the block diagrams. This
    software use VISA calls to communicate with a profile 800 mainframe.
    Now I want to set an parameter of the mainframe via GPIB raw command.
    I can integrate my own VIs in our software.
    So I have written my VIs to send and read an GPIB-string (with GPIB
    write and GPIB read) and within Labview all is running fine.
    But if I use this VIs within our software, I get an GPIB-error 6. At
    this time there is no other communication in background with this
    device. But if I start Labview and communicate with my VIs once, then
    my VIs work in our software too.
    Do I have a problem with initialization?
    What can I do to solve
    my problem?
    Regards,
    Uwe Roessner

    Hi Uwe,
    It seems like it could be an initialization issue. Perhaps your VI does an initialization that the software doesn't do, but is necessary for your VI to run. I would definitely consider that. According to GPIB Error Codes document:
    EABO (6)
    Error Condition: I/O operation aborted.
    Description: EABO indicates that an I/O operation has been cancelled for some reason.
    Possible Cause: The EABO error is usually the result of a timeout during a read or a write operation, but it can also be caused by calling the ibstop function, the ibclr function, or similar functions while an I/O operation is in progress. You may receive a timeout during write operations with a PCI-GPIB board, if the PCI bus mastering (an option in the BIOS of your computer) is not enabled. You may receive a timeout during read operations, if the instrument you are reading from did not understand the previous command, so it has nothing to write to you. There are a few reasons why the instrument may not have anything to say:
    The message to the instrument may have been misspelled. For example, "*IDN?" is a common identification query for IEEE 488.2 compliant instruments. It is easy to misspell this message as "*IND?", which the instrument will not understand, so it will not generate a message string for you to read from the instrument.
    The message to the instrument may contain a command that the instrument does not understand. For example, the "*IDN?" message from the previous example is only understood by IEEE 488.2 compliant instruments. If your instrument is an older, non-IEEE 488.2 compliant device, then it will not understand "*IDN?", so it will not generate a message string for you to read from the instrument.
    The instrument may use a particular EOS (end of string) character as its termination method, but you may forget to append this termination character to your message. For example, if your instrument expects a linefeed as the EOS character, then "ID?" will not work, but "ID?\n" (where \n represents a linefeed in IBIC) will.
    You may expect to see EOI (end or identify, one of the five bus management lines) as the termination method, but if the instrument does not set the EOI line when it finishes sending its message, any read operation that you perform will time out.
    Solutions:
    Make sure that your messages consist of commands that the instrument understands. Check your device's user manual for a list of possible commands.
    Verify that you are using the correct termination method for your instrument. Byte count (where you expect to receive a certain number of bytes in a message) is always used, but some instruments use EOS and byte count, some use EOI and byte count, and some use only byte count. Check your device's user manual for the possible termination methods to use with your instrument.
    If EOS is the termination method, then be sure to append the termination character to the end of your message. You can specify the termination character in the GPIB Configuration Utility, but the NI-488.2 driver will not automatically append it for you!
    Lengthen the timeout period for I/O operations using the ibtmo command.
    If you receive all of the data and get an EABO error, then look for a particular end of string character (e.g., linefeed or carriage return) and configure the GPIB board to terminate the read on that character using the ibeos function.
    Hope this helps.
    Anu Saha
    Applications Engineer
    National Instruments
    Anu Saha
    Academic Product Marketing Engineer
    National Instruments

  • Detecting PCI Cards in Windows Xp using VISA

    i have written a program to detect the cards for all Platforms.
    When i use it LAb veiw RT it works fine but when i use it in Windows XP it does not work at all.
    I have used VISA for detection .
    Please find the code as attachment
    Suresh Thangappan
    Attachments:
    PXi_info.zip ‏30 KB

    Hello,
    I ran the VI in my XP and it gives me an error because I don't have any PXI instrument, but if I do a GPIB it works fine. So, what do you mean by it doesn't work?
    Does it gives you an error? What error and which VI is giving it?
    Make sure that you have installed VISA in this XP machine and that versions match.
    Let me know
    Ricardo S.

  • GPIB NI VISA viqueryf 488.2 dll difference​s

    I am curious to know what is the functional and performances differences between
    A) VISA DLLs - NiViIo32.dll, NiViSv32.dll, visa32.dll using in VC++ 6.0 Application.
    B) NON VISA DLLs for COM and .NET - NationalInstruments.NI4882.dll and NationalInstruments.Common.dll
    for example reading binary numbers through viqueryf ( ) using VISA32.dll and readIEEEBlock using COM and .NET 488.2DLLs NationalInstruments.NI4882.dll, why viqueryf ( ) is slower?
    Does viqueryf( ) will be set to read until it receives an end of string (EOS), end or identify (EOI), or times out, and then it will scan and format the text according to their format string?
    How ReadIEEEBlock or GPIB_Read works compared to legacy viqueryf( ) in VISA32.DLL?
    Your response is greatly appreciated!!

    I doubt that there is any issue with VISA. There is very, very, little extra overhead in using VISA functions. Under the hood, the VISA functions call the low level GPIB functions after all.
    The time it takes to read the scope will depend on how many points you are requesting, the sample rate, how long it takes for the scope to be triggered. You have not provided this basic sort of information or attached your code.
    p.s. It would probably be advantageous to switch to VISA at some point. It helps prevent obsolence in your code. If you ever switch to Ethernet or USB connections, you would not have to do any rewrites at all or just a minor one.

  • Do I need labview drvier disc for using VISA?

    Hi,
      Do I need  to install the labview driver disc for using VISA (virtual serial port) function? I get the error as the picture? I have no clue what happen.
    thanks
    ====================
    =Labview 7.0 & 8.0 & 8.5=
    =====================
    Attachments:
    labview8.JPG ‏22 KB

    my aim is to use my bluetooth enable notebook (no serial port) to control a bluetooth serial port adapar on a circuit.
    That means "only a bluetooth serial port adapar" is in the whole project. I need to use my notebook bluetooth to control the bluetooth serial port adapar output in the independent circuit, any suggestion?
    I think I need to control a "virtual serial port" and then send the "virtual serial port" data via bluetooth, then use those bluetooth infromation to control the independent circuit        
    Message Edited by zmarcoz on 02-16-2008 03:05 PM
    ====================
    =Labview 7.0 & 8.0 & 8.5=
    =====================

  • 488.2 GPIB versus VISA

    Hi,
    I have an issue regarding GPIB. I want to do the following:
    1. Initialising a Tektronix scope TDS7154 using the provided VISA driver VIs.
    2. Sending a couple of pulses with a waveform generator using the 488.2 GPIB functions
    3. Reading data from the scope with the VISA drivers.
    What I see now is that the scope initialization works fine, also the communication with the waveform generator. But the following VISA communication is very slow. Reading data from the scope takes minutes. Has anybody suggestions what's the problem and how it can be solved? This task is a subroutine in a much bigger program using only the 488.2 GPIB functions. So it would be nice if I don't have to change the way of GPIB communication for one of the two devices.
    Tanks,
    Steve

    I doubt that there is any issue with VISA. There is very, very, little extra overhead in using VISA functions. Under the hood, the VISA functions call the low level GPIB functions after all.
    The time it takes to read the scope will depend on how many points you are requesting, the sample rate, how long it takes for the scope to be triggered. You have not provided this basic sort of information or attached your code.
    p.s. It would probably be advantageous to switch to VISA at some point. It helps prevent obsolence in your code. If you ever switch to Ethernet or USB connections, you would not have to do any rewrites at all or just a minor one.

  • Sending float to arduino uno using VISA

    Hi guys,
    Basically i am trying to send a float to arduino uno.
    I use for that a string .I send at first its length  then i send the numbers.
    For the arduino side ,here is the code.I can see that the board Rx/tx leds blinks when i start the Vi.Unfortunately, the led which  doesn"t blink as it should be.
    Here is a quick look at my arduino code.
    void setup() {
    //Initialize serial and wait for port to open:
    Serial.begin(9600);
    pinMode(13,OUTPUT);
    // Serial.flush();
    // prints title with ending line break
    int i=0;
    int j=0;
    int longu=0;
    char data='F';
    String data2="";
    float val=0;
    int posVir=0;
    void loop()
    if (i==0)
    delay(10);
    data=Serial.read();
    longu=(int)data;
    while (j<longu+1)
    {data=Serial.read();
    data2=data2+data;
    delay(10);
    j=j+1;
    val=data2.toFloat();
    i=1;
    delay(50);
    if (val==22.5)
    digitalWrite(13,HIGH);
    delay(1000);
    digitalWrite(13,LOW);
    delay(1000);
    if (val==315)
    digitalWrite(13,HIGH);
    delay(4000);
    digitalWrite(13,LOW);
    delay(4000);
    val=0;
    Attachments:
    Sending data toarduino V2.vi ‏18 KB

    Basically a rehash of http://forums.ni.com/t5/LabVIEW/Synchronisation-with-arduino-and-Labview-using-visa/m-p/3110008

Maybe you are looking for

  • Report for the list of meterials with  sales text .

    dear all, can any body help me in code for  list of meterials with sales text as discription. thanks &rgds vamsee krishna yadav

  • Issue with length of file paths - Windows & C++ plugin

    Hello, I've got an issue that just popped up on my OCR plugin I've been working on that I suspect is related to the length of the filepath. I'm getting the following error that is being caught and logged when trying to open a file (filename changed f

  • Airport: Self-assigned ip address, can't connect (public routers only)

    this has been talkeda bout before, but is extremely frustrating, because i don't have the problem with a PC. 1/2 of the public routers i connect to have some kind of login page, most the time they just say "youre getting free internet, click here" ..

  • Deploying a servlet in tomcat 5.0

    I install tomcat 5.0 in my pc I can run HelloWorldExample in browser using the following URL: http://localhost:8080/servlets-examples/servlet/HelloWorldExample I copy the HelloWorldExample.class into folder : C:\Program Files\Apache Software Foundati

  • Prevent XI from converting & #163;  to pound character

    The requirement is  in input XML  file & #163; comes..by default in output file xml it is converting  the above grouped of characters to £ sign. how do I retain  & # 163; in output xml file without writing any adapter module for solution Points will