Vi/data managment

Hi all.
2 years ago I graduated and 1year aog I started developping a typical stimulus-response set-up for behavioural neurofysiological experiments in LV, without knowing anything about LV (or programming in general). I'm a pretty quick learner however, and today, the set-up (1 stimul pc, 1 control (LV) pc and a dsp all connected through tcp/ip) is used intensively in our lab, although i'm stil debugging/developping new features for it constantly,
I'm getting managment problems however, a few examples: the dsp sends everything it samples (now 3channels @ 20kHz) to LV in blocks of 200samples, for saving to disk and display). At the same time it sends/receives control commands to/from the stimul pc and eventually from other pc's on the internal network.
When the system is running for a long time, the LV display can suffer from delays up to 10seconds. eg i stop execution on the dsp, but the LV display keeps on going for 10seconds displaying data.
Also, every time the histograms get updated, the main vi's display freezes for half a second.
Sometimes it takes way too long before LV (or is it windows? I don't know how the tcp/ip is handled) reads the tcp/ip data, what results in crashing the dsp (I'm at the edge of cpu usage there) which is the worst that can happen because the experiment has to be stopped then.
After reading up a bit on data managment etc, I easily figured out my vi probabely is one big mess that would scare most programmers away (I cannot post it for internal reasons, but I posted the fp of the vi unning a test so you can imagine there's a lot behind it.) Since the vi is still growing every day, I don't have much time to refactor it completely, but I feel I have to do something or I will get lost in the future (we're planning to go to 16channels which all have to be saved to disk by the vi, later it will be 100 channels, all containg brain activity)
So I have some questions I'd like to be answered by more experienced users so I can get some ideas for a new implementation.
Currently, I have 4 while loops containing tcp readers. 3 of them also display the data received and write it to file.
The writing is buffered however, eg first filling a shift register with 10000 samples, then post an event and pass the data through the event to another loop writing it to disk. Would it be better to store the data in a local/gloabel, common between the two loops, and just set an event to warn the scond one? Or is the queueing system better (haven't looked at it yet)? Same question goes for getting the data from the main vi to the histograms, I do this with a global event.
For the displaying, not every single point is displayed (because screen refresh rate is way slower then data rate), but would it benefit putting the display in a seperate loop and use events/... to pass data?
Also, I use like 100 local variables that have to be commonly accessible between the several while loops I have running, I've read locals aren't that efficient, but i see no other solution for it?
The squares on the eye/spike displays you see in the attachment, can be positioned/resized by the mouse, i have seperate while loops for that, recalculating the position every 100mSec depending on zoom etc, every display on the fp is a layer of several pictures/graphs. So the updating of the layers is never synchronous (eg displays data every 20mSec, but the squares every 100mSec), is this a drawback or does LV automatically sync it since it can only display at refresh rate anyway?
Almost every user input (menu/buttons) is handled through events, so I have 3 while loops with an event structure, each handling 20events with sometimes lots of work in it. Is a system with event handling, then passing it to a task handler or so preferable and why?
And is every while loop in LV running in a seperate thread?
I have several more questions, considering things that look fundamental LV stuff to me. Maybe I should follow a course? but I doubt there's a course focussing on all my problems. Or should I get a private teacher somewhere? :-]
Thanks for reading this little book, and thanks in advance for any answers!
Stijn
(LV 7.0, very clean win2k system on a dual xeon 3Ghz 1gb ram dual screen dell, i get up to 60%cpu usage during experiments, most of it kernel time)
ps very important note for dual nvidia screen users: do *not* use dual display, only horizontal span, or windows will eat all your kernel time while running eg vi's, hence slowing down everything really, really bad. Horizontal span is better since then windows thinks it's one (huge) screen only. It took me weeks to figure out why my vi couldn't read/display all data in time, well, it could, but it was just waiting for windows to do freaky secret stuff with my display driver.
Attachments:
VI.zip ‏755 KB

Hi Stijn,
First of all, there is a specific course, called the LabVIEW Intermediate I course, that discusses these issues. This course has been created for customers that want to write professional and large applications.
There is a course scheduled in Belgium the 29th of August, btw.
I have one big tip actually: Seperate your User Interface handling from the data processing and put them into separate parallel loops.
Use the Producer/Consumer Design Pattern with Events (template in LabVIEW). Use the Queue VIs to make sure that no event on the User interface is lost and use User events to communicate back to the User interface loop.
Queue your data coming from the TCP/IP communication. Use separate loops to split-up the acquisition of your data and the processing of your data. Master/Slave designs are ideal for this. Queueing will make sure that that you don't lose the data while processing. Make sure that none of the loops are blocked by shared resources. For example, make sure that the acquisition loop doesn't have to wait for the processing loop to finish because there is a shared resource between the loop. Queues don't have that problem.
Locals can create "race conditions". They also create a copy of the data which is memory intensive. Alternatives for locals are Queue Vis or Notifiers. (Check the design templates in LabVIEW). You could also use "functional globals". These are VI's that replace the normal global variable by a state machine that has a "get data" and a "set data" state and where the value is stored in the "shift register".
Multithreading ---> Check the link below:
http://zone.ni.com/devzone/conceptd.nsf/webmain/D2​E196C7416F373A862568690074C759
Most of your questions are handled by the Intermediate I and Intermediate II course.
Regards.
JorisV
TL AE
NIBE

Similar Messages

  • Search for [Remote Key] and [Remote System] in Data Manager

    Hello all
    I would like to be able to search on the remote key and the remote system in the MDM Data Manager is that not possible? I thought I remembered seeing that possibility under the Free-Form Search but now I can't find it.
    I have, however, found this in the Data Manager reference guide:
    REMOTE SYSTEM AND REMOTE KEY FIELDS
    MDM uses the remote systems defined in the Remote Systems table
    within the MDM Console to store and maintain key mapping information
    for each record or text attribute. It does this using a virtual “key
    mapping” field that you never see in the MDM Client.
    This virtual key mapping field is very much like a qualified lookup field
    into a virtual key mapping qualified lookup table.
    Key Mapping information stored in virtual lookup field
    The Remote System and Remote Key fields are normally not visible;
    however, they do appear in several places in the MDM Client.
    Specifically, both fields: (1) appear in the File > Export dialogs in Record
    mode for exporting value pairs; (2) are recognized by the File > Import
    dialog in Record mode for importing value pairs; and (3) appear in the
    Edit Key Mappings dialogs in both Record mode and Taxonomy mode,
    for viewing and editing value pairs.
    Is there any way to search on the value in the remote key from the Data Manager?

    Not sure search i think not possible.
    But you can see keys as mentioned:
    Enable Key mapping in Console.
    MDM Client maens MDM Data Manager.
    They do appear in several places in the MDM Client or Data Manager. Three different methods to see in DM are given already below:
    Specifically, both fields: (1) appear in the File > Export dialogs in Record mode for exporting value pairs; (2) are recognized by the File > Import dialog in Record mode for importing value pairs; and (3) appear in the Edit Key Mappings dialogs in both Record mode and Taxonomy mode, for viewing and editing value pairs.
    BR,
    Alok

  • Error while opening MDM Data Manager

    Hi,
    We are getting the following error while trying to open Data manager on our repository.
    "Error Initializing Attributes for table Taxonomy
    Application will exit
    Already exists"
    mds Version 5.5.42.90
    MDM DataManager Ver5.5.42.90
    The repository loads without any errors. The server log file too doesnt show any errors.
    Is there anyway to fix this?

    Go to your MDM console, Login to repository and Unload repository first.
    Then load with Update Indices.
    This problem comes when you change anything in schema in console and then load repository with immediate option.
    So always prefer to use update indices as accelator files will get updated and data comes from actual database.
    If the problem still persists then Go again to console and check your repository for any fatal error. if errors come then repair repository and if not come then also repair.
    Then load with update indices.
    Hope it will help you.
    BR,
    Alok
    Edited by: Alok Sharma on Feb 14, 2008 9:20 AM

  • Not able to see data in the qualifier table of the main tbl , Data Manager

    Hi,
    I have an issue of not able to see the data of two qualified table after populating them.
    It is in mdm-5.5 ps4.
    When populating data first time ,it shows up in those two table slots in the right side of the Data Manager.
    However subsequently it does not show up in those slots , only by right click on the table and selecting "View/edit", the window pops up where those data shows up.
    However unlike other qualified tables the data does not showup automatically for these two tables.
    Appreciate any suggestion or feedback on this.
    regards,
    -reo

    You may have checked the Filter Check Box next to the Qualified Lookup cell in Data Manager, when the current table is the Main Table.
    You use the Filter Checkbox to limit the qualified table records by the current search selections.
    Secondly, you have see if there are any Qualified Links to the main table record you are viewing.
    If not, create the Qualified links in Data manager, for the main table record and the Qualified Table Record.
    Once this is done, you will see the Display fields of the Qualified table for which the links exists for the given main table record.
    Message was edited by:
            Adhappan Thiagarajan

  • Unable to access the data from Data Management Gateway: Query timeout expired

    Hi,
    Since 2-3 days the data refresh is failing on our PowerBI site. I checked below:
    1. The gateway is in running status.
    2. Data source is also in ready status and test connection worked fine too.
    3. Below is the error in System Health -
    Failed to refresh the data source. An internal service error has occurred. Retry the operation at a later time. If the problem persists, contact Microsoft support for further assistance.        
    Error code: 4025
    4. Below is the error in Event Viewer.
    Unable to access the data from Data Management Gateway: Query timeout expired. Please check 1) whether the data source is available 2) whether the gateway on-premises service is running using Windows Event Logs.
    5. This is the correlational id for latest refresh failure
    is
    f9030dd8-af4c-4225-8674-50ce85a770d0
    6.
    Refresh History error is –
    Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: The operation has timed out. Errors in the high-level relational engine. The following exception occurred while the
    managed IDataReader interface was being used: Query timeout expired. 
    Any idea what could have went wrong suddenly, everything was working fine from last 1 month.
    Thanks,
    Richa

    Never mind, figured out there was a lock on SQL table which caused all the problems. Once I released the lock it PowerPivot refresh started working fine.
    Thanks.

  • Unable to refresh SQL Server data source through Data Management Gateway

    I just installed the version 1.1.5226.8 of Data Management Gateway and tried to refresh a simple query on a table connected to SQL Server, with no transformations in Power Query.
    This is the error I obtain:
    Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: transfer service job status is invalid.
    I am wondering whether my Power BI is still not updated to handle such a connection type, or there could be something else not working?
    I correctly created the data source in admin panel following instructions in Release Notes, and
    test Power Query connection is ok.
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

    I made other tests and I found important information (maybe there is a bug, but read the following).
    The functions DateTime.LocalNow and DateTime.FixedLocalNow
    work correctly, generating these statements to SQL Server:
        convert(datetime2, '2014-05-03 06:37:52.1135108') as [LocalNow],
        convert(datetime2, '2014-05-03 06:37:52.0525061') as [FixedLocalNow],
    The functions DateTimeZone.FixedLocalNow, DateTimeZone.FixedUtcNow,
    DateTimeZone.LocalNow, and DateTimeZone.UtcNow
    stop the scheduled refresh with the error I mentioned
    in my previous messages, generating these statements to SQL Server:
        '2014-05-03 06:37:52.0525061+02:00' as [TZFixedLocalNow],
        '2014-05-03 04:37:52.0525061+00:00' as [TZFixedUtcNow],
        '2014-05-03 06:37:52.1135108+02:00' as [TZLocalNow],
        '2014-05-03 04:37:52.1135108+00:00' as [TZUtcNow]
    I solved the issue by placing the DateTimeZone calls after a Table.Buffer call, so query folding does not translate in SQL these functions. However, it seems like something to fix.
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

  • Change of sign when running the data management package

    Hi All,
    I have written a script logic for copying my Budget member under category dimension to say another member say "XYZ" under category dimension and this is for my Member Sales under ACcount dimension having acctype as inc.
    When i run the logic thru default i am getting the correct value. however if i run the same thru data manager package- my sign changes.
    Eg. 100000 is copied as -100000 and -50000 is copied as 50000.
    Please help me out
    Regards
    Navin

    Hi Navin,
    CREDITPOSITIVE= YES | NO
    Default: YES
    If No, all amounts referring to an ACCOUNT type (LEQ, INC) will have their signs reversed.
    Since you are referring to the member account sales as INC the default logic considers the sign as reversed.
    Please look at this link which helps you to understand
    Significance of Account Type EXP,LEQ,INC,AST in BPC- Need some valid reason
    Hope this helps.
    Regards,
    Sanjeev

  • Power Query/Data Management Gateway data refresh not working

    Pretty new to o365/Power BI, but here's what I've got going on (hopefully someone can help me out):
    I created a data management gateway and data source.  The data source says it's online in the PowerBI admin center, and it seems to be working correctly.  I can open Excel 2013 on my desktop (logging in as my trial o365 account which has Power
    BI associated with it) and connect to the data source via Power Query using the oData option.  I make sure to import the data into the model, and then open up the PowerPivot window and create a simple pivot table using the data in the model.
    that all works just great.  The problem comes when I upload the workbook and try to update it.  I've tried a few different ways.
    1. When I try to manually refresh the workbook by opening it in my o365 site and going to data-->refresh I get the following error:
          An error occurred while working on the Data Model in the workbook. Please try again.
          We were unable to refresh one or more data connections in this workbook.
          The following connections failed to refresh:
          Connection: Power Query - dbo_DimProductCategory
          Error: Out of line object 'DataSource', referring to ID(s) 'a75593f3-c34d-4f83-9458-49aa2cece164', has been specified but has not been used.
          The following system error occurred: Class not registered
          The provider 'Microsoft.Mashup.OleDb.1' is not registered.
          Power Query - dbo_DimProductCategory
    2. When I go into Power BI and go to "Schedule Data Refresh" for the workbook, I get the following error:
          Sorry, the data connections in this report aren’t supported for Scheduled Refresh.
          Technical Details â–¼
          Correlation ID: B3CE4B10-2137-E593-6FCF-189B73465190
          Date and Time: 03/31/2014 06:20:39 PM (UTC)
    Any help would be greatly appreciated.  If you need additional information, I'd be happy to provide it.

    Hey Guy,
    Thanks for the reply.
    The "data source type" of the data source in Power BI is "SQL Server" (there was only that and Oracle available to select from)
    The "data source type" that Power Query is using in Excel is "From oData Feed"....which is using the Power BI data source....which is using the data management gateway.
    A few follow up questions if you have a second
    1. Do you know when PowerQuery data refresh will be supported? (just a general idea....weeks, months, next year?)
    2. Is there any other way to connect to (and be able to refresh) PowerBI data sources referencing "on prem" data via the data management gateway?  I tried using the oData feed URL in non-PowerQuery areas of excel (excel data tab, PowerPivot directly)
    but it didn't work.  If there's some other way to connect to and refresh on prem data, i'm all ears :D 
    Really appreciate your help, thanks for taking the time.

  • Cannot Delete Articles from Data manager..

    Hi Guru's,
    WHile delting record s from Data Manager I am getting Error
    " Insufficient disk space available on DBMS" and as a result i cannot delete reocrds..
    What could be the issue?
    Please let me know if ican take help of our Basisi admin team .. Or Is there anything that i can work out in MDM..
    Regards,
    Vikrant M Kelkar..

    Hi everyone,
    Got it .. It was isseu because the table space was full and it ddnt allow me to further delete articles..
    Increased Table space and its ALl Good now..
    Thanks all ( whoen=ver reads this thread)
    Regards
    Vikrant M Kelkar

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • Data Manager Packeage and Process chain si not working

    Hi All,
    I executed a data manager package which contain a process chain to revaluate the one of my Account dimension meneber Say  "Revenue". I am working on BPC NW 7.0
    steps I followed:
    1. I created a script logic file and created a custom process chain.
        process chain steps:
      a) Start variant
      b) Modify dynamically
      c) Run Logic
      d) Or and Clear BPC tables
    2. This process chain was included in data manager package.
    3. Data manager package was modyfied to include parameters and scipt logic file name.
    4. executed data package
    The issue is " when I execute Data manager Package" I dont get any error but when I View status I dont see any pachage running or completed. If I see Process chain, It is failing at first step of Modify dynamically..no clue?
    Could you please let me know what could be a issue?
    Cheers,
    SAC

    I encounter this problem, Do this Steps:
    I. First,check if your process chain is existing in the Library.
    II.If yes,follow the steps below:
    1. Edata - organize Package - Modify your Package.
    2.Check if you had the correct process chain.
    3.IF yes, Click View package at its right side.
    4.Expand the Task Folder and take note of the Task Name (e.g. ZBPC_PROT_RUN_LOGIC)
    5.click Advance,Compare the task name that you noted in the syntax TASKS
    (e.g. TASK(ZBPC_PROT_CF_RUN_LOGIC,SUSER,%USER%)
    6. It should be the same.
    Running package but not appearing any status happens when the system cannot find your process chain.
    hope this helps,

  • How to set a variable value on the BPC Data Manager

    Hello BPC Experts,
    I'm creating a BPC10 NW version demo environment for our prospect customer.
    I made a data manager to import  BW data into BPC model from BW cube.
    I need to import just one month data into BPC from the BW cube that has more than one month data.
    When I run the data package manually, I can select a member of the time dimension prompt and I can import specific month data I want.
    But, in a case where the program (data manager) runs by JOB monthly,
    I can't select a member of the time dimension prompt manually.
    So I want to know how to set a  variable value to the time dimension prompt from a system date etc. automatically.
    Are there any way to set a variable value to the time dimension prompt on the data manager automatically from a system date?
    Or, do you have any other solution to import just one month data into BPC from the BW cube that has more than one month data  by the data manager running on JOB ?
    (without selecting a member of the time dimension prompt of the data package manually)
    Thanks in advance,
    Keisuke

    Hi Gersh
    Sorry for my late reply and thanks for your helpful information.
    I tried the second way of your information and I could configure it.  
    And I 'll try first way of your information.
    Regards,
    Keisuke

  • How to use another application's Dimension or not assigned in Data Manager

    PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%ENTITY_DIM%,%TIME_DIM%,DATASRC")
    DATASRC IS NOT A MEMBER OF APPLICAION
    It's for fIltering purpose at Package selection
    because there are a lot of member id in Dimension but
    i want to display specified members to choose for Script Logic
    thank you.
    Edited by: YOUNG HUN on Sep 16, 2011 10:45 AM
    Edited by: YOUNG HUN on Sep 16, 2011 10:46 AM

    Hi,
    A data manager package applies to a particular application only. It cannot access dimensions from another application.

  • Remote system details keying in Data Manager

    Hello Gurus,
    I need to create records theough portal. Is there any default way to key in the remote system & remorte key details in to data manager automatically?
    Thanks in advnace for your help.
    Regards,
    Ravi

    Hi Ravi
    Please refer to following thread for details.
    Re: Remote Key Manupulation in Java MDM APIs
    best regards
    Ravi

  • Data Manager not available in the BPC 7.0 Action Pane

    Hi,
    I have just installed BPC 7.0 and everything is working fine, except I don't have access to the Data Manager.
    According to the BPC guide, this is how to start Data Manager:
    1. Click the Business Planning and Consolidation icon on your desktop.
    2. From the Business Planning and Consolidation launch page, select Business Planning and Consolidation for Excel.
    3. From the Getting Started - BPC for Excel action pane, select Manage Data.
    I don't have "Manage Data" as an option in the Action Pane. The options I have under Available Task Categories are: "Reporting & Analysis", "Journals" and "Open System Reports".
    I also do not have a menu called eData.
    Any ideas on what I can do?
    Thanks,
    Sam

    Please check your task profile....
    Make sure you  have all task profile related to data manager....do let us know if youstill face this problem

  • Searching attibutes in the record mode in Data Manager

    Hi,
    If i create a new attribute in taxonomy mode,i cannot view it in the corresponding search in the record mode in Data Manager.The particular attribute which i have added is not getting displayed in the attributes in the search pane.If i have to search for that attribute in the record mode what should i do.
    Thanks and Regards,
    Preethi

    hi Preethi,
    there are a few differencies between fields and attributres
    have a look at table:
    Tab. 1 Comparison Fields vs. Attributes
    from this document
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d4211fa-0301-0010-9fb1-ef1fd91719b6
    for search options based on attributes have a look at the bottom
    of the table I mention
    hope this will clarify a little bit
    Regards,
    michal

Maybe you are looking for

  • ITunes says there is almost a GB of photos on my iPod touch, but I only have 6 pictures

    Hello Apple community: I have an 8GB iPod touch, 4th Gen. I am trying to make some space for movies, iOS 6 upgrades, etc. and I noticed on iTunes' "iPod touch summary page", there is almost a gig of pictures, even though I only have abou 6 pictures,

  • Copying database objects and data from one server database to another server database in AG group

    Hi, I am still trying to wrap my head around sql clusters and AGs and I have a project that requires I take a vendor's database and restore it weekly so its available on the production server which is clustered. The vendor's database on the cluster i

  • Adobe Flash Player Keeps uninstalling Windows 7

    I know this topic has been done over a few times but here is my setup I have Window 7 Home Edition 64bit Web Browser is both the IE Explorer 9 and Firefox 18 Flash player is Adobe Flash Player 11.5.502.146 I install it and then after closing browser

  • Data Persistence

    Can i specify persistence location in MI client. I want my data persistence to be on a central server. Then to synchronize data from central server to R3. client1 client2  client3       central       server Because data dependency exists between clie

  • Can't find rented videos partially downloaded

    I rented four videos from iTunes. I went into my video application to see the progression of the downloading. I opened on up and then accidentally touched a button that has an arrow facing down. The video disappeared from my video application and is