Does NiVisa fix the Ethernet read buffer allocation bug?

NiVisa 3.01 does not properly allocate memory for the read buffer and gives resource allocation error messages.

Thanks you Scott for answering me.
The problem showed up when trying to read back the instrument state of a Tektronixs TDS3014 oscilloscope.
Shown below is the most significant code:
status = viOpen(viDefaultSession, TCPIP::12::INSTR, VI_NULL, VI_NULL, &viESA);
strTemp = "*LRN?";
status = viWrite (viESA, (ViBuf)strTemp.GetBuffer(strTemp.GetLength()), strTemp.GetLength(), &nRetCount);
// Then to retrieve the data:
status = viRead(viESA, (ViBuf)cResult, sizeof(cResult), &nRetCount);
The viRead command will generate an error to the effect that there is insufficient memory. Sorry, I no longer have the oscilloscope on site and can't get the exact error. Attempts to set the read buffer don't help.
Thanks,
Steve

Similar Messages

  • Reduce the number of Buffer Allocations

    Is there an easy way to find and reduce the number of Buffer Allocations in a LabVIEW application?
    Let me give you some background onto my approach before getting into my issues:  I create a waveform and send it to a PXI-6552 for generation.  At the same time that it outputs this waveform, it is also acquiring another waveform.  I process this acquired waveform's information and then save it to disk.  This loops over and over.
    I want to run this VI for periods of time AT LEAST equal to 24 hours.  (Maybe longer!)
    I know that you can't really control memory management much in LabVIEW, but is there a way to reduce the number of allocations between iterations?  Or, at least, free up some memory between for-loop iterations? 
    When I use the Profile >> Show Buffer Allocations, it seems like everything and their sister VIs all blink with dots.  :/ 
    I would prefer not to run the Memory Profiler and my application for 24 straight hours to examine its memory management and potential to crash.  There has to be a better way to go about this.
    The common places I find these Buffer Allocations are:
    Constants initialized in the loop
    Number to Fractional String VI
    Pretty much every subVI input/output pin
    NI HSDIO functions
    Build array function
    Every numeric multiplication/division function
    Every comparison AND, OR, equal to, etc.
    Am I really, really bad at LabVIEW memory management, or is there something obvious I am missing?  Please help me out   I cannot find much literature on the subject aside from "use the profile tools".
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

    That was very informative.
     I also stumbled upon this by jumping from link to link in the help documents http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/vi_memory_usage/.  So I am reading through this now!
    I also considered running it on a more microscopic scale just to see how rapidly the memory will grow.  It still might be worthwhile to test.
    My question about the "buffers":
    In a textual programming language, I believe I could re-use almost all of the allocated memory without duplication.  Is there a way to analyze the code to check where or if new memory is being allocated?  And is it possible to enforce a waveform data type (I believe its just a cluster) of size X to be over written next iteration by the new waveform data type also of size X?  Or do you believe this might already be happening?
    EDIT:
    I cannot release actual code due to Company policies, but I am using the following general set-up:
    Create a relatively simple I2C waveform using the I2C Waveform Reference Library.  This is passed through a tunnel to the while loop.  I also pass a reference to the NI HSDIO generation and acquisition channels and an error cluster via tunnels as well.
    Within the actual loop, I use the NI HSDIO to send the same waveform every iteration to the PXI.  I use NI HSDIO Fetch Waveform to return a DWDT (digital waveform data type) which is the same size as the original waveform but naturally with different elements.
    I post process this DWDT by converting it to boolean with Digital to Boolean Array VI, a few build arrays, array transpose'es, and comparsion functions.
    Lastly I convert this boolean array into a string of 0's and 1's and then substrings from this string.  (Around 10 per iteration).  These 10 substrings are converted to decimal numbers which are built into an array that is saved to disk with Write Spreadsheet to File .
    I do not use any shift registers or anything.  It contains no inner loops but does use an inner case structure.
    I do not suspect any large allocations before or after this main loop either.
    I also do not have any front panel objects (except for the file path Contol, but this could be set to be a constant if need be.)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • What is apple doing to fix the bugs from IOS 7.1.2 update? this update has ruined my phone

    What is Apple doing to fix the bugs from IOS 7.1.2 update??? This update has ruined my phone! Why would you put out a update you know is going to ruin someones phone? Whats being done? I have tried everything to fix my phone which was just fine before Apples IOS 7.1.2 update!!!

    I have also experienced issues with my iphone5 since updating to ios 7.1.2, prior to this update my phone was working perfectly fine and I know I didnt cause any damage to the phone because I baby my iphone as if it was my child. Ever since I updated to 7.1.2 my phone shutts itself down while I am using it, it can be while using whatsapp, browsing the internet or using apps, more than anything it fails while using the internet. The screen will either start to flicker or vertical lines will pop up and then the phone will fade to black, after this happens the phone will get really hot and to turn it back on I have to wait 5-10 minutes and hold down the power and home keys at the same time for about 15 seconds for it to turn back on, I have to wait 5-10 minutes because if I dont when I boot it back up it immediately shutts down again. This is a constant all day thing and for now i get by just making phone calls and sending regular text but I try to keep the action down to a minimum to prevent missing a phone call. I tried clearing the phone and rebooting it to original setting but this didnt fix it. After reading and speaking with several techs they tell me that ios 7.1.2 rolled out some performance adjustments one particular that affects the amp levels that the battery works at and supposedly the iphone 5 cant handle it, they explained that the phone for certain activities is asking for more or less power and the phone panics into safe mode and shutts itself down. My battery life is fine so I havent changed the battery like someone had suggested. In the diagnostic data it gives a panic.ips error. Id really like to know if there is any possible way to roll back to 7.1.1 through jailbreak or any other way, I was perfectly happy with this phone and didnt plan on buying another one for atleast 1-2 more years. If anyone can help me out this would be greatly appreciated, if not I hope apple is working to fix this.

  • I cannot download and use ITunes successfully.MSVCR80.dll is missing. Reinstalling does not fix the problem.

    I cannot download and use Itunes successfully. Message MSVCR80.dll is missing. Reinstalling does not fix the problem. I also get a error 7, Windows error 126.
    How can I fix this?

    Solving MSVCR80 issue and Windows iTunes install issues.

  • I have iMove 11 and photos turn very dark when I drag  them into the project. Changing colour white balance does not fix the problem.

    I have iMove 11 and photos turn very dark when I drag  them into the project. Changing colour white balance does not fix the problem.

    Thanks for your no help line.

  • Mac OS X Server v10.7 does not show the ethernet link aggregated interface I created in Server Hardware Network Dialogue window. Are link aggregated ethernet connections not supported in Lion Server?

    Mac OS X Server v10.7 does not show the ethernet link aggregated interface i created. Does Lion server support ethernet link aggregated interfaces?

    Thanks for responding Cold--
    Hardware: Mac Pro  3.0 GHZ quad core xeon
    I read the link but it still does not explain why the aggregated dual ethernet interface does not show up in the Network tab of the hardware section Lion Server. I was able to see it on the network and looks to be using a single static IP that I assigned. My concern was that is this supported and will it allow for failover and double performance of the single network interface.
    Any thoughts?
    Thanks again!

  • HT1925 My computer no longer recognises my iphone and can't be seen on itunes. My ipod works perfectly on the same computer. rebooting my iphone and PC does not fix the problem.

    When I connect my iPhone to my PC it is not recognised and iTunes does not open. When I connect my iPod to the same PC everything works perfectly. I conclude that the problem is not on the PC or with iTunes. Switching off and rebooting the iPhone and the PC does not fix the problem. Any suggestions??

    Refer to this article:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538

  • I contiue to get the error message registry settings used by itunes drivers for importing and burning CD's and DVD's are missing.  Please reinstall itunes.  Reinstalling itunes does not fix the problems

    I continue to get the error message registry settings used by itunes drivers for importing and burning CD's and DVD's are missing.  Please reinstall itunes.  Reinstalling itunes does not fix the problems

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • PE 13 crashes due to incompatible video driver detected. Running on Win 7 SP1 with ATI 540v video card/driver.  Deleting bad driver file in adobe program data does not fix the problem,  it simply replaces the text file and crashes again.  My video driver

    PE 13 crashes due to incompatible video driver detected. Running on Win 7 SP1 with ATI 540v video card/driver.  Deleting bad driver file in adobe program data does not fix the problem,  it simply replaces the text file and crashes again.  My video driver is just fine.  Any help out there?

    rb
    Your video card driver may be fine for something, but just not compatible with Premiere Elements 13/13.1.
    For those with the display card error, the answers include
    a. assure your video card/graphics card driver version is up to date according to the web site of the manufacturer of the card -
    if necessary consider a driver roll back.
    b. determine in Device Manager/Display Adapters if the computer is using 2 cards instead of 1
    c. delete the BadDrivers.txt file
    the rationale for that deletion is found in post 10 of the following older post...principle applies to 13 as well as 9.
    Re: Premiere Elements 9 Tryout Serious Display Problem
    Have you looked for computer ATI card settings that might be more compatible with Premiere Elements 13/13.1?
    When is the program crashing - just opening a new project or rather crashing if editing a particular video format at the Timeline level?
    ATR

  • I need to know how to fix the Adobe reader so I can read the same docs, my bank statements, etc

    I need to know how to fix the Adobe reader so I can read the same PDF docs, my bank statements, etc that I have always been able to read before.

    Then why was I able to read them before? I downloaded a PDF study guide that I have been using for weeks.  Then all of a sudden, a couple days after I purchased rights from ADOBE to convert from text to PDF everything comes up in a different fot.  It is in a draft type of font that is very light, the caps are bold and it is difficult to read.  I can still read the Study Guide, though it is hard on my eyes, but my bank statements are illegible.  Now please tell me if it isn't Reader, what is it? and HOW DO I FIX IT?

  • OS X Mavericks v10.9.4 Update still does not fix the wifi shut off in sleep mode problem

    OS X Mavericks v10.9.4 Update was supposed to fix the wifi connectivity problem with my iMac. Wifi disconnects in sleep mode and does not connect when awakened.  Must reconnect manually every time. PITA.

    Your observation is correct about wifi disconnection in sleep mode. That is normal, you may want to check to see if your Mac supports Power Nap/is enabled- OS X: About Power Nap
    The reconnect should be automatic within a few seconds.
    Does it happen with multiple wifi networks or just one?
    Have you tried deleting and re-adding the wifi network?

  • QuickTime 7.3.1 Update...Does It Fix The FCP Issue?

    QuickTime was just updated again. does anyone know if this fixes the 7.3 problem that caused FCP to "lock up" for a few frames during import?

    William,
    See this post.
    http://discussions.apple.com/thread.jspa?messageID=5847657&#5847657
    7.3.1 Update Does NOT fix FCP problem, only a security update.
    FCP 4.5 and below is not compatible with QT 7.3. I guess this is going to force us to upgrade FCP, I will not do a downgrade like some people suggested.

  • Error code 2324, what is this and how does one fix the issue?, error code 2324, what is this and how does one fix the issue?, error code 2324, what is this and how does one fix the issue?

    How does one fix error code 2324 that I receive each time I attempt to upgrade my iTunes.  Of course now iTunes will not work until this issue is fixed.  Thanks, D

    Let's try the fixit from the following Microsoft document with that one:
    Fix problems with programs that can't be installed or uninstalled

  • My iPhoto has a constant spinning pinwheel. Even Forced Quit does not fix the problem. Any advice?

    My iPhoto has been doing this for the past 4 days. The pinwheel never goes away. I have forced quit countless times and still it does not work. I have looked all over the internet but have yet to find a solution that makes my iPhoto usable again. Can anyone help? Thank you!
    A little background: I have a feeling I started the problem as I pulled out my camera's memory stick in a rush before I had ejected it on the iPhoto program.

    You tv probably has 2 seperate inputs, DVI and HDMI. You will need one these adapters if you want to connect via HDMI however on a machine as old as yours neither the  HDMI or DVI will only output video, not audio.
    http://store.apple.com/us/product/M9321G/B/apple-mini-dvi-to-dvi-adapter?fnode=5 1
    If you want to use the HDMI you will need:
    http://store.apple.com/us/product/TY600VC/A/griffin-mini-displayport-to-hdmi-wit h-audio-dvi?
    Finally OS X has been available for well over a decade. Please look at About this Mac (click the Apple symbol in the upper left corner of the display. Then look to see what version of OS X is installed.

  • Adobe flash keeps crashing and reloading and changing timeout per your instructions, does not fix the problem. What else can be done?

    I recently upgraded Firefox and now I cannot use it if I want to watch something involving Adobe Flash because it crashes. I read your article and made sure I am up to date on all programs through Firefox check page. I reset the timeout on the adobe flash to -1 per your article. Your article states it may crash and just re-load it. I have done all your advice and it still will not run. I am now using Windows as my default browser because I don't have time right now to research this on my own and solve it. I don't know if you are aware that the fixes you suggested are not fixing the problem.

    Try reinstalling the previous version of Flash - 10.1 r 102 and get rid of that 10.2 r152 version. ''I never updated Flash and I haven't had a problem with Firefox 4.0 on WinXP.''
    http://www.oldapps.com/flash_player.php?old_flash_player=19 <br />
    scroll down to <br />
    Download Flash Player 10.1 (Non-IE Browsers)
    or from Adobe <br />
    http://kb2.adobe.com/cps/142/tn_14266.html

Maybe you are looking for

  • Unlimited Data Plan removed without my knowledge or consent. Verizon refuses to reinstate. Any suggestions? Please and Thank you.

    I am desperately reaching out to anybody that may be able to help me with this situation. I don't want to give up hope, but I feel that it may be a battle that I cannot win. This is my story... A few years ago, my iPhone 3G was stolen. At that time,

  • Optical Out Port

    Hi guys, I've just bought some 7.1 headphones that fit into the optical out port on my mac pro. I'm just wondering how to open the port or put the cable in? Do you just push it in or do you have to take the little door off somehow?

  • WPF: How to know the selection is come from datagrid or from ListBox?

    Our application has a page which includes DataGrid and ListBox. Both ItemSource are binding to PlateCells. public ObservableCollection<CellVM> PlateCells public class CellVM : BaseViewModel public CellVM(int wellNumber) WellNumber = wellNumber; Row =

  • How to find grey exclamation mark pics?

    Hi gang, I have noticed when going back over some old pics that some have the thumbnail, but when I hit space to view the photo close up, I get a grey exclamation mark.  When using Reveal in Finder, the original pic file is present and looks fine.  T

  • CS 3.1.1

    Hello Calrke, I see the missed start error on CS  home screen, Attached is the error.