Error -201402; how do you programmat​ically determine 'Samples per file' size

Error -201402 - The samples per file is not divisible by the file write size. The error also give a suggested value to use, which is helpful, and i have amended by code to suit this value.
I am writting to a tdms file in chunks, such as the first 2.5-5 seconds save the data (sampled at 1M samples per second per channel) to tdms files named initial.tdms, initial_0001.tdms (need to be able to split the files due large data size) then capture the remainder, such as 150 seconds of data (sampled at 1000 samples per second per channel) into a single file, remainder.tdms
Example Inputs to the vi will be:
Initial sampling rate = 1M
Initial acquire time = 2.5 seconds
Remainder sampling rate = 1000
Remainder acquire time = 150 seconds
What I want is to be able to programmatically set Logging.SampPerFile and maybe Logging.FileWriteSize to improve maintainablility and code reuse (I have a number of difference sequence patterns to generate/ capture.)
I am also developing this code on a debug system which may have a different hard drive volume sector size so need to be able to derive the FileWriteSize based on this value, but don't know how to get/view this hard drive info.
How do I go about this?
Cheers,
Helen
CLD, CTD

Thank you for your help.
The Get Volume Info does indeed give me the Sector Size, however i still had problems with working out what multiple of the sector size to use.
Based on "Samples per file - must be EVENLY divisible by the file write size" and "File write size - must be EVENLY divisible by the sector size" I have derived te following code snippet which ensures that the calculated SampPerFile is divisible by 4 (2 lots of evenly divisble by).
Whilst this appears to work I wonder if anyone could comment/ suggest any pitfalls etc.
Regards,
Helen
CLD, CTD

Similar Messages

  • How do I programmat​ically determine if a device supports external calibratio​n?

    I'm writing a vi to determine the current state of a system with about 6 devices connected, consisting of two cDaq chassis with 9229 and 9269 modules and a few PXI cards. I want the vi to monitor when the devices were last calibrated and issue a warning if the device hasn't been calibrated within the accepted window. I can get the program to work as long as the device I'm polling supports external calibration, but naturally I get an error if it doesn't. I can't seem to find a property node or the like to determine this. Any help would be great.
    This is a gross simplification of what I'm trying to accomplish:
    Attachments:
    calibration snippet.png ‏16 KB

    Well, the trick is that while all of the C modules may be calibratable, the chassis is not. For example, if I have a cDAQ-9178 with 3 9269 units and 5 9229s and I query the system for devices it returns an array with 9 elements because the chassis is detected. If I then loop through those array elements in a for loop and query the last calibration date, I get the error:
    Error -200197 occurred at Property Node DAQmx Calibration Info (arg 2) in Untitled 3
    Possible reason(s):
    Device does not support this property.
    Property: ExtCal.LastDate/Time
    Short of clearing the error and moving on, I don't know how to get around this. I've attached a new snippet in the hopes that it will better illustrate what I'm attempting.
    Thanks again for your help,
    Tanner Blair
    Attachments:
    calibration.png ‏25 KB

  • How do you get ical to show on your home screen?

    How do you get ical to show on your home screen? I deleted it from my homescreen (somehow) and i want to get it back.

    Just open the International preferences panel, go to Times, Customize, and click on the leftmost number (hours). A small triangle lights up, and a pop-up list of various formats opens. Just select the one you like (1-24 or 01-24). Make sure to set the Date & Time preferences to 24-hour clock first.

  • How do you sync iCal on my iMac to my iPad?

    How do you sync iCal on my iMac to my iPad?

    Hi Patti,
    You need to use a server calendar system like on iCloud or Google Calendar. You could alternatively connect your iPad to the computer and use iTunes to sync calendars.
    Best wishes
    John M

  • How do you geT ICal to print out the To Do Items in the same order as you have sorted them on the screen

    How do you geT ICal to print out the To Do Items in the same order as you have sorted them on the screen

    Without actually seeing some of what is in the .ics attachment there's really no way to see what's going on.

  • 5.1 SP10 How do you programmatically make a datasource from a dynamically created Pool?

    How do you programmatically make a data source from a dynamically created Pool?
    I can make the Pool OK but can not find any classes the return a datasource
    given a JDBC Pool.
    Thanks in advance

    Hi John,
    weblogic 5.1 doesn't have API allowing dynamic creation
    of datasources. 6.1 does.
    Regards,
    Slava Imeshev
    How do you programmatically make a data source from a dynamically createdPool?
    >
    I can make the Pool OK but can not find any classes the return adatasource
    given a JDBC Pool.
    Thanks in advance

  • Hi, I'm gone and Restore icons to the original iPad 6.1.2 and up to six time and I'm confronted with error 3194, how do you answer Restore Give Thanks

    Hi, I'm gone and Restore icons to the original iPad 6.1.2 and up to six time and I'm confronted with error 3194, how do you answer Restore Give Thanks

    Read this article: http://support.apple.com/kb/TS3694#error3194
    Make sure your iTunes is up to date (11.0.5 is the newest, I believe)
    Also, try temporarily disabling your security software.

  • HT201250 how do you restore iCal data in Snowleopard?

    how do you restore iCal data in Snowleopard, as was it was wiped during sync update?
    Where is the file? Can it be restored using time machine?

    wrince wrote:
    Where is
    <~/Library/Calendars>
    Can it be restored using time machine?
    Yes.

  • How do you check the existance of a file in Linux?

    Hi,
    How do you check to see if a file in certain directory exists?
    I'm trying something like.
    if [ "ls fhs_jwesha_2.log" ]; then echo Here; else echo Not Here.;fibut I know that's not the right command.
    Anybody?

    Assuming from command line:
    [user@myhost /]$ [ -f /etc/passwd ] && echo "here" || echo "not here"
    here
    [user@myhost /]$ [ -f /etc/no_file ] && echo "here" || echo "not here"
    not hereFor a script, try:
    if [ -f /etc/passwd ]; then echo "here" ; else echo "not here" ; fi-troy
    http://troysunix.blogspot.com

  • All my icons are enlarged, how do you get them back to the regular size so you can see them all and you have the slide bar to get into it?

    all my icons are enlarged, how do you get them back to the regular size so you can see them all and you have the slide bar to get into it?

    This is asked and answered often.  The forum search bar is on the right side of this page.
    It is also covered in the manual - zoom feature.
    iPod touch User Guide (For iOS 4.3 Software)
    Double tap with three fingers

  • How do you can import a pdf forms file in FormsCentral [pdf to fcdt]?

    How do you can import a pdf forms file in FormsCentral [pdf to fcdt]

    Hello Randy
    I could make a chat with the support of adobe. they told me that this option will be ready for August 27th.
    Thank you for your proposal. I send my form. you can test and perhaps send me a file in *. fcdt
    Regards
    Greg

  • How do you drag and drop samples in the ex24 on pro x now that the edit button next to the option tab is no longer there?

    how do you drag and drop samples in the ex24 on pro x now that the edit button next to the option tab is no longer there?

    Well, it's aggravating seeing foolish limitations to the program. Having some experience in education, offering a professional program in a limited version is condescending to the user and has never been proven to help students move forward. Plus, some of the choices made to keep Logic simple are confounding... "removing the edit button on the EXS24"?  That's silly!  

  • How do you change the format on a file, how do you change the format on a file, how do you change the format on a file

    how do you change the format of a file.

    Why do you think repeating yourself is going to make things clear?
    Additional information that might help;
    current format of file,
    desired format of file,
    application that created file
    and applications file going to used in.
    Allan

  • HT201744 How do you actually know where a Spotlight file is?  I mean all well and good Spotlight identifies it but I want to know which file has been identified and where it is......

    How do you actually know where a Spotlight file is?  I mean all well and good Spotlight identifies it but I want to know which file has been identified and where it is......

    To know where the Spotlight file is, highlight it in Spotlight and hold the Command key, so you will see its location at the bottom of the window

  • HT3946 How do you get Nikon D600 camera  raw files to download INTO Apeture 3

    How do you get Nikon D600 camera  raw files to download INTO Apeture 3 ?

    The D600 is a new camera. There should be an update in the near future to accommodate it.
    This was the last one:

Maybe you are looking for

  • [Solved] Shift key doesn't work correctly

    Hi! I have a strange problem for a while. If I hold down the shift key and type the computer releases it itself. Example: I press down the shift key and type some upper case chars and suddenly I am writing lower case chars without releasing the shift

  • After submit process vs. javascript

    I'd appreciate it if you all could help me with this problem. I've searched this forum and google for a resolution but have not found it yet. I'm a newbie with APEX so please bear with me. The issue is that I want a button - could be a delete or subm

  • DHCPMGMT.MSC in Remote Server Administration Tools (RSAT) won't remember DHCP server

    I'm running Remote Server Administration Tools (RSAT) on Windows 7 Professional 64-bit and I've noticed that when I run the DHCP Management tool (DHCPMGMT.MSC) and I add our DHCP Authorised server then close the console, it forgets the DHCP server an

  • hr element placed incorrectly on html page

    <HR> element is placed in a row of a grid but it appears above the table on HTML page. JSP code and HTML output is as follows: <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.

  • How create a bin in lean warehouse

    Hi how to create a bin in lean warehouse, here there is no storage section only picking area is available, how to create a bin. it is not allowing me to create bin with out giving section in ls01n. how to create it. with regards Narendra kumar