USB-5133, hws file to matlab

Hi all,
I use USB-5133 to measure voltages from two channels simultaneously. For that I use the NI-SCOPE. The scope saves the measured data as hws-file. I need these files in Matlab but I cannot open them. What would be the simplest way to export and open this data in Matlab?
All help is greatly appreciated!
Joonas
Solved!
Go to Solution.

Dear Colleagues,
Sorry for answering to this entry 2 years and a half later than the last comment, but my doubt is alligned with what you have been talking about. (Of course, if you consider that I should open a new line in the forum, just tell me, please.)
I have followed all your key points to read some *.HWS files i capture with a PXI NI5124 (12 bits, 2 channels).
I'm already able to read the data in labview and in Matlab, BUT I found a problem with the scaling of the data i have stored:
I took the signals simultaneously (2 channels) from -1V to +1V, but all the data have been stored in INTEGER number like:
16 112 32 128 96 64 80 80 0 32 -48 16 64 48 48 0 16 48 80 16 48 48 16 -16 16 -48 -80 -48 -96 -96 -80 16 -64 -16 -16 48 64 64 144 176 160 128 160 176 160 128 96 32 -16 -64 -160 -128 -160 -160 -176 -176 -192 -96 -32 0 48 48 112 80 192 192 192 192 208 160 64 144 32 -160 16 -64 -128 -256 -176 -128 -192 -208 -144 -48 -128 -256 112 320 16
These are only few samples, as I took 1.000.000 Samples @ 50 MSamples / s per file. I had some values up to +32000 and down to -29000, aprox.
I was surprised as i should had values like 0.001, 0.002 -0.2, -0.00005, etc.
The point is that I have found the scaling coefficients that are applied for each channel:
CH0 a:-1,143859 and b:3,2599724
CH1 a:-1,427364 and b:1,6671666
But I don't know how to scale the values i have registered down to the real ones. And I haven't found how this scaling works on the HWS files.
Thank you very in advance. I wold appreciate any help or int...
Best regards,

Similar Messages

  • How does I read a HWS file that contains 2 traces, in labview? (error -21508)

    Dear experts,
    I have been using a PXI-5105 acquisition card to save data from 2 channels at the same time (coming from different sensors).
    Up to now I have been reading the files in Matlab, taking into consideration the group name, the trace name and the coefficients of each channel. I was able to do the post-processing of the data in Matlab. I attach an example of the kind of files I'm handling if it helps, inside a zip.
    Now I would like to implement this post-processing (FFT, etc.) in Labview. I have tried to use a couple of examples such as "hws_low_level_read.vi" or even the HI-HWS Express load utility to check the file, but it seems difficult to read it because of the 2 channels saved inside the same file.
    The error -21508 appears at the "niHWS Get Wfm reference.vi". That refers to:
    Error -21508 occurred at niHWS Get Wfm Reference.vi
    Possible reason(s): NIHWS:  There is no group in the file that matches the provided group name
    And it seems odd to me, as I'm using the same name for group (wfm_group0) and trace(vector0) than I was using in Matlab.
    Anything I'm missing? Any hint on how to read it in any way?
    Thanks you very much in advance for your help
    Best regards
    IñigoA
    Solved!
    Go to Solution.
    Attachments:
    EjempleHWS2channels.zip ‏44 KB

    Dear all,
    I have been struggling with that problem today and I just wanted to post here how I have finally found a way to read the data.
    It is so easy that I'm a bit ashamed, but I think it is worthy to answer in case anyone would need it.
    The "niHWS Get wfm Reference" is asking for a Group Name and for a waveform name. I have used the "niHWS Get Group Name" and the "niHWS Get wfm Name". Both have direct outputs (strings) with the information that "niHWS Get wfm Reference" understands. You can directly link them.
    But actually, in the reading of the data I found that the group name doesn't need to be fulfilled and the waveform name is "0" or "1" in cae you have 2 channels.
    So, you see, it was very easy for my HWS file: put a control and select "0" or "1" for waveform name. The simpler the better, jejeje.
    I hope it helps. And sorry for opening the question I'm now answering myself. I was completely lost yesterday.
    Best regards
    IñigoA

  • HWS file error when not starting with Ch 0

    Hello,
    I used the "niScope EX Save to File - HWS Low Level - Single Channel Stream.vi" as my starting point and added 8 channels for a 5105 card. Although this is a complex Queue-based vi, it works fine as long as my RAID is fast enough.
    However, we have need to take data from channels 4 to 7 and not start with Ch 0. When I do this, my LabVIEW HWS reader does not see any data, nor does the MATLAB code I have written to read our HWS files.
    Looking at the file in HDFView, I see that the data starts in vector0 and not vector1, as when I record Channels 0 to 3.
    Perhaps I need to use the HDF5 LabVIEW code to force the writing to a different location in the HDF file?
    Thanks for your help.

    Hello,
    I was out of the office Mon. and Tues. I took out a section that just collects one 5105 card in a steaming, continuous collect mode. This is part of a much bigger VI and I included the “Helper Aps” folder that has all the sub-VIs for that larger app. There are more sub-VIs than you need for “5105 Cont Collect.vi”, but it should run once you tell it where the sub-VIs are. Included is a quick-look reader I use to look at the data.
    The data file Ch_0_to_3_5105-0.hws can be read, but the Ch_4_to_7_5105-0.hws file cannot.
    Thank you for your help.
    Attachments:
    5105_Cont_Collect.zip ‏3267 KB

  • HT1351 I've encoded a vinyl LP record into digital format and recorded it onto an usb as MP3 file. But when I tried to copy it onto my ipod classic, I get a message stating "was not copied to the ipod because it cannot be played on this ipod". Why?

    I've encoded a vinyl LP record into digital format and recorded it onto an usb as MP3 file. But when I tried to copy it onto my ipod classic, I get a message stating "was not copied to the ipod because it cannot be played on this ipod". Why?

    I was refering to the "sample rate", normally 44.1 KHz, the iPod might not be able to play tracks with a non-standard rate. Otherwise I'm not sure what the issue might be.
    tt2

  • How to Read TDMS Files in Matlab in OSX

    Using the example found on the NI website (http://digital.ni.com/public.nsf/allkb/0EEADA99DC​7D00A4862572E30037C3A2), I am able to read my TDMS files into Matlab when using a PC.  However, when I try to read them on my Mac, I receive an error:
    ??? There was an error loading the library "/Applications/MATLAB75/work/TDMS_files/dev/bin/ni​libddc.so"
    Error using ==> loaddefinedlibrary
    dlopen(/Applications/MATLAB75/work/TDMS_files/dev/​bin/nilibddc.so, 1): image not found
    Error in ==> read_tdms at 21
    loadlibrary(DLL_Path, H_Path);
     My best guess for this error is the fact that Matlab operates through a Linux interface on Mac, which I found will open the file type .so and not .dll for this type of library.  Is there some way to get around this in OSX and get it to read the .dll files?  Or is there some way to get the libraries as .so files instead of .dll files?
    Thanks for any help!
    -Shelby

    Shelby,
    You may wish to look at a Matlab script another user wrote since they were having issues with NI's matlab support:
    http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=318487#M318487
    The script supposedly converts TDMS files directly in Matlab with no use of NI generated external DLLs.  He was having issues because the NI tools hadn't been updated for the new version of Matlab.

  • Reading Waveform (.hws) files from Analog Waveform Editor into LabVIEW causes read errors

    Hi Gang,
    In my application, I want to create files Using the Analog Waveform Editor and then, through LavVIEW, play them out through an D/A.
    I've not been able to read the .hws file into LV.  I've tried two methods:
    Using the Read Waveform VI in the Waveform palette, yields Error -1821.
    I looked in the knowledgebase and found the article "Using the Analog Waveform Editor and HWS Files with Multifunction DAQ Devices"  That recommended using the HWS VIs that are a part of the FGEN driver.  I tried that and get an Error -21515.
    The file I want to read is quite small, only 20 samples.  Is there some limitation on .hws files or the Waveform Editor I'm not aware of?
    I've attached the file if anyone is willing to experiment. I had to change the extension from .hws to .txt to be able to attach it.
    All responses will be appreciated.
    Thanks,
    Roger
    Solved!
    Go to Solution.
    Attachments:
    Havesine.TXT ‏108 KB

    Interesting. I tried to look at your file with the low level read .hws file vi's and I too got error -21515. So I tried the NI-HWS express load.vi and it looks like it worked. I'm not familiar with the analog waveform editor...does it store using the dynamic data type? Oh I converted the dynamic data to 1d array of waveforms using the convert from dynamic data.vi.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • Load LVM File in Matlab

    How do you load an LVM file in Matlab? I used the code:
    load test.lvm;
    But it returns this error message
    "??? Error using ==> load
    Number of columns on line 10 of ASCII file ......test.lvm
    must be the same as previous lines.
    Error in ==> PlotM at 1
    load test.lvm"
    Could it be the headers in the LVM file?

    Unfortunately, I am the wrong person to ask that question, since I have never used Matlab beyond a simple demo.  However, I can give you some general tips that work in all the programming languages I have used.
    LVM files should be small enough to read the entire file at one time.  If it isn't you really need to use a different format.  Read the entire file in as a text string.
    Search the text string for the tag I mentioned above.  Then look for the second line afterwards (search for CR/LF or whatever your line terminator is).  This will give you the byte offset to start parsing the data lines
    Matlab should have a function to convert spreadsheet file text strings into arrays.  You can either use the data you have in memory (faster) or use a spreadsheet file read utility to read it off disk again, now that you know the offset to start reading.
    Hopefully someone with some Matlab experience can chime in and help you more.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to use HWS files?

    I'm using Soft Front Panel version 2.6 and I obtained HwS files but I can't read them so how could I read them or convert them into notepad file. 
    Other option are Lvm file but use very short time that's why I want to use hws files.

    In the utility section of the NI-SCOPE driver is a link to the HWS file API.  It looks like a folder with waveforms on it.  This will allow you to read the file.  You can convert it  to a text file using the standard LabVIEW file tools.
    Alternately, if you are into real pain, you can download the HDF5 toolsets from NCSA and create a C program to do the same, but I wouldn't advise it.  HDF5 has a very steep learning curve and the internal structure of the file is fairly complex.
    Let us know if you need more help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How do I stop adobe updates downloading as Simulink files in Matlab in order to update the program?

    How do I stop adobe updates downloading as Simulink files in Matlab in order to update the program?

    Hi Jess ,
    Please launch Acrobat>Navigate to Edit>Preferences>Updater>Check mark the option"Do not download or install updates automatically" and uncheck rest of the options or you may choose whichever suits your requirement.
    Regards
    Sukrit Dhingra

  • IPhone4 how through the USB mobile phone file reading and writing?

    iPhone4 how through the USB mobile phone file reading and writing?

    No idea what you are asking.
    Please explain

  • By mistake i ereased my mackbook pro's disk. and when is restared it recovery page opened. and i did not purchase the osx mountain lion. do i have any other way to recory it without purchasing the copy of osx. can i do it using a usb having image file of

    by mistake i ereased my mackbook pro's disk. and when is restared it recovery page opened. and i did not purchase the osx mountain lion. do i have any other way to recory it without purchasing the copy of osx. ?can i do it using a usb having image file of mountain lion?

    Did you buy your machine second-hand? That's really the only way you would have to purchase OS X 10.8.x from the App Store... but, yes, if you have a USB thumb drive with a bootable installer (such as made with Lion DiskMaker) you can boot from that and reinstall OS X.
    Clinton

  • Unable to open USB port device file: Permission denied

    I have an up-to-date system (full "pacman -Syu" yesterday), I am in a "lp" group and the printer (Canon Pixma MP270) started to give "Unable to open USB port device file: Permission denied" error, although in the past it worked and still works in Windows. Doesn't anybody have a similar problem?

    Thanks for reply.
    CUPS worked, I could use CUPS-PDF and localhost:631 was accessible and working.
    Today I managed to print again. I did "pacman -Rcsn cups" and reinstalled it again.
    My printer is Canon Pixma MP270 and so far it wasn't the best choice for Arch Linux—scanning works fine but it's like throwing a coin when it comes to printing. I've written a simple PKGBUILD for installing its printing driver as a regular package, but I don't know what to set as a license.
    pkgname=mp270-printer
    pkgver=3.20
    pkgrel=1
    pkgdesc="Canon Pixma MP270 printer driver"
    arch=('i686')
    url="http://software.canon-europe.com/products/0010753.asp"
    license=('unknown')
    depends=('libpng12' 'gtk2' 'popt')
    makedepends=('deb2targz')
    source=(http://files.canon-europe.com/files/soft37268/software/MP270_debian_driver_pack.tar)
    md5sums=('d26c36e2d1799ddc09e644dc7765f0a3')
    build() {
    cd $srcdir
    tar xzf cnijfilter-mp270series-$pkgver-1-i386-deb.tar.gz
    cd cnijfilter-mp270series-$pkgver-1-i386-deb/packages
    deb2targz *
    tar xzf cnijfilter-common_$pkgver-1_i386.tar.gz
    tar xzf cnijfilter-mp270series_$pkgver-1_i386.tar.gz
    ln -s /usr/lib/libtiff.so usr/lib/libtiff.so.4
    package () {
    cd $srcdir/cnijfilter-mp270series-$pkgver-1-i386-deb/packages
    cp -r usr $pkgdir/

  • Saving a plot as a hws file while pressing a button

    I wanna save a plot received from a digital scope as a hws file while the button shown on the figure (its just a cutting/the important part of the program) below is in pressed (true) state.
    But when im running this program and i press the button always a hws file of a constant length is saved. It makes no difference how long the button stays pressed.
    What could be wrong?
    Attachments:
    save hws file.jpg ‏103 KB

    Without knowing all of the details of your app, I see two issues that don't match up with what you mentioned you are trying to do.
    1) The Open Waveform VI is set to "Create New Always", so at each iteration of your while loop, the old HWS file is being destroyed and a new one is getting created in it's place. If you are intending to append data to an HWS file, you must use the "Read/Write" permissions only.
    2) Your inner for loop has a Create New Waveform VI inside of it. So what is happeing is that each iteration of your for loop is creating a new waveform inside of your HWS file rather than appending to the already existing one. HWS files can save multiple waveforms into one HWS file. I see you are naming each waveform, so I'm guessing this was intentional.
    If you are trying to stream to a file only when the button is pressed, my guess is that your problem is with item 1) above. When the button is pressed, any existing HWS files at that filepath are getting destroyed, and a new one is getting created in it's place. So when your application is finished, you will have one file with one set up data in it. The data will be from the last while loop interation when the boolean was set to true.
    If you are trying to append to an existing HWS file, you will need to open the file with Read/Write permissions and then use the Open Existing Waveform VI rather then the Create New Waveform VI inside of your for loop.
    -JaredW

  • How do I concatenate 2 HWS files or 2 WDT waveforms?

    In SignalExpress, I would like the generated data AND the acquired data in the same HWS file.  I tried to do 2 'Save to HWS' steps, the first with the outputs, the second with the inputs. SignalExpress will not allow me to do this since it cannot write to a file that's already opened.
    I thought LabVIEW could help me. I would like to take the WDT from the generate file and the WDT resulting from the acquire process and combine them before saving them. Any ideas?

    You can only combine samples within a single HWS file. HWS does not support the concatenation of signals in a digital waveform datatype.
    It is easy in LabVIEW to do this before saving your data to HWS.  There is a built in digital waveform datatype VI called "Append Digital Signals.vi". This VI takes two waveforms as input, and concatenates the signals together into a new waveform. For instance, if waveform A had 4 signals and 1000 samples, and waveform B had 12 signals with 1000 samples, the resulting waveform will be 16 signals with 1000 samples.  I think this is what you are looking for.
    To find this VI in the palettes, go to the Waveforms palette, then click the Digital Waveform palette. The VI will be in the Digital Waveform palette.

  • Does anyone know how to read in a TDMS file into Matlab?

    I am trying to read a TDMS file into Matlab. Are the two compatible? How can I import this file into matlab?

    A search can turn up wonderful things, such as:
    Reading TDM/TDMS Files with The MathWorks, Inc. MATLAB® Software

Maybe you are looking for

  • Error 4450 when trying to burn a cd

    Please help me to fix this issue. I have the latest version of iTunes, and my burner is working correctly, and I am using blank discs. I purchased $20 of music and made a playlist to burn, it checks, initializes and begins burn, then alerts me that i

  • Creation of cost element or not for GBB-VAX,GBB-INV and UMB

    Dear Experts, I have few doubt regarding creation of cost element. Whether i will create Cost element or not. 1) GBB-VAX - used in PGI(Vl02n)We have costing based COPA .whether we will create cost element or not.If i will create cost element then nee

  • Ipod 5 won't let me use network.

    Hello Apple community! I need your help as soon as possible! I have this problem with my Ipod touch 5th gen, it turns out that it won't allow me to join a wi-fi network that we have in my school. The network shows up on where it says "Choose a networ

  • Recover a database using cold backup

    Hi, I am working in oracle 9i and solaris 5.8. I am taking coldbackup and its stored in another solaris server. I need to create a new database in the backup server using the cold backup files. Please explain me in detail how to create a database usi

  • How to implement delete functionallity on a form

    Hello I have a form that displays the current row of a table, and you can modify it. I want to implement delete functionality in such a way that deletes the current row and shows the next one in the form. My problem is that the delete button must be