Save a cluster in a file

Hi! i'm trying to save a file with some data of my application. This Data is a cluster of some boolean data, some i32 data, some array of i32 and some string data. I use OPEN_CREATE_REPLACE File.vi, WRITE FILE and CLOSE FILE to create and replace file and works fine. But when i create the EXE file, this sistem will not work anymore. why? (If i create a more simple cluster i.e. a boolean data+ a i32 data, this work)
Thank you very much to anyone that try to respond to my question.
Andrea

Hi Andrea,
I am curious to know what does not work when you are trying to write the complex datatype to file. Does the exe give you errors? Are these errors related to File I/O?
There are a few examples that ship with LabVIEW that may be very useful to you. Please look at Help >> Find Examples >> Fundamentals >> File Input and Output >> Write Datalog File Example. If this one works for you, you can use the Read Datalog File Example to read the data back.
Feroz
Applications Engineer
National Intruments

Similar Messages

  • Load and save a cluster

    I have a cluster of data that indicates tests failed.  At the beginning of the main VI, I want to check if the file exists, if not create it, and if it does, read it.  This file will be my saved cluster, indicating the tests that have previously failed. 
    I am using open/create/replace datalog and am having a problem with the cluster elements always becoming zero. 
    I also am trying to save the cluster to the file, every time a test fails.  This does not seem to work either. 
    Is datalog sub vis the easiest thing to use here?  Should I be using something other than a cluster?
    Thanks
    metzler CLAD
    Solved!
    Go to Solution.
    Attachments:
    loading cluster.vi ‏18 KB
    save cluster.vi ‏12 KB

    I was planning on the load vi to create the file, if the folder vi created the folder, the file does not exist and the no error case structure should run, and create the file,     
    You wrote:     "But there is a problem with your logic.  Why do you call it an error if the folder exists?  When loading, you would hope that the folder does exist.  So your error cases are backwards."
    I'm sorry, I omitted the create folder from the vi, the error of which is connected to the loading cluster vi error out terminal (revised attached).  If the folder does not exist, there is no error, the folder is created, the no error case structure will then create the history.dat file, and insert the cluster with all zeros. 
    You wrote:  "In your save vi, you have to set the operation input to open/create/replace to "replace or create".  The first time you write, the datalog will be created and the data will be written."
    I was planning on the load cluster vi (no errror case) to create the file.   I then wanted the cluster to be created and written to the file. 
    I tried using the save cluster vi to create or replace the cluster, and it worked like you said.  I then loaded the cluster, but my path was wrong.  After that was fixed, it worked. 
    Thanks for your help.
    metzler CLAD
    Attachments:
    working loading cluster.vi ‏17 KB

  • I am Required to Save before opening a PDF file in FF 10.0.1. How do I get FF to open the PDF file?

    I am Required to Save before opening a PDF file in FF 10.0.1. How can I get FF to open a PDF as the default?

    Check your add-ons:
    Cmd+Shift+A
    Make sure the Adobe Acrobat NPAPI Plug-in is set to Always Activate.

  • Photoshop CS4 "Could not save as...because file is already in use or was left open"

    I have been using Photoshop for years, and CS4 for about a year now.  I have never had this error message pop up until this week.  It started happening right after I did the Adobe update to 11.0.2.  Everytime I try to save a PSD or JPG file now (which are the only two types of files I work with), I get this message preventing me from being able to save;
    "Could not save as... because file is already in use or was left open."
    I have to attempt to Save as about a dozen times before it will finally save the file.  Any suggestions on what could be wrong and how to remedy it?  Is it the update that caused this problem?

    Turn off Caching of Thumbnails in Hidden thumbs.db Files
    People sometimes report that they cannot manipulate their folders as they want to because Explorer has a thumbs.db file open.  Windows 7 apparently generates these files for compatibility with older software that may expect such files to exist in folders with, for example, photos in them.
    The good news is that (with Windows 7 Professional and above) you can disable this through the Group Policy editor:
    Click the Start orb
    Enter gpedit.msc in the search box and hit Enter.
    Expand User Configuration - Administrative Templates - Windows Components.
    Click on Windows Explorer.
    Right-click the entry "Turn off the caching of thumbnails in hidden thumbs.db files" and choose Edit.
    Enable the setting.
    -Noel

  • On my new Imac, I had the trial version of Pages, and saved some files in it. Now I have purchased the full version from Apple via a download, but I cannot save or print the old files, please help!

    On my new Imac I saved some files on the free trial version of Pages, since downloading the full version from Apple, have been unable to save or print from old files saved when using the trial version. Any ideas? Thank you!

    My guess is the 30-day trial period has expired but you didn't remove the trial before installing the full version. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user.
    Yvan Koenig has written an AppleScript that removes the files. You can find it on his iDisk in For_iWork > iWork '09 > uninstall iWork '09.zip.

  • How export to csv work in safari browser? In my application export to csv open like a raw data in new tab. But other browsers working great!. Need to open in a csv file or save it as a csv file.

    How export to csv work in safari browser?
    In my application export to csv open like a raw data in new tab.
    But other browsers working great!.
    Need to open in a csv file or save it as a csv file.
    Please suggest me. Thank you in advance!.

    Hi Adrian,
    Why don't you try any another software for opening CSV files then Notepad ? According to my experience, you can use these softwares to open an CSV files and they are:-
    Microsoft Excel
    Open Office Calc
    Google Docs
    Also there is an additional tool available known as CSV viewer. You may try this, download it from here http://www.csvviewer.com/
    I've never used Notepad for opening CSV files, because sometimes it contains some symbols which are not not at all compatibile with Notepad.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • I use iMac desktop. I can't save web pages as PDF file by using Firefox, but by Safari is fine.

    I'm using Mac OS X 10.6.4. Today, I tried to save my email content as a PDF file. However, I only got a PDF file that have partial content of email. Then I adjust the printer setting and did it again, then I only got a blank PDF file. There was nothing inside. Then I tried to save email as a PDF file by using Safari browser. And I got a complete and sucessful PDF file. I usually save web pages or web mail, online receipt as PDF file by use Firefox. But since I have updated to the new version, there were many problems with my Firefox. I tried to restore all my application and made Firefox in the old 3.6.3 version which I used to have no problem. But now still not working.

    I solved it for myself: it was my HP smart-web printer crap that was a plug in and add on for firefox that somehow automatically got installed when I upgraded to 5. I disabled both in the add-ons manager, and voila, printing is working.
    It seems there are many things, like this and the Google toolbar, that were screwed by the oddly fast update to 5. Looks like Mozilla didn't give anybody any notice! Must've been some really bad security hole.

  • I use iMac desktop. I can't save web pages to PDF file by using Firefox, but by Safari is fine.

    I'm using Mac OS X 10.6.4. Today, I tried to save my email content as a PDF file. However, I only got a PDF file that have partial content of email. Then I adjust the printer setting and did it again, then I only got a blank PDF file. There was nothing inside. Then I tried to save email as a PDF file by using Safari browser. And I got a complete and sucessful PDF file. I usually save web pages or web mail, online receipt as PDF file by use Firefox. But since I have updated to the new version, there were many problems with my Firefox. I tried to restore all my application and made Firefox in the old 3.6.3 version which I used to have no problem. But now still not working.
    ''Duplicate post, continue [https://support.mozilla.com/en-US/questions/746583 here]''

    hello jlzibell, please go through the troubleshooting steps described at [[Websites say cookies are blocked - Unblock them]].

  • I need to monitor a transducer block parameter and save it to a CSV file.

    How can I monitor a transducer block parameter and save it to a CSV file?  The reason is that I need to do some long-term testing of an FFb device we are developing, and I need to read the primary output parameter of the transducer block (not the scheduled AI block) every second or two and save to a CSV file.
    I have tried to figure out a way to do that with FBUS Configurator, unsuccessfully, and I purchased FBUS Monitor, as that was recommended by an industry expert, but I have been unsuccessful at getting that to work as well.

    Hi Wpinson,
    Neither FBUS Configurator nor Monitor can meet your requirement. However, there are other approaches. NI-FBUS provides APIs for C, LabVIEW, VB and C#. You can use these APIs to read a parameter value of any block and use standard file IO functions to save the date into CSV file. The LabVIEW APIs are highly recommended because they are easy-to-use and LabVIEW also provides APIs for CSV file operations. You can build the application w/ LabVIEW in a short time.
    You can find the examples of the FBUS APIs in the following folders:
    1. C: C:\Program Files\National Instruments\NI-FBUS\MS Visual C\examples
    2. VB: C:\Program Files\National Instruments\NI-FBUS\MS Visual Basic\example
    3. C#: C:\Program Files\National Instruments\NI-FBUS\MS .NET\examples\CsharpExample
    4. LabVIEW: search "fieldbus" in the LabVIEW example finder.

  • How to change the default save encoding of the dvm files when create dvm???

    When I creating a DVM(domain-value mapping) in Chinese on the ESB control and confirm it, then restarted the SOA service, the DVM that I created in Chinese disappeared from ESB control. All the maps(both English and Chinese ) are in DVM Repository.
    After I updated the encoding from ‘UTF-8’ to ‘GB2312’ in the three files below, and restarted the SOA service, the DVM in Chinese appeared on ESB control.
    But when I adding the second row in Chinese and save it, then restart the SOA service, the DVM in Chinese disappeared from ESB Control once again. Because the encoding in the three files below is updated from ‘GB2312’ to ‘UTF-8’ .
    Files:
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\metadata\files\dvm\Chinese.xml.def.xml
    C:\product\10.1.3.1\OracleAS_1\integration\esb\oraesb\artifacts\store\content\files\dvm\Chinese.xml_1.0
    How to change the default save encoding of the dvm files when create dvm in ESB control ???

    I have the same problem.  When I updated to Mavericks now the bookmarks bar font is huge.  I liked it the way it was before.  I liked the smaller font.  Also wish I could change the color of the sidebar and font/folders too.
    I tried to see in preferences if there was anyway to change it, but I don't see anything there.

  • I had a drive failure and lost the iWeb file along with other things.   I did manage to save a lot of user file documents but I don't see or   recognize the my iWeb site file. It was on a 15" G4 Titanium pb. I'm trying to find a way, using version 2.0.4

    I had a drive failure and lost the iWeb file along with other things. 
    I did manage to save a lot of user file documents but I don't see or 
    recognize the iWeb site file. It was on a 15" G4 Titanium pb.
    I'm trying to find a way, using version 2.0.4 of iWeb on a different 
    pb to recover the file into the iWeb app or a way to download the site into iWeb.
    There are 6 pages of images and text, and it 
    would be a task for me to recreate the whole thing again. I did 
    download the site but I don't know how or if I can get iWeb to see it and open it.
    Does anyone have any knowledge about this? The link to my site:
    <http://web.mac.com/danauerbach>
    Any suggestions will be most appreciated.
    dan auerbach
    [email protected]

    Unfortunately iWeb cannot read or import previously published files, only generate them.  You'll have to recreate your site from scratch.
    However, Chapter 2.3 on the iWeb FAQ.org site has tips on using some of the existing files, image, audio, video, etc., from the published site in the recreation of the site.
    OT

  • JPEG/PSD issue--I open a jpeg and edit it (levels, crop) and then "save as" and the save as option shows there are now levels in the image and it wants to save it as a .psd file or a copy with layers.  What am I doing that has these settings appear?

    JPEG/PSD issue--I open a jpeg and edit it (levels, crop) and then "save as" and the save as option shows there are now levels in the image and it wants to save it as a .psd file or a copy with layers.  What am I doing that has these settings appear?

    16bit? Pixels extending beyond the canvas? (from a crop with delete unused pixels turn off).  Have you previously been saving PSD files?
    IME you sometimes have to tell Photoshop that the first save of a session is JPG, and it remembers from there on.  The way to 'tell' Photoshop that JPG, or PDF, or PNG etc are now your preferred format is to Ctrl (Cmd) click on that format in the Save As drop down list.  So long as the file does not have parameters that your chosen format does not support, then this should work for you.
    [EDIT]  Just noticed that you did include 'Crop' in the subject line.  Do you have 'Delete cropped pixels' checked?

  • Save different Objects in one file by two different streams

    Hi all,
    I have a issue to read two Objects from one file if I write those in two different streams.
    I open the ObjectOutputStream and save an Object to the file. Then I close this stream and file. Then I open the new ObjectOutputStream and save the second Object in the same file. It works Ok. Then I open the ObjectInputStream and try to read those two objects and get java.io.StreamCorruptedException.
    This exception happes only when app tryes to read the second Object.
    this is the code example:
    //Write part
    for (int i=0;i<2;i++)
    File file = new File("test.swp");
    FileOutputStream fileOut = new FileOutputStream(file,true);
    ObjectOutputStream objOut = new ObjectOutputStream(fileOut);
    JobObject jobObj = new JobObject();
    jobObj.setID(i);
    objOut.writeObject(jobObj);
    objOut.flush();
    objOut.close();
    fileOut.close();
    //Read part
    FileInputStream fileOut = new FileInputStream("test.swp");
    ObjectInputStream objOut = new ObjectInputStream(fileOut);
    for (int i=0;i<2;i++)
    JobObject jobObj = (JobObject)objOut.readObject();
    objOut.close();
    fileOut.close();
    Thank for any help.

    Maybe try closing the ObjectInputStream (and re-creating it as needed) within your for loop?
    - Saish
    "My karma ran over your dogma." - Anon

  • When I try to save on some websites I will try to save a pdf or mp3 file. Down below it will list the file and in the 'save as type' box it will not list as save as '.pdf or .mp3' but instead always says 'all files' which will not save it in a way it can

    Why won't the 'save as type' section list .pdf or MP3 to save a PDF or MP3 file but instead always says 'save as type' -- 'all files "."'. How can I get rid of the 'all files'.?

    Sorry, I have no idea what you are doing; can you give us some details?

  • Why can't I "Save as Text" a pdf file received as an email attachment?

    I can "Save as text" a pdf file which I have created in my own computer (that is, it goes into MS notebook that I then can Copy and Save as an MS Word file) but not when I receive a pdf as an email attachment. (The file is saved, but it is empty.) Why would I want to convert my own pdf back to text? Well, in case I no longer have the original Word document I suppose, but the thing is "Save as text" works with my pdf, but not with those I recieve from others. How come? Thanks!

    Is this a scanned PDF? If so, it must first be OCR'd.

Maybe you are looking for

  • Why does my iphone 5 always tell me to connect to iTunes and not turn on

    On Monday my iPhone started to turn itself off so i plugged it in to the computer to update it. When I plugged it in iTunes told me to restore my phone so I did, now whenever I try and turn my phone on it wont go past the connect to itunes pictures a

  • Passing a node to Xquery function

    Hi All, I have two functions in my xquery. I'm trying to pass a node from one function to another function to check if it exists and do some processing on the text that is present in that node (if exists). declare function appendLines($node as elemen

  • My iphone 5 is turning off.

    I updated to ios7 about a week ago, and it happened since then. what can I do?

  • Justin.tv Flash Video Player

    Here is the url for justin.tv's embedded stream http://www.justin.tv/widgets/embedded.swf or http://www.justin.tv/widgets/jtv_player.swf. Neither of these play back on Flash Lite, it is live streaming flash maybe FLV called from a SWF file, I would r

  • BOM Recursive logic

    Hello All, I need a logic for re-cursive call.I am drilling down the BOM components.Example as below. If I have A as header with B as component and again B may have C as component again C may have D and E as components in it. Now if I pass A i should