Current playback position exceeds the buffer size? VB6 with NIDAQmx 9

I have an application written in VB6 that does HAVE and AO, with both using the Ctr0 internal as the clock to check that they are in sync.   It seems to work very well.  I use a USB-6212 and a recent version of NIDAQmx.

I am tracking the current playback Position by calling DAQmxGetReadCurrReadPos_VB6 in the EveryNCallback routine.

Strangely, the value for each call correctly increases the number of returned samples (for example, 128), but instead of round package when it reaches the upper limit of the buffer (for example 16 * 128) it keeps growing to infinity.  No error is reported by the call to DAQmxGetReadCurrReadPos_VB6 or anything else.

Am I misunderstood something?  This function seems to be to just return the total number of samples read, not the position in the buffer.

What I expect the value of the current to be playback Position:

128, 256, 384, etc..  the limit of the buffer for example 16 x 128 = 2048 how he could start over at 1 (or zero depending on the way which you set up your berries).

Van

Hi afmstm,

The behavior you're seeing is indeed good, and I agree that the description that it is misleading.  The current description says:

"In the samples per channel, shows the current position in the.
buffer.

The description should be interpreted as:

"In the samples per channel shows the current position the acquisition."

So yes, for a relative position within your stamp, you must perform a modulo operation.

That being said, it's not the same thing as 'total number of readings/a. Since the beginning of the program' as you say.  This would be the attribute Total of samples by acquired chain .  It is rarely a chance where these two alignment attributes.  For example, to read N samples successfully the following must be satisfied:

   Total samples by acquired channel - current read Position = N

Another distinction is that you, the user can change the current Position of playback using the properties relative to and Offset .  By default you will read from the current playback Position , which creates the behavior your described.

I know it can be confusing, but this level of manipulation of streaming is a very advanced concept of DAQmx.  Let me know if this raises questions or concerns more!

Tags: NI Hardware

Similar Questions

  • Yahoo mail - the font size increases with each 'Enter' - * solution *.

    I raise this issue because pending a previous thread on this was closed, and I have a solution that works for me.

    The question is in Yahoo mail. When you compose a message in full HTML view, the font size increases with each return (newline or 'Enter').

    (It's always a problem from June 2013 and the current version of Firefox for Mac - version 21.0)

    The solution that works for me is:

    View > Zoom > Zoom text only uncheck

    I found another solution because Ctrl-0 (Reset) has not solved this problem for me, no more than to create an exception for yahoo mail. (I only met the problem on yahoo mail).

    This is what worked for me: under view/Zoom/Zoom settings (No Squint) / Zoom, I had both the value of 120% of full page and text only zoom levels. Reset the text only to 100% solved the problem. (I then increased the parameter full page 125% and the fix still works).

  • Guidelines to set the buffer size?

    Are there articles or messages that describe the basic guidelines for choosing the sizes of memory buffer to use when acquiring data?

    Are there specific problems that occur when the buffers are too large or too small?

    Thank you

    Dave

    The buffer must be large enough to handle the data acquired during the long interval between reading th book.

    Too small and encounter you problems if you do not read your data fast enough.

    Too much and you lose memory.

    My personal recommendation is "close your eyes and imagine the user trying to open a huge Excel spreadsheet while the application is running" - However for long, I suspect that the PC will have to open the file will dictate (based on the sample rate) what is the minimum size. In the old days, I would just double this figure. These days, I can use a 5 fudge factor.

    Ben

  • DAQ Assistant don't update the buffer size to change the frequency

    Hi all

    I use DAQ Assistant inside a loop to write a signal in a module output best 9262 OR a cDAQ-9174.  I generate the signal with the express vi simulate Signal or with a simple loop using indexing.  The problem is that when I change the frequency, using the same sampling frequency, I have a different number of samples to write the cDAQ does not seem to update the size of the buffer, so no my signal gets written in.  The result is the first sine wave is nicely written, but each after that gradually get cut off on the edges.  I traced imput signal that I generate, so I know that it is generated with the right size and frequency of departure, what ever it is, still works, it is those more later in the loop who have the wrong size aparently buffer.  I tried to reset the cDAQ by adding a different DAQ Assistant at the end of the outer loop with the stop bit the true value, it makes me just the error "resource not available.

    Any ideas?

    I'm using LabVIEW Base development system new V12.0 32 bit.

    Thank you

    Matt

    Idea:

    Get rid of the DAQ assistant and use the DAQmx API.  The DAQ Assistant is there to support the limited functionality and base up a dirty experience and running quickly.  The report of the API offers more funcionallity and DAQmx property nodes allow greater flexibility.  DAQ Assistant is just too limited for your needs.  (you can't paint a masterpiece with crayons)

  • When you try to send pictures through Windows Mail I get this error message: size 42117958 exceeds the message size limit.

    original title: mail of the window

    I am trying to send a photo attachment in the mail of the window, I have about 16 photos to send and this is the message I received in return.

    Can someone tell me how to do it correctly.

    Thank you

    42117958, the message size exceeds the size limit
    31457280 Server 63.127.11.31 [63.127.11.31]

    You try to send a 42 MB file, your server only allows you to send 31 megabytes and beneficiaries are limited to 10 megabytes.  Try using Irfanview (www.irfanview.com - free) and you can resize them and save as jpg files and they will be 100 X smaller.  Otherwise, send them 1 by 1.

    To resize them you can specify an image to about 640 x 480 pixels (or the beach), and that will keep the size appropriate for the email.

    Steve

  • Recycle Bin exceeds the maximum size setting

    The customized to my recycle bin maximum size is currently set to 10240 MB (10 GB) for one of my external hard drives, but the current of my recycle bin for this drive size is almost 42 GB, well above what the max is supposed to be.  It seems that around July 17, old files stopped aging whenever new have been removed and moved to the trash.

    I used the same setting to maximum size for my drive hard internal and other disk hard extermal, but I don't think it would affect the size of the basket to the other player, I assumed that they were independent.  Just to be safe, I reduced the max size for the other two discs to 5120 MB, but it changed nothing.

    No idea why my trash is not automatically aging old files more?  Thank you.

    Hello
     
    Thanks for posting in the Microsoft Community Forum. From the description, I understand that you want to know the trash is not delete files after reaching the maximum limit, rest assured that we will do our best to answer this question:
    I suggest you post this question in the following forum:
     
    Hope this information helps. If you have any other questions feel free to respond and we would be happy to help.
  • the buffer size of DBA public has already reached the maximum size of 1703936.

    This error shows up in the journal of my 12 c database alerts.

    I guess it must be linked to some hidden settings.

    _bct_public_dba_buffer_size0total size of all dba buffers, in bytes, of the public change tracking
    _bct_initial_private_dba_buffer_size0initial number of entries in the private sector s/n change tracking buffer
    _bct_public_dba_buffer_dynresize2allow dynamic resizing of the stamps public s/n, zero to disable
    _bct_public_dba_buffer_maxsize0the maximum buffer size allowed for stamps public s/n, in bytes

    But when I check, it seems to be ZERO.

    Not sure where are from 1703936 value?

    Smit

    figured it's not default side effect the LOG_BUFFER parameter.

    Smit

  • The file size huge with save for Web, but an excerpt is ok

    Hello

    I Googled, but not found anything about this but I have the same problem on my computer and also on colleagues from computer so it seems that it should not be completely unknown.

    That's what I do

    1 open an eps file, the logo of a single color, the 72 dpi, size 110 x 21

    2 save for web

    3. Select png-24 format. Said overview file size ~1.3 kB

    4 save-> actual size of the file on disk is 4 k (IE 3 times larger than it should be)

    5 preview and click right then in the browser + save the image under gives correct the size of the file (on my colleagues computer, this does not work, it always receives the right size)

    I also tried with gif and various settings, etc. image sizes and the result is the same.

    I use Windows Vista 32-bit and Photoshop CS4.

    Is this a known issue?

    Thank you

    so this is the metadata that are added, if you set the drop-down list of metadata to zero, you should get more small files

  • How can I increase the buffer size of the StationID variable

    I'm reading the variable string StationID in TestStand, which holds the name of the computer. Currently, it truncates to 14 characters.

    How can I increase the size?

    Thanks in advance.

    Hi WDLV,

    What version of TestStand do you use?  I tried this in 3.5, 4.0 and 4.2 and verified that the StationID (RunState.Root.Locals.StationInfo.StationID) was able to contain a name more than 14 characters.  You use this method to access the stationID, or something else?  Also, you see this with any order, or just an individual?

  • __Details: studying why 38% (11 007) events were lost during data collection. Settings for Windows event trace (ETW, Event Tracing for Windows) buffers, the buffer size and maximum is perhaps best not according to data sets are collected. __

    need to know how to enlarge events tracing buffers

    What is the size of your swap file? increase the size and place it in the root of your systemdrive!

    André "a programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • How to get the current GPS position of the BlackBerry emulator?

    Hello! all, I am writing a simple program to get the current coordinates of GPS (Latitude, Longitude) in BlackBerry.

    Criteria criteria=new Criteria();
            criteria.setHorizontalAccuracy(500);
            criteria.setVerticalAccuracy(500);
            LocationProvider locationProvider=LocationProvider.getInstance(criteria);
            Location location=locationProvider.getLocation(60);
            QualifiedCoordinates coordinates=location.getQualifiedCoordinates();
            System.out.println("Latitude : "+coordinates.getLatitude()+" Longitude : "+coordinates.getLongitude());
    

    But, I couldn't get the latitude and longitude. It returns 0 (zero) for the two coords.

    PLS, suggest me the solution.

    The 9000 Simulator has GPS simulation. In the "Simulation" of the Simulator menu, select "GPS". There is an already defined test site, you will need to select this place.

  • pilot exceeded the buffer battery problem

    I ran on this problem and need help to read the the minidump.  Here is the https://onedrive.live.com/redir?resid=8CA029429049523A%21648 file. Thanks to all who can help.

    You probably have a faulty video card. I would contact the manufacturer.

    Kind regards

    Patrick

  • CS5 wrong position of the guidelines in line with leaders at the zoom in and out.

    Hello!

    I noticed a long time ago and always doing something by changing the scale of the rules (for pixels to something else and back or pressing a TAB key or something to call some event in photoshop) to have my guidelines broken the dimensions adequate when you zoom in my opinion (or back). This looks like a bug of somekind for me, but a missing something and maybe it's a way to get photoshop update guidelines automatically when you zoom in? Is there something for this problem?

    Kinder Pawel

    If you see the zoom animation OpenGL, that is, where the zoom quickly and smoothly change from one level to the other, it is a known problem with the leaders sometimes do not update.

    Assuming you are using documents with tab (no floating windows), with active Zoom tool, try to activate the option [] Resize Windows to enter in the options bar to the top of the main window of Photoshop.  This should disable the animated zoom and make sure that you can see your leaders to update.

    -Christmas

  • What is the best size for a buffer overflow in BlackBerry?

    Hi all

    In my application, I need to read data from an input stream. I put the current size of the buffer for reading as 1024. But I saw in some applications Android size memory buffer has been preserved as 8192 (8 KB). Is there a specific advantage if I increase the buffer size in my application up to 8 k?

    Any expert opinion will be highly appreciated.

    First thing to note is that the method "isAvailable()', in my experience, does not work on OS 5.0 and earlier versions.  It is attached to the OS 6 (at least in my tests).

    Because isAvailable() has been broken, (and for other reasons of demand) that I put in place for a socket connection is that each message is preceded by a length.  So I read in the socket connection, the length of the message, and then the actual data.  This is done with no lock - in other words, I read the entire message, regardless of their size.  I recommend you do the same.  The message must exist in full somewhere, so it makes no difference if it's in memory managed by the socket connection, or some memory managed by you.

    Note also, until the 5.0 OS, when you made reading so that you get all the data fill the buffer you had - in other words, it was blocking.  After the OS 6.0, playback can finish without giving you all the data.

    In your case, you could work in a post OS 6.0 only, so you could use isAvailable() - create a buffer of this size and read all that.  I don't see that it makes a difference if you have the bytes of memory managed by taking, or managed by you.

    But in fact, I would say that the best approach is one that makes your simple treatment.  So, for example, if you know that the following message is 200 bytes, then read 200 bytes and then process this message.  Then read the next message.

    You could spend a lot of time trying to manage the buffer to match the underlying socket buffers.  I don't know exactly how the underlying socket of BlackBerry processing code, but it is not put data directly in your buffers.  Then let it manage its buffer size to optimize the network, you manage your buffer size to optimize your treatment.  That will work best for everyone.

  • How to increase the size of the buffer

    Hi, I would like to ask how can I increase the size of the buffer?

    My problem is that the generation cannot be started,

    because the buffer size is too small by the way I use DAQ Assistant.

    Choose the size of the buffer: 1

    Minimum required buffer size: 2

    so, how do I solve it?

    Thank you

    Chris

    Hello Chris, can I ask what material you use. Currently the DAQ Assistant in your code example is configured to run continuous Acquisition and thus expects a type of dynamic data. This can be seen by the small red spot known as a point of stress and is shown when LabVIEW must convert the data to a different type. There are two options you can try to solve this problem.

    (1) change the type of Acquisition "(on request) 1 sample" in the DAQ Assistant, he will write your input value for the cDAQ with each iteration of the while loop

    (2) change of data entry strikes at a waveform

    Here are some articles that you might find useful http://zone.ni.com/devzone/cda/tut/p/id/5438

    Hope this is useful

    Philippe

Maybe you are looking for

  • How to completely reset the touch Journ.E?

    is it possible to give to zero DAY. E TOUCH, such that she has been in the saleor can be rearranged the system

  • Multifunction NI PCI data acquisition USB adapter to

    Hello world The other day at work, we all talked old hardware laying around projects that we have emptied the. Most of the equipment is older, NI PCI based cards DAQ. It dawned on me that I had never seen or heard talk of a type of card that you can

  • LabVIEW Student Edition 2013 on Mac uninstaller

    I recently installed LabVIEW SE 2013 on MacOS 10.9.2. My goal is a work of ROBOLAB for LabVIEW facility which currently is not working properly. My next idea is a complete and thorough uninstall reinstall software required. Resources OR the purpose o

  • Automatic update problem

    When I turn off the computer, it goes into the installation updates.  It does this every time as apparently the installation was not completed successfully.  I have several other problems. Y at - it someone who can take in charge my computer and diff

  • The HTTP buffer size

    In the API, RIM gives us the following code, void getViaContentConnection(String url) throws IOException { ContentConnection c = null; DataInputStream is = null; try { c = (ContentConnection)Connector.open(url); int len = (int)c.getLength(); dis = c.