Possible to log data this way?

Hello, i was wondering if its possible to have data logged onto a file in the following manner. Essentially, whenever someone starts the program, it'll log data into a NEW file everytime they push start. To make sure the file doesn't overwrite itself, I'll use LV's time stamp feature as a string to append itself onto the name of the file. In the end, everytime someone starts the program, it'll have the name of the file followed by the time stamp which will be saved to some directory.
thank you.

BurningH34t wrote:
Hello, i was wondering if its possible to have data logged onto a file in the following manner. Essentially, whenever someone starts the program, it'll log data into a NEW file everytime they push start. To make sure the file doesn't overwrite itself, I'll use LV's time stamp feature as a string to append itself onto the name of the file. In the end, everytime someone starts the program, it'll have the name of the file followed by the time stamp which will be saved to some directory.
thank you.
Hello,
Here is a simple VI which produces new files in a readable timestamped format which will always save files within the same directory as the VI itself.
This VI saves to a spreadsheet as an example but it could be easily replaced with more file I/O.
Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)
Attachments:
AutoNaming.vi ‏13 KB

Similar Messages

  • Is it possible to write in this Way....?

    Dear All,
    I'm very new to Oracle Pl/SQL
    My store proc is as below..
    I have a table
    Name: test_synch
    Note: test_synch has the data that needs to be updated in multiple tables. and it has multi columns along with destination table and column name and new data which I need to update (target table and it's column)
    Now I need to update the data from test_synch to taget table (destination tables) and need to convert the datatype of the value according to destination table datatype.
    create or replace procedure proc_sec_synch
    datatyp char(10);
    Begin
    FOR lr_Update in (
    Select
    SsM_ID ,
    CYCLE_DATE ,
    DESTINATION_TABLE ,
    COLUMN_NAME ,
    NEW_DATA ,
    COLUMN_TYPE from PM_OWN.test_synch order by destination_table )
    Loop
    datatyp = ('Select DATA_TYPE from all_tab_columns where table_name = ' ||lr_update.destination_table||'and column_name = '||lr_update.column_name||;)
    case datatyp
    when 'VARCHAR2' then
    'Update' || lr_Update.destination_table ||' dest SET dest.' ||lr_Update.column_name||' =
    cast( (select src.new_data from test_synch src where src.ssm_id = '||lr_Update.destination_table||'.ssm_id;) as varchar2) where src.ssm_id = '||lr_Update.destination_table||)
    END Loop;
    END proc_sec_synch
    Is this the way to write a proc..? or anyother way..?
    Plz Help ME

    Naresh wrote:
    I tired but still getting error the above mentioned error only.
    my doubt is I need to run that statement also dynamically..?
    What do you say..?which line is throwing the error?
    CREATE OR replace PROCEDURE Proc_sec_synch1
    IS
      datatyp CHAR(10);
    BEGIN
      FOR lr_update IN (SELECT ssm_id,
                               cycle_date,
                               destination_table,
                               column_name,
                               new_data,
                               column_type
                        FROM   test_synch
                        ORDER  BY destination_table,
                                  column_name) LOOP
          SELECT data_type
          INTO   datatyp
          FROM   all_tab_columns
          WHERE  table_name = lr_update.destination_table
                 AND column_name = lr_update.column_name;
          IF datatyp = 'VARCHAR2' THEN
    EXECUTE IMMEDIATE 'UPDATE '|| lr_update.destination_table
    ||
    ' AS dest SET dest.'||lr_update.column_name||' = cast( (select src.new_data from test_synch src where src.ssm_id = '||lr_update.destination_table||'.ssm_id;) as varchar2) where src.ssm_id = '||lr_update.destination_table||'.ssm_id';
    END IF;
    END LOOP;
    COMMIT;
    END proc_sec_synch1;  01403, 00000, "no data found"
    // *Cause: No data was found from the objects.
    // *Action: There was no data from the objects which may be due to end of fetch.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to present the data this way?

    I have a table, which has three columns:
    Actnbr ------ BeginDate --------EndDate--------     IntRate
    123456789------     01/20/2006-----     02/1/2006------     8.00
    123456789------     02/2/2006-----     02/20/2006------5.00
    123456789------     02/20/2006-----     05/1/2006------     4.00
    123456789------     05/1/2006-----     06/10/2006------4.00
    123456789------     6/10/2006-----     <null>------     8.00
    987654321------     01/10/2006-----     <null>     ------     6.00
    456789123------     05/04/2006-----     05/05/2006------7.00
    456789123------     05/06/2006-----     08/10/2006------6.00
    456789123------     08/11/2006-----     09/20/2006------6.00
    456789123------     09/21/2006-----     <null>     ------     5.00
    789123456------     05/9/2006-----     08/20/2006------8.00
    more ...
    I want the output like this:
    Actnbr---- BeginDate--- EndDate---IntRate-- BeginDate-- EndDate--IntRate-- BeginDate-- EndDate--intRate--BeginDate--EndDate---IntRate--     BeginDate--EndDate-- IntRate
    123456789--01/20/2006--02/1/2006-- 8.00-- 02/2/2006-- 02/20/2006-- 5.00--05/1/2006-- 06/10/2006--4.00----05/1/2006--06/10/2006--4.00-- 6/10/2006-- <null>--8.00
    987654321--01/10/2006--     <null> -- 6.00
    456789123--05/04/2006-- 5/5/2006-- 7.00--05/06/2006--08/10/2006-- 6.00--08/11/2006--09/20/2006--6.00--09/21/2006-- <null>-- 5.00
    789123456--05/9/2006-- 8/20/2006--8.00
    is it possible to get the output like above using just sql, if so, could you please share your thoughts with an example.
    i used "-" to sepearte value for clarity.
    Thanks in advance.

    this one solve ?
    select AcctNbr || begindate || enddate || intrate || begindate || enddate || intrate from table_name;
    or yout want sth like this?
    SQL> select * from rup_data1;
    OCCUPATI LONAMOUNT INCOME REF DECSIO
    SAL 75 70 no ACCEPT
    SAL 80 90 no REJECT
    SAL 85 85 yes REJECT
    SAL 72 95 yes REJECT
    SAL 69 70 yes ACCEPT
    72 90 no ACCEPT
    PROFS 83 78 yes ACCEPT
    PROFS 64 65 no ACCEPT
    PROFS 81 75 yes ACCEPT
    BUSINESS 71 80 no REJECT
    BUSINESS 65 70 no REJECT
    OCCUPATI LONAMOUNT INCOME REF DECSIO
    BUSINESS 75 80 yes REJECT
    BUSINESS 68 80 yes ACCEPT
    BUSINESS 70 96 yes ACCEPT
    14 rows selected.
    SQL> SELECT concat_and_fn(newcol) FROM newformat ;
    CONCAT_AND_FN(NEWCOL)
    SAL7570noACCEPT and SAL8090noREJECT and SAL8585yesREJECT and SAL7295yesREJECT an
    d SAL6970yesACCEPT and 7290noACCEPT and PROFS8378yesACCEPT and PROFS6465noACCEPT
    and PROFS8175yesACCEPT and BUSINESS7180noREJECT and BUSINESS6570noREJECT and BU
    SINESS7580yesREJECT and BUSINESS6880yesACCEPT and BUSINESS7096yesACCEPT
    SQL>
    pls align it ,
    rgds
    Rup

  • Is it possible to install Leopard this way?

    I have a Powermac G4 and the DVD drive is shot on it. I only have an external USB DVD drive and just read that it needs to be installed with a Firewire external drive if I go that route.
    My G4 has 2 Hard Drives in it. Is it possible to somehow copy the install disc onto the secondary HD and tell the computer to boot from that volume?

    Yes, you can use the second HD, but it needs to be erased. You use Disk Utility to restore the DVD to the internal HD. Do note that since you're using USB, it'll take quite awhile, but significantly faster than making a .dmg file, which isn't bootable and won't be usable to do the installation. Then, after you do the restoration, System Preferences->Startup Disk->select the newly installed restored disk and click on the Restart button. That should boot into the installer.

  • Best way to log data

    I have an application that receives data from a source, and I would
    like to create and maintain a log file with this data. Small bits of
    data will be received at least every minute, and often once every
    second. The user can also view the logged data at any time.
    Lastly, each entry is timestamped, and I would like to be able to
    remove log entries that are x hour/days old.
    What I would like advice on is what is the bext way to accomplish this?
    Clearly a bad way to do this is every time I get data, read the log in,
    remove old entries, rewrite all the remaining entries, and finally
    append the new entry. This uses way too many file operations.
    I have briefly looked at the java.util.logging stuff, but it appears that
    the purpose of that is more for code debugging/etc. It also doesn't
    appear that there are methods to read the logs. So, this does not
    look like an "easy way out".
    I know how to append to a file, but I am not sure if I should leave
    the file open during execution of the program and simply flush
    the stream/buffer, or open and close the file everytime I write.
    The latter is clearly more expensive, but safer.
    I don't know how to delete data from the beginning of a file.
    To summarize, what is the best way to read and write data to
    a file such that:
    1) the data is appended to the end of the file (easy)
    2) the data is removed from the beginning of the file
    3) the data that is written is not lost of the program crashes/etc.
    4) the whole logging business is not too expensive
    Any suggestions?
    Thanks,
    Chuck.

    Here's what we did at my last job:
    Incoming messages are logged to disk via FileOutputStream (maybe with BufferedOutputStream encasing that, I don't remember) this outputstream is not closed until the applet is stopped. System.out is also reassigned to this fileoutputstream to capture all messages.
    At the same time, there is an InputStream reading from that file. As data is read, we stick the text into a TextArea.
    When the TextArea size hits some certain amount (maybe 20,000 characters) we'd remove ... maybe 5000 from the top. Log stays the same tho
    When the day rolls over, we switch log files
    You're questions:
    1) the data is appended to the end of the file (easy)
    Yes. But if you're not using streams, you should check that out.
    2) the data is removed from the beginning of the file
    That's pretty easy. Open the file for reading, open a new file for writing. Read the first n bytes but don't write them. Then write the rest
    3) the data that is written is not lost of the program crashes/etc.
    Data should be fine if it's logged to disk
    4) the whole logging business is not too expensive
    Saving to disk isn't very expensive at all. In fact, normally writing to disk is slow enough that stuff just gets put into a buffer somewhere to get sent to the disk and the processor goes on with the program.

  • How can i see when someone has accessed my call/text log. (This is possible on google) I have been informed that someone has accessed my activity log and is giving my information to a third party. I believe it is a service tech, but I am not interested in

    How can i see when someone has accessed my call/text log. (This is possible on google/gmail) I have been informed that someone has accessed my activity log and is giving my information to a third party. I believe it is a service tech, but I am not interested in persuing that further. I just need to see when my account has been accessed if possible.

    Hi lynniewigs,
    This is a common concern among Android and I-phone user, and one of the drawbacks to using a smart phone.  We lose so much privacy. Our phones become cameras into our homes for us to be spied on.
    I don't know what type of phone you have, if it is even a smart phone, but here is an example of an application that you can use to determine which applications are accessing your information and sending it out. 
    Permission Scanner - Android Apps on Google Play
    Google just recently revamp their permissions geared to hide invasive applications that spy and send out your information without your knowledge.  Report says be aware of what your Android app does - CNET
    Please continue to be mindful of the apps you download and the permissions you give. 

  • How to use classloader in this way? Is it possible?

    I have one my own classlaod. So, I can do these: use the classloader to load the class, use the class's newInstance method to get instance object, then use reflection to invoke methods of the object.
    I think this is the standard way.
    However, it is not convenient. Is there a way that allows me to using the class that loaded by my own classload in "old way", i.e. just new to get object, and directly use it. For example, like this:
    ..Get classloader
    class MyClass = loadClass("MyClass");
    MyClass obj = new MyClass();
    obj.someMethod();
    If this way is possible, it is much better. In theory, it should have no problem. I think Java Web Start, etc are just doing similar like this. But, at this point, I do not know. Please share your thoughts.

    You have to distinguish between compile time, and run time features available to you.
    MyClass x = new MyClass() ; is a language construct that is available at compile time.
    Reflection is available at runtime.
    If you want a mix of both, you may have to generate code. Depending on how you like it - you can either generate source and compile it, or generate byte code directly. But since you seem to be interested more in simplifying your code, due to the relative obscurity of reflective code, your best option would be to use a code generator.
    So use your classloader to load the class, then generate and compile code to use it. (This may be even more complex, but this is how you would have to do it)

  • Log Data Changes in WAS JAVA (WAS ABAP has this functionality)

    Hello,
    I use very frequently a functionality of WAS ABAP. In the ABAP Dictionary, you can activate, in the technical settings of a database table, the flag 'Log Data Changes'. If this flag is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database. Using transaction SCU3 you can see the table history.
    Now, I am using WAS JAVA, and I am creating tables in JAVA Dictionary. Has JAVA Dictionary a similar functionality?
    Thank four your help in advance.

    Hi,
    In the IDE,there exists a tracing preference which  you can use to track the changes.
    Go to Window->Preferences->Trace Configuration
    Choose the category or the location,in your case ,you can choose Dictionarynd choose the module for logging.
    You can also specify the handler for the same in the handler tab.
    Regards,
    Vidya

  • We have just gone over our limit for data usage this month. Is it possible to add data just for this month?

    We have just gone over our limit for data usage this month. Is it possible to add data just for this month?

    YES.  YOU GOING TO DO A PLAN CHANGE.  WHEN IT GIES YOU DATE OPTIONS YOUR GOING TO BACK DATE IT TO BEGINING OF CYCLE.    ONCE THAT GOES THROUGH DO ANOTHER PLAN CHANGE BACK TO IRIGINAL PLAN AND FUTURE DATE TO BEGINIGN OF NEXT BILL CYCLE.  THIS ALL CAN BE DONE ON MY VERIZON OR IF YOU FEEL SAFER CALL CUSTOMER CARE AND THEY CAN DO THSI FOR YOU

  • Is that possible to get data from the red trace in this BMP file

    I have an instrument, which only export image file. I want use labview to replot it and do some analysis. The image file is like attachment. Is that possible to get data from the red  trace in this BMP file via labview vis?
    Attachments:
    coax312.bmp ‏4741 KB

    I looks to me that 515 pixels represents 200 meters, so multiply the
    x-values by 0.3885 meters/pixel to get the true x-values.  I don't
    have enough information to scale the y-axis.
    Randall Pursley
    Attachments:
    Compute from BMP.vi ‏66 KB

  • HT1386 When I plug my iPhone into my iMac via USB I can choose to "back up to this computer".  On another sync to my iMac, can I choose to " back up to the iCloud"?  This way I could restore all my info and settings from either source.  Is this possible?

    When I plug my iPhone into my iMac via USB I can choose to "back up to this computer".  On another sync to my iMac, can I choose to " back up to the iCloud"?  This way I could restore all my info and settings from either source.  Is this possible?

    On the phone, under Settings > iCloud you can select to turn iCloud ON or OFF.
    One iTunes, it senses that toggle and if you had selected iCloud it will say backup to iCloud. Here you can change the toggle to backup to computer and click "Apply" prior to syncing.
    I do both for good measure. I backup to computer and then after i disengage the device from the computer, I set the iCloud toggle back to ON and then perform the iCloud backup over wifi.
    I found that using iTunes and saying to backup to iCloud isn't always successful in the "last backed up" time and thus I do it separately.

  • Set up spreadsheet to log data from Lookout Screen

    I am a complete beginner using Lookout Software. We already have a system up and running on the production line.
    I intend to use a PLC to store data in data registers during production. This information is then to be displayed on the Lookout screen.
    This is all fine, but at certain events (by way of a signal from the PLC) I wish to log the current data to a spreadsheet.
    If possible I would like this to be entered onto an existing template allowing certain calculations to be made once other information is entered manually.
    It is being run on a Windows platform with the following system:-
    LOOKOUT ENTERPRISE DEV> SERVER SW - 200 I/O (INC. 4 CONCU
    LOOKOUT RUNTIME ONLY CLIENT SOFTWARE
    FP-1000 NETWORK MODULE
    FI
    ELDPOINT OPTOMUX SW/DOC KIT
    FP-TB-2 TERMINAL BASE
    FP-AI-111 MODULE
    Many Thanks,

    Hi Khalid,
    Thanks for your speedy reply!
    I have been trying for a few days to research the Spreadsheet Object as I thought it might be what I wanted.
    Trouble is, I having to do my research on an iBook at the moment and so have not been able to view any example code, etc.
    Is there a way I can get around this, as my resources are somewhat constrained at present.
    Many thanks,
    Charlie T

  • Logging data after a trigger with Lookout Direct

    Hi,
    I would like to log data with Lookout Direct after a trigger input (not periodically or continuously).  I am using Lookout DIrect version 4.5.1 build 19 and a Direct Logic 250 PLC.
    Does anyone have suggestions on how to do this?  I would prefer that this data be logged into Excel.  I have 24 sensors connected to the PLC and each time a sensor transitions from hi to low I would like to log the time of transition. 
    Currently I have individual spreadsheet storage objects for each sensor as well as individual latchgates to indicate when logging has been completed.  In the PLC code there is a state machine for each individual sensor as well and one of the states waits for an acknowledgement from Lookout that data logging has been completed before moving on to the next state (I will have to dig a bit deeper to remember exactly why I needed to do that).
    I am hoping there is a more traditional approach that is easier than what I am doing.  One of the problems I have been facing is Lookout Direct crashing every few days and I suspect it is because the sensors are often sensed within milliseconds of each other and opening/closing so many files is causing problems.  I worked through a list of possible reasons that Lookout may be crashing (provided by tech support) and I am nearly convinced I am just asking too much of the program...
    Any help will be greatly appreciated
    Thank you,
    David

    In case someone can help with this, here is a bit more information about my application and the PLC/Lookout code I have developed:
    Actuators have two positions, nominal and folded.  Prox sensors are used to monitor the position of actuators.  12 actuators can be monitored simultaneously.  The time at which prox sensors are sensed high is recorded so that actuator speed and actuation success is logged. 
    The PLC code consists of 12 separate state machines, each with the following 8 states:
    State 1
      System reset or nominal timer reset
      Wait for nominal prox release
    State 2
      Nominal prox released
      Wait for folded prox sense
    State 3
      Folded prox sensed
      Wait for folded ack from Lookout (acknowledges that timer value has been logged)
    State 4
      Folded ack from Lookout received
      Wait for folded timer reset (this state is active for one scan only)
    State 5
      Fold-in timer reset
      Wait for folded prox release
    State 6
      Folded prox released
      Wait for nominal prox sense
    State 7
      Nominal prox sensed
      Wait for nominal ack from Lookout (acknowledges that timer value has been logged)
    State 8
      Nominal ack received from Lookout
      Wait for nominal timer reset (this state is active for one scan only)
    Lookout acknowledges that timer values have been read and saved with LatchGates.  Lookout uses a SpreadSheet Storage Object to save the PLC timers when the PLC enters states 3 or 7 (prox sensor triggered).  The logged member of the SpreadSheet Storage Object is used to change the state of the LatchGates which, in turn, signal the PLC to proceed to the next state.  When the folded file is saved, the nominal LatchGate is turned off and the folded LatchGate is turned on and vice-versa for the nominal file.
    The LatchGate/SpreadSheet Storage combination is what I am hoping to improve upon.  I believe Lookout is crashing when 12 SpreadSheet Storage Objects log to 12 different files during the same 1 second period of time.
    If anyone has suggestions of a way to log this data in the PLC memory or a software package better suited for this application, please let me know!  I believe this would be simple with LabVIEW, unfortunately obtaining the additional hardware and software that I would need hasn't been easy! 

  • Log data on the host computer using cRIO-9035

    Is it possible for me to log data on the host computer opposed to on the controller itself? I'm needing to log quite a bit of data and I'm not wanting to use my storage on the cRIO. I'm using scan mode on the controller.
    Thanks

    Lots of ways to do this. You can write a datalogger to run on the PC, to read shared variables hosted on controller and  write them to a file. There is also the DSC module for logging hundreds to thousands of shared variables to a database, if you need that.

  • DSC 8.6.1 wrong timestamps for logged data with Intel dual core

    Problem Description :
    Our LV/DCS 8.6.1 application uses shared variables to log data to Citadel. It is running on many similar computers at many companies just fine, but on one particular Intel Dual Core computer, the data in the Citadel db has strange shifting timestamps. Changing bios to startup using single cpu fixes the problem. Could possibly set only certain NI process(es) to single-cpu instead (but which?). The old DSCEngine.exe in LV/DSC 7 had to be run single-cpu... hadn't these kind of issues been fixed by LV 8.6.1 yet?? What about LV 2009, anybody know?? Or is it a problem in the OS or hardware, below the NI line??
    This seems similar to an old issue with time synch server problems for AMD processors (Knowledge Base Document ID 4BFBEIQA):
    http://digital.ni.com/public.nsf/allkb/1EFFBED34FFE66C2862573D30073C329 
    Computer info:
    - Dell desktop
    - Win XP Pro sp3
    - 2 G RAM
    - 1.58 GHz Core 2 Duo
    - LV/DSC 8.6.1 (Pro dev)
    - DAQmx, standard instrument control device drivers, serial i/o
    (Nothing else installed; OS and LV/DSC were re-installed to try to fix the problem, no luck)
    Details: 
    A test logged data at 1 Hz, with these results: for 10-30 seconds or so, the timestamps were correct. Then, the timestamps were compressed/shifted, with multiple points each second. At perfectly regular 1-minute intervals, the timestamps would be correct again. This pattern repeats, and when the data is graphed, it looks like regular 1-sec interval points, then more dense points, then no points until the next minute (not ON the minute, e.g.12:35:00, but after a minute, e.g.12:35:24, 12:36:24, 12:37:24...). Occasionally (but rarely), restarting the PC would produce accurate timestamps for several minutes running, but then the pattern would reappear in the middle of logging, no changes made. 
    Test info: 
    - shared variable configured with logging enabled
    - data changing by much more than the deadband
    - new value written by Datasocket Write at a steady 1 Hz
    - historic data retrieved by Read Traces
    - Distributed System Manager shows correct and changing values continuously as they are written

    Meg K. B. , 
    It sounds like you are experiencing Time Stamp Counter (TSC) Drift as mentioned in the KB's for the AMD Multi-Core processors. However, according to this wikipedia article on TSC's, the Intel Core 2 Duo's "time-stamp counter increments at a constant rate.......Constant TSC behavior ensures that the duration of each clock tick is
    uniform and supports the use of the TSC as a wall clock timer even if
    the processor core changes frequency." This seems to suggest that it would be not be the case that you are seeing the issue mentioned in the KBs.
    Can you provide the exact modle of the Core 2 Duo processor that you are using?
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

Maybe you are looking for