LabView VISA problem

Hi, I'm very new to LabvView and I'm having trouble with communicating
with an instrument. It's on an RS232 port Com1. I decided to test if
LabView could communicate with the device so I loaded the setup
software that came with it which established a connection on Com1. So I
went into Instrument I/O assist and I was able to successfully validate
the the port settings. I went into the VISA test Panel and I ran the
Basic I/O *IDN?\n and I got I read count of 6 back, but a status of 0.
I executed viGetAttribute VI_ATTR_TMO_VALUE and it returned 2000. So I
added a Query and Parse step for the *IDN?\n command and I get a
timeout Status code : bfff0015 no matter what I set the timeout value
to. So I'm wondering if this means the VI's that came with our
instrument won't be able to communicate with it. Or is there some
obvious thing I'm doing wrong?
Thanks for your patience,
-Shane

Hi Shane,
Also make sure that you are using the proper termination character with the command you send to your device. Here and here are documents that discuss adding termination characters automatically for you with VISA. Otherwise, you can just add this character to the end of the string you write to the device. I hope this helps!
Regards,
Missy S.
Calibration Engineer
National Instruments

Similar Messages

  • Some errors when calling LabVIEW VIs Interactively from DIAdem

    Hi! I'm having some trouble using the "Calling LabVIEW VIs Interactively from DIAdem" found on:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/1A98AB48E35D913086256E23004E6A22
    Following the troubleshooting section didn't resolve the issue. I
    recompiled and built the exe (DIAdemLabVIEW.exe) for version 7.1.1,
    which I am developing on. But still I got the same error message, after
    a waiting for about a minute, on a diadem popup window:
    Error in <MenuAdd...ctDo.vbs (row:1, column: 1)
    Error in <addmenuentry.vbs (row:14, column: 3)
    ActiveX component can't create object.: 'DIAdemLabWIEV.Application'
    Using the llb's and exe's that was included with the installer worked
    flawless, with the exception that LV 7.1.1 vi's didn't appear on the
    popup window(DIAdemLabWiev.vi). So I tried to recompile and build for
    the 7.1.1, with this result.
    I'd be very grateful for fixes or solutions for this problem!
    Regards
    Roger Isaksson

    Brad, thanks for the reply! Below is my (correct?) modification of your script. Have I got it right?
    Dim lvapp, vi, viPath, paramName(1), paramVal(1)
    Set lvapp = CreateObject("LabVIEW.Application")
    viPath = "C:\TEMP\Test.exe"
    Set vi = lvapp.GetVIReference(viPath)
    vi.FPWinOpen = True
    paramName(0) = "In Name"
    paramVal(0)  = "In Value"
    paramName(1) = "Ut Name"
    Call vi.Call(paramName, paramVal)
    Call lvapp.Quit()
    MsgBox "Parameter1 Value = " & paramVal(1)
    I am not sure about the format of the <paramName(0) = "In Name">.
    The control name is "In" and is a I32, the name for the indicator is
    "Ut" and has the same storage type as the control.
    Running the script gives an error in line 4, that is the <Set vi =
    lvapp.GetVIReference(viPath)>. I'll attach the exe and the error
    message.
    I have another question regarding the relatively large amount of RAM
    that diadem uses for export from my labview application to diadem. More
    than 10 times the size of the data is required for exporting to diadem.
    Since our application use relatively large files, actually up to
    several GB's, this soon becomes problematic. See the attached picture
    of the memory usage after exporting a 10MB segment (contains 42
    channels of measurement data). Your help in these matters would be
    appreciated!
    Regards
    Roger Isaksson, Damill AB
    Message Edited by Roger Isaksson on 09-09-2005 10:22 AM
    Message Edited by Roger Isaksson on 09-09-2005 10:22 AM
    Attachments:
    VBError.JPG ‏181 KB
    Test1.vi ‏9 KB

  • VISA problem when setting serial read buffer on MAC?

    Hello,
    I have the following rather strange problem with serial communication on a Macintosh:
    1. I wrote a program using the simple serial VIs provided in LabVIEW and write and receive amounts of data up to about 25000 bytes. The serial buffers are both set to 32000 bytes. If I wait long enough everything works perfect (this was just a test VI for reference)
    2. I wrote the same program using VISA calls, I initialize the port exactly the same (or so I think), set and flush both read and write buffers. Then I send the data, which seems to work, except that I have to increase the general time out of the VISA session (which is already odd as it should just be sent to the buffer). However the read oper
    ation allways fails. It seems that no matter how long I wait after the write operation the buffer only contains 63 bytes, where is the rest going (from the program described above and the reaction of the instrument I know that everything is sent!)? What I read is the echo of what is sent plus one extra byte, it seems that those 63 bytes are the first 63 that are sent, the buffer is thus not overwritten as I would expect if the buffersize was to small.
    If anyone could shed some light on this problem I would be very greatfull.
    Best regards
    Koen

    I haven't tried this yet but I had the same problem as you. This was
    pasted from an earlier response from a post I made a month ago.
    >There are 2 things to try here:
    >1) Set the serial input end mode attribute to 0. The
    >attribute/property name is either "ASRL End In" or "Serial End Mode
    >for Reads".
    >2) Use the "VISA Set I/O Buffer Size" function in the VISA Interface
    >Specific subpalette. This will let you set the receive and/or
    >transmit buffer size.
    >LabVIEW VISA Software Dude...
    Koen wrote:
    > Hello,
    >
    > I have the following rather strange problem with serial communication
    > on a Macintosh:
    >
    > 1. I wrote a program using the simple serial VIs provided in LabVIEW
    > and write and receive amounts of data up to about 25000 bytes. The
    > serial buffers are bo
    th set to 32000 bytes. If I wait long enough
    > everything works perfect (this was just a test VI for reference)
    > 2. I wrote the same program using VISA calls, I initialize the port
    > exactly the same (or so I think), set and flush both read and write
    > buffers. Then I send the data, which seems to work, except that I have
    > to increase the general time out of the VISA session (which is already
    > odd as it should just be sent to the buffer). However the read
    > operation allways fails. It seems that no matter how long I wait after
    > the write operation the buffer only contains 63 bytes, where is the
    > rest going (from the program described above and the reaction of the
    > instrument I know that everything is sent!)? What I read is the echo
    > of what is sent plus one extra byte, it seems that those 63 bytes are
    > the first 63 that are sent, the buffer is thus not overwritten as I
    > would expect if the buffersize was to small.
    >
    > If anyone could shed some light on this problem I would be
    very
    > greatfull.
    >
    > Best regards
    > Koen

  • Instrument alias doesn't show up in Labview VISA selection

    Hi, I am new to the boards and on a project to control hardware. I am also new to labview so please bear with me. My problem as follows
    MAX detects this 82357A Agilent GPIB Cable I was assigned as Misc but doesn't show up in Labview Visa selection on the front panel. I am sure the cable is working as the connection wizard I installed for this cable succeeds in finding the cable. I do like to ask if anyone have any way to solve this issue, thanks you.

    Emo123,
    Have you tried addressing the instrument directly?  Typically a VISA Resource Name for a GPIB device is something similar to GPIB::0::INSTR, see if you can find a resource name in MAX for your device and then type that into the VISA Resource Name control in LabVIEW.
    If MAX is able to communicate with the device then LabVIEW should be able to.
    Simon H
    LabVIEW Product Manager
    National Instruments 

  • Find names of all open windows including other applications besides LabView VIs

    Hi All, I have researched this subject, i.e., to find names of all open windows including other applications besides LabView VIs, but found no solution. Could someone suggest a solution to this?  Thanks.

    Hi,
    Certainly! The Windows API Function Utilities (32-bit) for LabVIEW includes set of LabVIEW libraries (llb) with VIs that make calls to the Windows Application Programming Interface (API) for managing and controlling windows (minimize, maximize, move, resize, rename, close, and so on) including task list with names of windows application running. The Readme.doc contains information on running these VIs.
    Attached below is a zipped file with a VI that list the names of all opened windows.
    Tunde
    Message Edited by Tunde A on 04-18-2007 02:28 PM
    Attachments:
    List Windows Application LV8.0.zip ‏55 KB

  • Labview VIs for HP 35670A

    The link to the labview VIs for the HP 35670A is no longer valid and the search for the same returns nothing.  Does anyone have the Labview VIs for that instrument?
    The last post was back in 2004(see below)
    The instrument driver for the HP 35670A is only
    supported under LabVIEW 6 and 7. You should upgrade to the latest
    version of LabVIEW in order to use the HP 35670A driver or any of the
    newer drivers that we release in the future.
    The instrument
    driver for the HP 35670A can be found on our web site at
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/61f1c707c2f10906862568ab005fb9ff?Ope...
    Solved!
    Go to Solution.

    Why don't you go to the Instrument Driver Network? I don't know what kind of search you did but the driver is certainly still available and can be found by using the search option there.

  • How to read and write data from Excel to TestStand without using LabVIEW VIs

    Hi,
    How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
    I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
    Thanks for your help.

    That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
    http://www.microsoft.com/en-us/download/details.aspx?id=16250
    http://support.microsoft.com/kb/141759
    http://support.microsoft.com/kb/302084
    CTA, CLA, MTFBWY

  • Communicating USB using Labview VISA

    I have a USB RAW device that I am trying to communicate with using labview VISA. I have had success with setting up the driver and I am able to get information from the device such as serial number, etc. When I try to use the VISA read and write commands, I have no success getting the information I want. The commands are simple: R SP<CR><LF> is a read set point command. The only thing I do get back for every command I try, is a 2 byte message "01 60"hex.
    If you have any suggestions, I would appreciate it, thanks!
    [email protected]

    Hello Chris, I do not receive any errors and yes, I am including the termination characters in the string.
    Here is what I get when I use a USB port monitor when I send out this string.
    Thanks!!
    [94] URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (SUCCESS/0x00000000) 20101119150318.131 (+0)
    Pipe handle: 0x87696D6C
    Transfer flags: 0x00000002 (USBD_SHORT_TRANSFER_OUT, USBD_SHORT_TRANSFER_OK)
    Transfer buffer MDL: 0x88C47208
    Transfer buffer length: 6
    Bytes transferred
    0x0000: 52 20 53 50 0D 0A (R SP.. )
    [94] URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (SUCCESS/0x00000000) 20101119150318.147 (+16)
    IRP status: 0x00000000 (STATUS_SUCCESS)
    Pipe handle: 0x87696D6C
    Transfer flags: 0x00000002 (USBD_SHORT_TRANSFER_OUT, USBD_SHORT_TRANSFER_OK)
    Transfer buffer MDL: 0x88C47208

  • Calling labview VIs from python in Linux

    Hello.
    I've spent some time searching for this but I haven't found exactly what I was hoping for.
    I'm involved in a project that we're starting now and it involves creating a complex software architecture in order to control a robot. This software will need to perform multiple tasks such as interfacing with hardware (which LabView is perfect for) as well as planning and high performance image processing (which LabView isn't as great for).
    I was hoping to be able to use a scripting language like python to manage high level stuff (planning, behavior, etc) by calling "subroutines" in other languages such as C++ for the high performance stuff and LabView VIs for the hardware interfacing. I would also like this to run on Linux.
    I've found a lot of suggestions on how to call Python scripts from within LabView but this is not what I want. I want exactly the opposite, invoke VIs from Python. I found some information on how to do this on Windows (http://zone.ni.com/devzone/cda/tut/p/id/5719) but this article seems to assume that Windows is being used.
    Does anybody have an idea on how to do this? 

    Unfortunately that's not an option. This is an interdisciplinary school project involving students from engineering (mechanical, electrical and more), computer science and more fields. Some of these students have gotten used to using Labview and this is the main reason I'm trying to accomplish this. I want to have the higher level architecture done in a scripting language such as python which will enable us to create modules in various different environments such as C++ for tasks requiring high performance (image processing for example), Labview for tasks that the people used to using that and even something running on the GPU if there's use for that. Python would make it easy to glue all these components together while maintaining an environment that would make it very easy to configure the whole software system in different ways.
    I'd also prefer that this all run on Linux.
    The more I look for this the more hopeless I get I'll find anything which is very frustrating. It's a bit hard to believe that Labview doesn't have "python bindings" for running the VIs from within python :-(

  • Logging data in a file using Labview VIs vs. Mathscript functions.

    Hello,
     I'm working on a data logger at 200 Hz frequency. I wanted to log the data to a file after eace sample received. When I used (fopen,fprintf,....) on Mathscript, the Labview started to log the data at a slower rate. I then used the Labview file VIs and it is working fine up till now.
    My questions are as follows:
    1- Are the file functions in the Mathscript slower than the Labview VIs ?
    2- Is saving the data to a file after each sample is received a good idea or is there a better idea ? I just don't want to keep the data in the memory and after all the data is logged, I flush them to a file ... because, it seems that the PC will run out of memory.
    Thank you,
     Walid

    wfarid wrote:
    Hello,
     I'm working on a data logger at 200 Hz frequency. I wanted to log the data to a file after eace sample received. When I used (fopen,fprintf,....) on Mathscript, the Labview started to log the data at a slower rate. I then used the Labview file VIs and it is working fine up till now.
    My questions are as follows:
    1- Are the file functions in the Mathscript slower than the Labview VIs ?
    Yes. That's because you're going through another layer of software. Why were you trying to use MathScript to log data to file in the first place? Are you a Matlab "aficionado"? 
    2- Is saving the data to a file after each sample is received a good idea or is there a better idea ? I just don't want to keep the data in the memory and after all the data is logged, I flush them to a file ... because, it seems that the PC will run out of memory.
    It doesn't make sense to save data after each sample. File I/O is an expensive operation in terms of time, and you have the operating system to deal with, so while you may be able to keep up the rate for some time, eventually it will be thrown off. You can do as suggested which is to wait until you have a certain amount and then write that to file, or you can set up a producer-consumer or master-slave architecture. Let one process/loop collect the data and put into a buffer, like a queue, and the other process/loop can stream it to disk at a more reasonable rate. You just have to make sure the buffer is large enough so that if the file I/O gets hung up you won't reach the buffer's limit.

  • Using HTTPS and SSH from LabVIEW VIs

    I am currently using custom VIs, built over the TCP/IP LabVIEW VIs, to access to a distant machine with the TELNET protocol, and to access a HTTP server with the HTTP protocol.
    In a near future, I will have to use more secure protocols such as SSH and HTTPS, that my VIs will no longer support.
    Does the NI Internet toolkit support SSH and HTTPS?
    And if it doesn't, what are the solutions?
    Using PuTTY with a command line for SSH is suggested by NI and I have already tested this successfully.
    Have someone other solutions and an idea for using HTTPS?
    I'm currently using LV 6.1.

    Hello,
    You could find other solutions on this forum thread : http://forums.ni.com/ni/board/message?board.id=170​&message.id=77865&requireLogin=False
    Regards,
    Isabelle
    Ingénieur d'applications
    National Instruments France

  • Where can I find example LabVIEW VIs for the NI-USRP?

    There are several sources of example LabVIEW VIs for the NI USRP:
    We have established a NI Community "NI USRP Example LabVIEW VIs" where you can find example VIs from us (NI) and the community.
    The NI-USRP driver installs a variety of example VIs to the to the following folder on your PC: 
    <LabVIEW Installation path>\examples\instr\niUSRP 
    where you should replace <LabVIEW Installation path> with the root folder of your local LabVIEW installation. For instance, my Windows 7 32-bit PC here has LabVIEW 2011 installed and the examples can be found here: C:\Program Files\National Instruments\LabVIEW 2011\examples\instr\niUSRP
    I've installed the NI-USRP driver, but I can't seem to find the new examples in the LabVIEW Example Finder. Where are the example LabVIEW VIs installed by the NI-USRP driver?
    Although the NI-USRP driver does indeed install examples, the current NI-USRP 1.1 release does not update the LabVIEW Example Finder with entries for these examples. To find the examples, you can navigate the Windows Start Menu to the following location: 
    Start Menu\Programs\National Instruments\NI-USRP\Examples
    This Start Menu entry includes several Shortcuts that point to folders that are the home to example VIs.
    Sam Shearman

    Hello,
    It looks like Agilent/HP makes the 8990A, but I was not able to find a driver for it that we or Agilent has written for this device.
    Since I am not familiar with the 8990A, I cannot recommend which drivers might be similar, but you are pointed in the right direction. Agilent themselves might know more about which models use similar command sets so that you can modify a driver easily.
    Hope this helps.
    Scott B.
    Applications Engineer
    National Instruments

  • How to use Modal Parameter Extraction Labview VIs

    I can't install Modal Parameter Extraction Labview VIs
    http://zone.ni.com/devzone/cda/epd/p/id/6121
    The installer says "NI Labview System Identification Toolkit 4.0 or 2009 must be installed before you can install NI Modal
    Parameters Identification 1.1"
    under Labview 2010(+the
    LabVIEW Advanced Signal Processing Toolkit and LabVIEW System
    Identification Toolkit).
    Should I delete Labview 2010 and reinstall 2009??
    解決済!
    解決策の投稿を見る。

    Hi KCMTM,
    My name is Yusuke Minami, Applications Engineer, NI Japan.
    I'm so sorry, but the "Modal Parameter Extraction Labview VIs" is not supported by LabVIEW 2010.
    Since it will unlikely be updated for 2010, we have to ask you to install LabVIEW 2009 with the LabVIEW Advanced Signal Processing Toolkit and LabVIEW System Identification Toolkit in order to use the package.
    Although I cannot guarantee, but I'll send an update request to the R&D.
    I deeply apologize for the inconvenience.
    日本ナショナルインスツルメンツ株式会社 技術部 巳波裕介
    Yusuke Minami, Applications Engineering, National Instruments Japan
    技術サポートウェブページ: http://www.ni.com/support/ja
    お問い合わせフリーダイヤル: 0120-527196

  • Ability to control LabVIEW VIs through a standard Web browser

    Ability to control LabVIEW VIs through a standard Web browser?
    Do you know where I can get information on doing this?
    I want to be able to control Labview Vis through the web.
    Best regards,
    Krispiekream
    Solved!
    Go to Solution.

    http://zone.ni.com/devzone/cda/tut/p/id/4791
    Best regards,
    Krispiekream

  • Metrics on Labview VIs

    Does anyone have a VI or utility that will collect lines of code equivalents
    for Labview VIs? Or any other similar SW metric for measuring complexity
    of LV code?

    Wesley Wong wrote:
    > Does anyone have a VI or utility that will collect lines of code equivalents
    > for Labview VIs? Or any other similar SW metric for measuring complexity
    > of LV code?
    You do not say what version you have.
    There is a tool in the Professional Dev System for lv5.1
    that does VI metrics. It measures quite a few parameters of your VIS
    If you have PDS Version 5.1 look under the Project menu and select
    VI Metrics.
    If not you may want to consider upgrading or contacting NI sales.
    Kevin Kent

Maybe you are looking for