Problems with viQueryf in VISA 2.6

We've recently installed VISA 2.6 on our systems and have found that our routines making use of viQueryf are no longer working. We've narrowed it down to two main problems:
1. When using "%#t", the size of the array is returned instead of the number of characters read, unless the size of the array is less than the number of characters read.
For example:
ViInt32 strSize = 256;
ViChar stringResult[256] = "\0";
stringResult[0] = 0;
ErrStatus = viQueryf(SessionID, "%s\n", "%#t",
"SYST:ERR?", &strSize,
stringResult);
This returns 256 as the strSize, even through only 14 characters are returned in the string. If I change strSize to 0, then after r
unning the function, it returns 14.
2. The function is not writing a null-terminating character to the return string. For example:
ViInt32 errorCode = 0;
ViChar errorMessage[256] = "abcdefghijklmnopqrstuvwxyz0124556789";
ErrStatus = viQueryf(SessionID, "SYST:ERR?\n", "%ld,%t", &errorCode, errorMessage);
After executing this, errorMessage contains "No error"\nlmnopqrstuvwxyz0124556789.
Flushing the buffer does not change the results, nor does setting the first character to null or calling sprintf(errorMessage, "\0"). The only way we've been able to work around this is to zero-fill the string previous to calling the function.
Are there any workarounds or fixes for these problems?
Scott

Scott:
This is a known bug in NI-VISA 2.6.0. There is a patch (for Win32) available at the following URL. Just copy visa32.dll over the one in your Windows system directory.
ftp://ftp.ni.com/support/visa/drivers/win32/2.6/patch/
Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments

Similar Messages

  • TS1646 hello  I have problem with regist my visa and I cannot buy from store the message came in the end of form is says the phone number must be a 7-digit number and I have writed but not accepted iam from saudi arabia my mobile is 966504850992 pls answe

    hello 
    I have problem with regist my visa and I cannot buy from store
    the message came in the end of form is says
    the phone number must be a 7-digit number
    and I have writed but not accepted
    iam from saudi arabia
    my mobile is 966504850992
    pls answer
    thanks
    dfr aldossary

    Wow, Karan Taneja, you've just embarrassed yourself on a worldwide support forum.  Not only is your post ridiculous and completely inappropriate for a technical support forum, but it also shows your ignorance as to whom you think the audience is.  Apple is not here.  It's users, like you. 
    If you would have spent half the time actually reading the Terms of Use of this forum that YOU agreed to by signing up to post, as you did composing that usesless, inappropriate post, you (and the rest of us on this forum) would have been much better off.

  • I have problem with sharge to visa no accpted

    Hi I have problem with sharge to visa no accpted

    Hi Louis,
    Thanks for your reply. I saw it from the KVM console.
    I had reset the CIMC to factory default configuration.
    Thanks very much!

  • HT3702 I have. Problem with holding my visa

    I Have problem with my visa it 's holding because i use it many time

    HI ..
    Contact Apple directly >    Contact Apple Support

  • LV 6.0.1 causing problem with Report Gen VIs

    I have just upgraded from LabVIEW 6.0i to 6.0.1 and have now got a problem
    whereby many Report Generation VIs (such as New Report Line.vi) are now reporting
    that they are using invalid ActiveX methods. The NIReports.Report object
    appears to no longer export any methods at all.

    Hi,
    When I run report( over 28000 pages) with same data set in linux environment then report still run normally.
    I can run this report in win2k3 env developer, but my customer can't run it(my customer also use application server 10gr2 in win2k3), number user of my customer is about 150 user.
    It isn't still work if I redirect report to another output. And I view Application Server -> Report Server then I see one job is running for a long time.
    Report Engine:
    Initial Engines (initEngine)     2
    Maximum Engines (maxEngine)     2
    Minimum Engines (minEngine)     1
    Maximum Jobs Before Shutdown (engLife)     50
    Maximum Idle Before Shutdown (maxIdle) (minutes)     30
    Cache Size (MB)     150
    Idle Timeout (minutes)     20
    Maximum Connections     20
    Maximum Queue Size     1000
    Trace Options: none
    Trace Mode: trace_replace
    Best regards
    Thanks.

  • Problem with Assemble Test VIs for Run-Time Distribution

    I get an error that a file is already in memory and that I will have to remove it before I can build the application. The file in question is Get File System Seperator.vi. It lives in vi.lib\Utility\sysinfo.llb. If it is not a stock vi from national and was placed there by some other add on tools (perhaps an OpenG toolkit), how can I disable it? Labview itself will not boot without this sysinfo.llb.
    I am using TestStand Engine 2.01 on the XP system and 2.01f1 on win2000 with the same results. I am not using numerical limits so the fix (patch) for multiple numerical limits does not seem to be needed.

    Hi Paul,
    In the description of your problem you state that "I will have to remove it before I can build the application". I was wondering if you could elaborate on the scenario you are describing because this is a little bit confusing to me as it is. The "Assemble Test VIs for Run-Time Distribution" tool in the Sequence Editor does not involve "building an application" as part of the process of using it. When you select the menu option for this tool, a TestStand sequence is invoked that has a few LV VI steps in it which perform the VI Assembly process, with no application building involved (just searching through sequences for top-level vis, their sub-vis, and copying them all into a directory you choose). I hope this describes what it is I'm not understanding about your statement, but to explain why it is that I feel this is important is in order to reproduce the problem I need to know exactly what it is you are doing at the time of encountering the problem. To go over a common set of issues people encounter when they use this tool, I would like to see if you have tried the following:
    1) Have you checked to make sure that the LabVIEW Standard Prototype Adapter is configured to use the LabVIEW development environment as its Run-Time Server before running the tool. It will not work if the adapter is set to use TestStand LVRTS or TestStandGUILVRTS. The assembly tool requires features of the full LV IDE to perform the functions it carries out, and you will get an error if the adapter is configured improperly. To check this out, go to Configure >> Adapters..., select the LV Adapter in the listbox, then click the Configure button. In the second dialog, change the run-time server option to "LabVIEW".
    2) Are you actually trying to build the Assemble Test VIs for Runtime Distribution tool into an application? (This is not an intended use of the tool's VIs).
    3) Before running the assembly tool, have you tried using the Sequence Editor's File >> Unload All Modules option?
    Let me know if you have tried the above things or if you are doing any of the "unintended" things with the tool so I can get a better grasp of when it is you are seeing the problem. Again, the goal would be for us to reproduce it.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Problem with write key VIs (config-file)

    Hi
    My problem is this: when I use the write key VIs to write to an ini-file, the values are not written/updated in the ini-file. Does
    anybody has a solution???
    thank YOU!!!
    Attachments:
    writetest.vi ‏32 KB

    astroboy wrote:
    Hi Dennis, writing key updates or add lines, but the problem is that it also causes all lines to be clumped together, making it unreadable.
    What's the better way?
    Clement
    I was complaining about the poor formatting of the .ini files myself a couple years ago in this thread. http://forums.ni.com/ni/board/message?board.id=170&message.id=273552
    I found the offending piece of code was buried pretty deep in the Config File VI hierarchy.
    One idea is to go back after the file is written and find where all the section headers are and insert your own blank lines.
    Also look at this thread http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=408776
    You may also want to add kudoes to the config file idea in the Idea board.  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Comments-in-configuration-file-ini/idi-p/927874#A614 
    Message Edited by Ravens Fan on 09-17-2009 10:29 PM

  • PROBLEM WITH THE "SNOOZE" vis a vis ALARM

    can anybody tell me, how to stop ALARM FROM SNOOZING OR HOW TO STOP THE ALARM BUTTON.
    I tried sliding the STOP AND SNOOZE button,....doesnt work...??
    even HELP provided on the Nokia X6 16GB doesnt give any information on this ??
    thanx
    astral

    Let me guess, you are pressing the slide animation as if it was a button?
    Instead of pressing it have you tried swiping your finger across the screen in the direction the arrow is moving?
    You'll find that if you swipe it works as that's the way it was designed to work.  It's also the same for answering calls (when the screen is locked).

  • I just recently purchased 3 songs from itunes not knowing that I had no money on my debit card (visa) left. My iphone wont let me update my apps and says that there was a billing problem with my last purchase. I dont know what I am supposed to do!

    I just recently purchased 3 songs from itunes not knowing that I had no money on my debit card (visa) left. My iphone wont let me update my apps and says that there was a billing problem with my last purchase. I dont know what I am supposed to do! I dont understand why it worked in the first place when it wasn't supposed to!

    There seems to be a billing problem with the iTS.  I've been trying to make purchases today (Dec 9th) too and it reports either the iTS can not process payments or it says my card was declined. I even changed the payment method to Paypal (which is never declined) and still no go.
    I don't think it is "you" but a problem at Apple.  Some popular new apps were released recently like Logic Pro and perhaps they're getting bombarded as they did when Lion was released.
    Wait a few hours and then try again.

  • Can't download anything from app store or itunes. everytime i try to install an app i get "there is abilling problem with a previous purchase. please update ur payment method". i have recently changed my address and visa debit card. please help

    can't download anything from app store or itunes. everytime i try to install an app i get this error "there is a billing problem with a previous purchase. please update ur payment method". i have recently changed my visa debit card and home adress and when i make these changes i still get the same error.
    will u please help me out?

    Are you listing the billing address for the card correctly? The address in the iTunes/MAS account must match the address on your bill exactly.

  • HT1918 I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me. There's a billing problem with a previous purchase. Please update your payment method. The program will not let me u

    I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me.
    There's a billing problem with a previous purchase. Please update your payment method.
    The program will not let me update, what am I doing wrong. rose165

    I would love to have a phone number to call someone with apple on this issue.

  • Problem with underground cable - engineer visit re...

    I reported a fault on my line last week, and an Openreach engineer turned up on Friday and confirmed that the fault was in an undergound cable on public land, and not within the boundary of my property. There are two nearby BT access covers in the public footpath outside - apparently the line is ok from the house to the nearest box, and the fault is between that box and the next one.
    According to the Openreach engineer, the next step would be for them to come out and trace the exact location of the fault (which wouldn't require access to my property), then the footpath would be dug up so that the cable could be renewed or repaired.
    It appears that BT Retail has a different viewpoint to that of Openreach, as the fault summary on bt.com now says that an engineer visit is required. However, until the cable is repaired I haven't a clue what this is supposed to achieve that the first one didn't.
    Is this a case of Openreach and BT Retail struggling to communicate properly with each other, or is there actually some point to having another engineer visit that I may have missed? Before I arrange to take yet time off work to wait for an engineer, I'd like to make sure that it's really necessary.

    The plot thickens...
    Wife phoned to try to find out more, and during a rather frustrating phone call she was informed that the fault outside was fixed on Sunday morning, and they now want an engineer to come and check that it works up to the house. Plus the usual threat of a £129 charge. So we have an engineer booked to visit on Friday morning.
    I do have a number of problems with the statements made by the individual that my wife spoke to:
    1. An Openreach engineer has already checked that the line is ok from the master socket to the BT "hole in the ground" located 12 metres away, on public land and not within the property boundary. He estimated that the fault in the cable was 15 metres away, between the nearest access point and the next one (which is about 16 metres away).
    2. I'd have thought that we'd have noticed someone digging up the tarmac on a Sunday morning, in view of the front window, but we didn't. Neither did we notice them filling in the hole afterwards. Perhaps Openreach employ silent (and invisible) contractors to dig up the roads at weekends.
    3. More importantly, the line is a dead as ever, and dialling it from a different line or a mobile always gets an engaged tone - this hasn't changed since the fault was reported to BT.
    I'd certainly not be very happy with a £129 charge, particularly as if the problem is within our boundary the engineer that came last week should have found it. Hopefully Friday won't be a total waste of time, for me or for the Openreach engineer, but not holding out much hope at the moment as nothing seems to have changed since the first visit.
    On the plus side, it's been quieter in the evenings as the telespammers haven't been able to get through for the past week or so!

  • Visa problem with old instrument

    Hallo!
    I have a Problem with an old Jobin Yvon HR320 Monochromator which I try to access via VISA. Sadly I have no manual for the instrument. My task is, to convert an old VEE-Programm to Labview 7.0 using an agilent PCI GPIB-card. In VEE the monoc. is initialised with a string "248222 " which returns a B if not initialised yet. This works fine with LV. The next step is to send "O2000" as a string then, in VEE, Write Byte "0" and at last a blank. This should return a character "f". In LV I don´t know how to write the zero as byte. The VEE I/O busmonitor shows that there is a differenc if I write the zero as text or as byte. Maybe someone knows a solution for this problem?
    Thanks
    C.Kandler
    P.S. I read a lot about the ni-spy, but I can´t find it in labview. Is there a posibility to download this tool?

    C.,
    a LabVIEW string is more like a Pascal string, rather than a C string.
    To write binary data you should create a string constant or control, right-click on it and choose "'\' Codes Display" or "Hex Display". Now you can enter a null Byte as '\00' or '00' (without the quotes, of course), depending on what type of display mode you have chosen. The first mode ist easier to combine with normal printabel text, whereas the latter is better for binary strings.
    NI Spy was installed here in C:\Program Files\National Instruments\NI Spy\NISpy.exe. It might be a component with higher level versions of LabVIEW, not with the base version.
    But if you create probes you could as well debug your app without NISpy.
    HTH and
    Greetings from Germany!
    Uwe

  • Problems with Labivew 2013 / 14 install - Ni Variable Engine error and Labview does not close, processes do not stop when I run Vis.

    Hi All,
    I am hoping at all my problems are relateded to a problem I am experancing, when I look into my windows 7 (64bit) event viewer near every time I boot up I get an error regarding the NI Variable Engine which reads.
    The description for Event ID 0 from source NI Variable Engine cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    C:\Program Files (x86)\National Instruments\Shared\Tagger\ni_tagger_plugin_mxs.dll: Failure to load plugin: Unexpected Error: Unable to get the Interface from the plug-in.
    and a second which is the same apart fomr the last line
    Unable to load the MXS configuration plugIn: Failed to get MAX Configuration interface for Tagger: 0x80040318
    I have tried uninstalling all labview things and I have tried repairing all labivew programs. Along with this I got this error when I installed Labview 2013 so I thougth why not try 2014 and I still get the same problems. I also shoudl point out I use bot 32 bit and 64 bit versions of labivew. I have installed labview on many machines before but never encountered this problem. That being said this was a new clean windows install.
    Along with thiese errors labview heardly ever shuts down properly when I close the program it just freezes and needs forshed shut down.
    Apart form this I noticed that when I run any of my Vis which I have never had problems with in the past and I stop the program somtiems processes keep using CPU such as "lktsrv.exe"
    I really need to get this sorted out because its morstly the crushing and processes not stopping which is rather annoying.
    I shoudl also say that these problems are both in the 32bit and 64 bit versions of labview not difference. and no difference if its 2013 or 2014
    Cheers

    Hi GajanS,
    Thanks for your reply sorry I havetn noticed anybody had replied as I stopped hoping for any responce before then.
    I have attached a screenshot of the four processes that seems to be giving me a problem.
    I have actually managed to find the program causing labivew to crash was in fact my antivirus software which I have now removed and have no more problems with labview crashing on shutdown.
    After removing it I tried the repair feature again for all my labview programs but sadly the one persistant problem remaining is still the four processes using around 13% processor each. I have found out this happens sometime after booting up regardless of if I run labivew or not. So it does not directly seem related to the running of any labview applications but rather a bug in the labview software.
     the processes are:
    lktsrv.exe
    tagsrv.exe
    nidmsrv.exe
    lkads.exe
    as shown in the task manager.
    I would relaly help if I can get this sorted out.
    Cheers
    Attachments:
    Screenshot 2015-03-24 21.50.00.png ‏12 KB

  • Problem with visa 3.2

    Hi all,
    We have a problem with an application (LV7.1 / WXP) which has to decode serial data from a smart actuator. This actuator sends 8 bytes of data @38400 bps every 3ms (which leaves about 1ms interval between these blocks of data). The application is working perfectly with VISA 2.60 but since we tried it with VISA 3.20, we are constantly getting framing and I/O errors.
    We are sure that the problem is coming from VISA, as we ran the software on the same PC with 2.60 and 3.20. The errors come only with 3.20.
    An application engineer of NI told us that these errors were not implemented in the 2.60 version and that's why they didn't show up. However, the data that were read by the software with 2.60 were absolutely consistent (no garbage) ! If we filter these errors out, many data are lost, so this is not a solution.
    The problems come either in development mode or with an executable file.
    Does anyone know about the origin of these framing errors ? The signal is clean, no noise and Hyperterminal does not seem to have problems with it.
    If it can help, we can provide a NI-Spy capture file.
    Thanks to anyone who can give us some advice on this topic !

    Hi Kaustubh,
    Yes, either a Spy capture or some specific error codes would be great to continue troubleshooting this issue. Without more specifics, it is hard to say what errors that VISA 3.2 is catching that 2.6 did not. Hopefully we can help you further once a spy capture is posted.
    Alternatively, if VISA 3.2 does catch some errors that did not harm your original program, or even errors that your original program depended upon, you could always go back to the previous version and use that one. Just wanted to be sure you were aware of that option.
    john m
    Applications Engineer

Maybe you are looking for

  • Want to install Windows on my MacBook...am I out of luck?

    Hi guys, So I have a Late 2008 Unibody 13" MacBook ("MacBook 5,1") which I recently upgraded by installing Mavericks (previously had Snow Leopard.) I want to install Windows on a partition via Boot Camp. Previously, I had Windows XP installed, but I

  • Printing problems with macbook pro and canon 4150

    I have a Macbook Pro running 10.6.8.  I also have a Canon imageclass MF4150 printer.  I downloaded from the canon website the driver Mac-UFR II Printer Driver V2.25.  When I try to print, I get an error message. Can anyone suggest a generic printer d

  • ACH note to payee

    Hello, When using the ACH format the note to payee is not filled consistently. For example I have 5 payments in the file, but only 2 of them have a 7 record. I have checked the REGUP table and XBLNR is filled for all concerning 5 payments.  I use SAP

  • Extended Withholding Tax - Minimum Amount

    Dear SAP Expert, In our setup we have extended withholding tax incoming payment for outgoing invoices. The scenario is if invoice base amount is less than 300 EGP (local curreny) then withholding tax information should not capture invoice document. I

  • P7-1446s Hooking up a Audio-Technica AT-LP120- USB Turn Table Windows 8 64bit

    When I plug the USB cable from my Audio -Technica AT-LP120 USB turn table into my HP p7-1446s,  I loose sound from anything else such as iTunes. The computer recognizes the turn table, it shows up as a "3-USB Audio CODec Default Communication Device"