Time dependent applications

I am writeing an application that needs to generate a waveform on screen and also log the data to file. This has to be a textual input file.
I'd like to capture something like 10 readings a second from the device that is used as the measurement input and log this to file as well as displaying them on the waveform.
I've put together the program and have noticed that I get output that is on average 1 second appart, I have the portion of the program that waits to time the input waiting for 10ms, which should allow data to be gathered (in theory) every 10ms or so.
What could be causing this massive (in relation to the ideal time spaceing of measurements recorded to the log file) drop in time between each capture and store of the input de
vices data.
I have even gone to the length of collecting a specific ammount of data in a buffer before writeing it to the file to save on disk access, this made no change.
The device im inputing from is simplistic, it returns a couple of numbers from an rs232 connection.

Post your code and we can probably give you a better idea.
Some things to watch out for:
Don't write to the file every time. You can try streaming to the file, which means opening the file in the beginning, continually writing to the file, and then closing the file when you are done (standard Write Characters to File, etc, open, write, and then close the file, a VERY time consuming process.
Don't reconfigure your data acquisition each time. This includes configuration of the serial port. Again, you want to open the port, read periodically, and then close the port when you are done.

Similar Messages

  • Time-dependent BW hierarchies in Analysis for OLAP

    Hi all,
    We are using time-dependent hierarchies in combination with a key date variable.
    Tools used: Query designer based on SAP BW 7.4 and BO 4.0.
    The following steps are executed:
    Report is executed and key date is prompted
    According to the key date, the correct time-dependent organisation hierarchy will be used in drill-down
    Bring up variable screen again and select different key date
    The drill-down changes according to the now correct time-dependent organisation hierarchy
    The above scenario works for BEx Analyzer, BEx Web, Analysis for Office - but not for Analysis for OLAP.
    Whenever I run through this scenario and confirm the updated key date, the following error is displayed:
    cube.get.dimension.info.runtime.error : java.lang.IllegalStateException: There is no default hierarchy for dimension [ORG].
    In the user guide I don't find any specifics about the hierarchies and since it works in all the other applications, I wonder where the error is coming from. I also could not find it anywhere else in the forum.
    Has anyone experienced the same error or any suggestions?

    Hi Peter,
    This issue is captured in SAP Note 1941865. Resolved in 4.0 (8.5, 9.2 or SP10) and 4.1 (1.6 or SP03).
    Symptom
    In BI 4.1, Analysis for OLAP returns errors similar to:"An error occurred in the MDAS service while processing a request from Analysis, edition for OLAP. Try the operation again. If the problem persists, please contact your administrator. (AOC00041)" and/or "cube.get.dimension.info.runtime.error: java.lang.IllegalStateException: There is no default hierarchy for dimension [DIMENSIONNAME]"
    The BW Query the AOLAP workspace is created against has 2 different hierarchies that have the same text description
    Environment
    SAP BusinessObjects Business Intelligence platform 4.0
    SAP BusinessObjects Business Intelligence platform 4.1
    Analysis, edition for OLAP
    Reproducing the Issue
    In CMC, create an OLAP BICS connection to a multi provider
    Connect to BI launchpad and launch Analysis, edition for OLAP.
    Use the connection to create a new workspace.
    The error is observed
    Cause
    This issue has been logged as a defect under ADAPT01720287 for BI4.0 and ADAPT01713663 for BI4.1
    Resolution
    A fix for this issue is included in the following maintenance releases:
    BI4.0:
    Patch 8.5
    Patch 9.2
    Support Pack 10
    BI4.1:
    Patch 1.6
    Support Pack 03

  • Regarding performance issue in time dependent hierarchie.

    hai
    we are loading time dependent hierarchies from flatfile to bw,it is weekely load,we have nearly one million records loaded,we got an issues regarding change of these hierarchies timely.when ever there occurs a change in hierarchy a new row is added to the table,it is degrading the performance,can any one of you please suggest  how to over come performance related issues regarding time dependent hierarchies.
    Regards
    Srinivas.G

    hello deven,
    if you are only focusing on your application's performance
    on the aspect of usability i.e. less waiting time, fast
    response UI, i would personally suggest you to use AJAX.
    put some processing part on the browser side and making
    data retrieval from MI asynchronous... this way, your user
    don't have to wait for all data to be presented, but rather
    could work on the data presented in pieces (i.e. asynchronously).
    anyway try googling for AJAX...
    regards
    jo

  • Thought Experiment: Variable Number of Parallel Time Dependent Systems

    Hi all, 
    I'm just going through a thought experiment before beginning a new major project and am trying to figure out the best way this code could work. We have a new project coming up that is going to be based out a single computer, this computer is then going to control a number of identical iterations of measurement devices, at present the number is 20 but this could change depending on mechanical failure etc during trials. All of these devices need to be running at the same time and are relatively time dependent, each device has to:
    Record measurement data at 1Hz (0.05s Active Time)
    Respond to inputs and undertake longer tasks (0.5s Active Time). Inputs occur at random intervals greater then ~10s
    As all of these systems must run in parrallel I am looking at the number of different ways LV handles the parallel instances to try and determine a reasonable design pattern before beginning anything. The current ways that I am looking at it are:
    Standard Multiple VI parallelization
    Build a SubVI, place multiple instance in block-diagram, run.
    Pros:
    Simple, Build a Sub-VI that can run the device plop X instances.
    Cons:
    Scalability, Not able to easily change number of instances without re-editing code, rebuilding moving etc.
    State Machine parrallelization
    Build a state machine for the Device, run X instances in a parrallelized For Loop, for all longer tasks run start them and then check progress each time you come back into the state machine.
    Pros:
    Programmatically scalable
    Standard State Machine Architecture.
    Cons:
    Less control over long tasks
    More complex programming and control.
    I am looking forward to what the community has to say, I have a feeling I should probably be looking at OOP for this but I have never done any in LV before and I am a little worried how long the learning curve on that would add to the project without resulting in a much improved outcome.
    Let me know your thoughts on the best way to continue.

    As Mike said, you can launch multiple instances of a reentrant VI similar to launching a single instance of a VI - it's all in how you get your reference / what your reference actually is.
    If you use the Open VI Reference function with a parameter of 0x80 or 0x100 on a preallocated clone reentrant VI, a clone is allocated and the reference is a reference to that clone of the VI (you can check this in testing using a property node and checking the name, which will have the clone number after a colon, and/or Is Clone VI).  At that point, anything that you do with that reference is being done to that clone.
    What I did recently for a similar design was defined my class (or just a cluster if not using OOP) to have all of the information to define a single identity - TCP connection ID, queue refs, etc., and the reference to a clone.  A constructor would be called like a "regular" SubVI to create everything it needed, including allocating a clone for itself to run in, and return a Data Value Reference to the resulting object (cluster).  A launcher could then be used that would take the clone reference and Start Asynchronous Call on it, passing into one of its controls the DVR to the object.  Now the clone is running and has everything that it needs to identify itself and operate, including responding to connections like you might have for displaying detailed information about one process all on its own, and my main application still holds onto the reference to the object so that it can do things like be a common server to give new clients the list of TCP ports that each clone is available at.
    As for some items in the original post:
      An object oriented approach is usually great for managing these kinds of designs.  If you have knowledge of object oriented design and just aren't familiar with LabVIEW's OOP support, then the learning curve should be very shallow, but it is a good idea to start with a small project or a single module first.  You don't want to be in the, "It's supposed to work this way, but I've never actually done it, and that coercian dot on a child being passed into a parent terminal is making me nervous..." boat for a critical project, even when it does work how you think its supposed to.
      I believe that the Actor Framework (which requires LabVIEW OOP to work with) is made for this type of stuff.
      I must say, I hadn't ever considered or seen using a parallel-enabled for loop with a SubVI in it to do this kind of thing, and I thought it was a cool idea.

  • Select key date of time-dependent hierarchy before select a hierarchy node

    Hello experts!
    I have a Web Application which has a selection on 0ORGUNIT (organizational unit). The selection is on hierarchy nodes and the hierarchy is time-dependent.
    Because of the time-dependency I have to give a key date for the hierarchy. But I want to select the key date at runtime/execution of the query and additionally I want to select the hierarchy node and other selection criterias.
    Maybe there is a solution to get all this in one pop-up or maybe in two or another solution how I can implement this requirement.
    Thanks for help!
    Peter

    Hey!
    You don't have to use the same presentation-hierarchy like  the selection-hierarchy is which you use for the variable. While presentation-hierarchy always has a key-date, the selection-hierarchy has none. So you see all values for selection but just this which are valid for the presentation-hierarchy are selected. And there is a warning which you can supress over RSRT.
    This solution works for our problem, maybe not for yours, don't know.
    Best regards,
    Peter

  • Time running time of applications in windows??

    How do I time the running time of applications in windows?? 
    in linux its quite easy : time ./a.out
    but how in windows??

    jinn wrote:
    How do I time the running time of applications in windows?? 
    in linux its quite easy : time ./a.out
    but how in windows??
    You can use TimeIt.exe from MS's Windows Server 2003 Resource Kit Tools:
    http://www.microsoft.com/downloads/deta … layLang=en
    The whole kit has to be downloaded (~ 12 MB), but you can extract the rktools.exe file and then extract the rktools.msi file contained therein to get at the individual tools without having to install everything if you desire.
    From the extracted readme file:
    Timeit.exe
    TimeIt is a command-line tool that records the time a specified command takes to run.
    File Required
        * Timeit.exe
    TimeIt Syntax
    timeit [-f FileName] [-a] [-c] [-i] [-d] [-s] [-t] [-k KeyName | -r KeyName] [-m Mask] [Command]
    -f FileName
        Specifies the name of the database file where TimeIt keeps a history of previous timings. The default file name is .\Timeit.dat
    -k KeyName
        Specifies the keyname to use for this timing run.
    -r KeyName
        Specifies the key name to remove from the database. If the key name is followed by a comma and a number, the slowest time (positive number) or the fastest time (negative number) for that key name will be removed.
    -a
        Specifies that TimeIt should display average of all timings for the specified key name.
    -i
        Ignores nonzero return codes from the program run by TimeIt.
    -d
        Shows detail for average.
    -s
        Suppresses systemwide counters.
    -t
        Specifies tabular output.
    -c
        Forces a re-sort of the database.
    -m Mask
        Specifies the processor affinity mask.
    Command
        Specifies the command to time.
    Note
    TimeIt accepts only parameters preceded with a dash (-).
    Though I believe TimeIt is a good choice based on your post, alternatively you could install Cygwin or use the various timer modules / classes / functions available in a variety of different programming languages depending on which one(s) you may use.

  • Time dependent conditions

    HI
    I have a problem with Time dependent conditions.
    As time dependent conditoins are also avililable for quotations if you set the time dependent conditions indicator for Document type in cusomizing.
    I have done this but now i want to know how to put Price/ Qty scale in quotation?
    Pl. help
    Thanks
    Prashant

    Hi,
    Go to transaction code ME47, select your RFQ>select the line item and choose Header> conditions-->select the line and choose scales from the application tool bar.
    There you can enter the scales for price/qty.
    Reward if useful
    Chandru

  • Time-dependent master data in the cube and query

    Hello,
    I have a time-dep. masterdata infoobject with two time-dep attributes (one of them is KF). If i add this infoobject into the cube, what time period SID will be considered during the load? I assume it only matters during load, if i add the KF to the query it gets its value based on the SID in the cube.. right?
    Thanks,
    vamsi.

    If its Time Dependent Master Data object when you run your Master Data if that time any changes to the Master Data that value will be overwrite to the old value you will get the new value. When you run the Query execution the Infocube Master Data infoobject will having the SID that time it will to there it will be displayed at that moved what is the value you have in the Master Data table.
    This is what my experience.
    Thanks,
    Rajendra.A

  • Data not uploading in Time dependent Master data Infoobject

    Hello All,
    I have a master data infoobject for HR entity and have to load data from PSA to that info object.
    The HR entity infoobject already have sone data like below:
    HR Entity
    Version
    Date from
    Date To
    x
    A
    01.07.2013
    31.12.9999
    x
    A
    19.04.2013
    30.06.2013
    x
    A
    01.09.2012
    18.04.2013
    x
    A
    01.01.2012
    31.08.2012
    x
    A
    01.01.1000
    31.12.2011
    Now the data in PSA is as follows:
    HR Entity
    Start Date
    End Date
    X
    01.01.2012
    18.12.2013
    Once I loaded this data to the infoobject, i can not see this value which is the latest value of this HR entity.
    Can somebody please explain how the data gets loaded in the time dependent master data infoobject and why this entry is not getting loaded in the info object.
    Regards
    RK

    Hi,
    did you activate master data after your load?
    You can check also version 'M' records and see if your record is there.
    The load went green?
    The problem is, that your entry overlaps all exisitng time intervals, which can't be deleted or merged as there may be dependent transactional data. You have first to delete the transactional data for this entity.
    Then you can delete the time-dependent data and reoload it from your PSA.
    BW will build then correct time intervals.
    The easiest is to change the time interval in PSA, see example below:
    At the moment the time interval is not accepted. But you can add time intervalls before 31.12.2011 and after 01.07.2013, Then system will create remaiing time intervals, e.g. your new record is:
    HR Entity
    Start Date
    End Date
    X
    01.08.2013
    18.12.2013
    Result will be:
    HR Entity
    Version
    Date from
    Date To
    x
    A
    19.12.2013
    31.12.9999
    x
    A
    01.08.2013
    18.12.2013
    x
    A
    01.07.2013
    31.07.2013
    Regards, Jürgen

  • Time-dependent Vendor Master & Handling Special Characters

    Hi,
    I need to extract time-dependent Vendor Master.
    1. The data source for <b>0VENDOR</b> does not have fields to hold the valid date range.
    2. Does the Master data in R/3 for Vendors will hold the valid date range?
    3. The text for <b>0VENDOR</b> provides time-dependent, but how to map the <b>valid from</b> and <b>valid to</b> fields?
    Handling Special Characters:
    We are trying to extract data from Legacy system via DB Connect. The item text field consists of special characters. Of course in BW customization we can specify all the special characters to consider. But the special character we observed is 'square' symbol i.e. 'new line character' in Oracle. We are updating this to an ODS object. When looked at error log, observed that green light for the number of records transferred and updated, but finally when it load into ODS object and activates popping up the error message saying 'could not recognize special character'.
    Please help me getting the 2 issues resolved.
    Thanks in advance.
    Regards,
    Sudhakar.

    Hi Everyone,
    Thanks for inputs on Special characters issue...
    Finally resolved with below piece of code in the start routine:
    DATA: FLAG,
          OFF TYPE I,
          LEN TYPE I VALUE 1,
          ALLOWED_CHAR(95) VALUE
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_=+ ' &
    'abcdefghijklmnopqrstuvwxyz:;<>,.?/|\{}[]"'''.
    CONSTANTS: C_CHAR VALUE '-'.
      LOOP AT DATA_PACKAGE WHERE NOT /BIC/ZI_DESC IS INITIAL .
        DO.
          IF DATA_PACKAGE-/BIC/ZI_DESC CN  ALLOWED_CHAR.
            REPLACE SECTION OFFSET SY-FDPOS LENGTH LEN OF
                    DATA_PACKAGE-/BIC/ZI_DESC WITH C_CHAR.
            FLAG = SPACE.
          ELSE.
            FLAG = 'X'.
          ENDIF.
          IF FLAG = 'X'.
            EXIT.
          ENDIF.
        ENDDO.
        MODIFY DATA_PACKAGE.
      ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    I have seen the link sent by 'Eugene Khusainov' today. Thought putting my piece of code that may help others...
    Regards,
    Sudhakar.

  • 0CS_Item with time-dependent hierarchy

    Dear Experts,
    we are discussing pros and cons for a time-dependent item catalog (characteristic 0CS_item with time dependent hierarchy in BW) within consolidation SEM BCS 4.0. Does anybody has experiences on this topic?
    I am quite sure it will be a performance issue and it means additional reporting effort (e.g. using reference period/year in the report comparing different hierarchies).
    I am not sure if there are any other risks so I it would be great if anybody has some hints.
    Thanks in advance,
    Birgit Laux
    Message was edited by: Birgit Laux

    Birgit,
    Some other things to consider:
    - frequency of changes to item hierarchy. Could lead to a lot of item hierarchies in BW over time.
    - hierarchy validity date does not seem to be displayed when running web queries and thus makes it difficult for the user to select the correct hierarchy when executing the query. Still looking for a fix for this.
    - greater complexity in overall design. Is it really necessary to achieve correct financial statement presentation?
    Virtual cube performance is not great but you could implement the data mart which provides typical BW query performance.
    I stayed away from setting the item as time dependent for these reasons.
    Brian

  • Issue while creating a heirarchy using Hierarchy Structure Time dependent

    Hi every body
    I created an Info object(SREP) with Heirarchy Strututre Time Dependent property. When i am creating an Heirarchy for the info object(SREP) i am not able to see any text node by default, do we need to create it explicitly or system would propose one node by defalut..
    I created a text node manually then and tried to assign an another info object(SREG) as a child using an option of "Insert Characterstic", but i am getting a message as "InfoObject SREG is not entered for InfoObject SREP as a Foreign Heirarchy Characterstic", and system is again proposing to assign some info object as a child.
    Thanks in advance..
    sekhar

    ok

  • Delivery cost in scheduling agreement having time dependent condition

    Hi experts,
    We have one peculiar requirement.
    We have palnt at indonesia.  We are doing import there from india.
    Our requirement is as follows.
    1. We should use scheduling agreement with time dependent conditions.  Because we want to track the price changes and sometimes we want to retro pricing effect and revaluate it.
    2. We want to add importers vat and import tax.
    3. But those tax amount should not get added into inventory
    4. During MIRO it should get accounted to vendor.
    We could succeed this by removing "Time dependend condition" check in document type config.
    But our client is definitely required the point no 1.
    But when we activate time dependent condition check, during MIRO those conditions are not appearing.  But if you remove that check, it is appearing in MIRO accounting.
    Can any one suggest suitable solution?
    Or SAP MIRO will not permit this scenario?
    regards,
    K.Sundaresan.

    delivery cost will not work if u remove the tick Time dependend condition for SA
    SAP MIRO will not permit this scenario
    so u will have to decide what is more important to u and act accordingly
    Solution will be u ask client what is mor imp for there company
    as SAP will not support MIRO for deliver for time dependent condition
    I had a talk with SAP on this and they have told that
    SAP will not support MIRO for deliver for time dependent condition
    AS in Case of imports in india we need to do MIRO before GR
    hope this hel;sp

  • What is time dependent master data?

    Can anybody explain me in detail with an example for time dependent master data?
    Thanks in advance.
    Sharat.

    hi,
    the master data value changes with respect to some time characteristics.
    say- Salesregion is a char that have sales rep as master data(attribute)
    saleregion  date from  date to              sales rep
    sr001        20/10/2007  20/12/2007          Ram
    sr002        21/12/2007  12/05/2008          Ram
    in the above example Ram is in two sales region in different dates.
    these type of attributes were time dependent.
    usually time period will be defined in the data range of 01/01/1000 to 31/12/9999.
    Ramesh

  • Creation of Time Dependent Hierarchy in R/3

    Any ideas on how to create a time dependent Hierarchy in R/3?
    Do we have any existing functionality we can leverage in R/3 for creating and maintaing time dependent hierarchy or through ABAP coding in R/3?
    Any ideas or documentation will be helpful.

    Hi Jasmine,
    check this documents/links to get an idea how to set up hierarchy extractor in R/3
    [How to Create a Hierarchy Extractor for Employees and their Department Managers|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20a709c1-0a8e-2a10-21b4-f779728c63bf]
    Re: Build Hierarchy with ABAP
    How to create datasource for hierarchy
    Double post: Creation of Time Dependent Hierarchy in R/3
    Regards
    Andreas

Maybe you are looking for

  • Oracle 10g database growing day by day

    Oracle 10g database database is growing day by day. I would like to know what is inserting into database Can you please let me know

  • N93 - set date and time every time

    Hi there, I'm new here but I've got a frustrating problem with my N93. Every time I switch the phone off, I have to re-enter the correct time and date. This is frustrating because when the phone is switched off, the alarm won't function so I have to

  • Create Outbound Delivery and Billing documents

    Hi Experts.!   Please I need your helps... I need create an Outbound Delivery Without Order Reference (similar to the tx vl01no) and a Billing Document (similar to tx vf01).. But I can't found the function or a bapi for it..   Thanks,    Gustavo

  • Contract that changes in the system

    Hi Gurus,     In our system the contract is made as  1 carton= 100 bottles but it gets changed in the system as 1 carton = 250 bottles and the PO GR, IR is done based on that. Please help how to handle this. Krishna

  • How to control notifications

    Hi.  I signed up to 'Apple Communities' a few days ago, but didn't see the 'set preferences options' as a result I started getting lots of irrelevant notifications.  To try and control the deluge, two days ago, I set the preferences to only those I c