Design Patterns, best approach for this app

Hi all,
i am starting with design patterns, and i would like to hear your opinion on what would be the best approach for this app. 
this is basically an app for data monitoring, analysis and logging (voltage, temperature & vibration)
i am using 3 devices for N channels (NI 9211A, NI 9215A, NI PXI 4472) all running at different rates. asynchronous.
and signals are being processed and monitored for logging at a rate specified by the user and in realtime also. 
individual devices can be initialized or stopped at any time
basically i'm using 5 loops.
*1.- GUI: Stop App, Reload Plot Names  (Event handling)
*2.- Chart & Log:  Monitors Data and Start/Stop log data at a specified time in the GUI (State Machine)
*3.- Temperature DAQ monitoring @ 3 S/s  (State Machine)   NI 9211A
*4.- Voltage DAQ monitoring and scaling @ 1K kS/s (State Machine) NI 9215A
*5.- Vibration DAQ monitoring and Analysis @ 25.6 kS/s (State Machine) NI PXI 4472
i have attached the files for review, thanks in advance for taking the time.
Attachments:
V-T-G Monitor_Logger.llb ‏355 KB

mundo wrote:
thanks Will for your response,
so, basically i could apply a producer/consummer architecture for just the Vibration analysis loop? or all data being collected by the Monitor/Logger loop?
is it ok having individual loops for every DAQ device as is shown?
thanks.
You could use the producer/consumer architecture to split the areas where you are doing both the data collection and teh analysis in the same state machine. If one of these processes is not time critical or the data rate is slow enough you could leave it in a single state machine. I admit that I didn't look through your code but based purely on the descriptions above I would imagine that you could change the three collection state machines to use a producer/consumer architecture. I would leave your UI processing in its own loop as well as the logging process. If this logging is time critical you may want to split that as well.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • Best approach for this problem

    Hi there Experts,
    I have an Async Sync Bridge BPM, to go from Delivery Idocs to Webservice Calls, after that i map the response to a an ALEAUD Idoc structure and i send it back to erp to update the Delivery Status.
    Currently its working as intended on production system, but the Deliveries quantity is growing exponentially, raising the response times for the whole process.
    I found a solution for this problem, instead of making 1 Webservice call for each delivery, i can group those deliveries and send multiple deliveries per each webservice call, the problem i have appears when i need to map this response to single ALEAUD Idocs.
    To Update the original delivery Idoc i need that idoc number onto the ALEAUD, but the webservice returns the response based on delivery number, therefore i need a mechanism, maybe a temporal table or something, that allows me to store the idoc number with the matching delivery number so i can use it as reference to map the huge response to single ALEAUD Idocs, also i'd like to know if this is possible to achieve using graphical mapping or wich would be the best way to do it.
    Thanks for all the input on the matter,
    Regards,
    Roberto.

    Maybe you can write 2 RFC function modules to maintain values in ECC and the other to read it. These RFC's can be called from within mapping.
    I dont know if it will work or not, but can be tried.

  • Regarding which design pattern to use for this scenario???

    hi guys
    I am working on a J2EE application where I need to do translations for 3 different scenarios. It is basically a conversion from service order objects to invoices.
    First from a service order object to an invoice.
    Second a conversion from a transaction table.
    Third a conversion from a remote system.
    Finally the product is an invoice..
    What design pattern can i use ....is strategy pattern a good idea??
    Thanks
    J

    Hi,
    I think your problem is in result state. You can you sequencial block but for approve or reject you need to set target for each result state. Here I am providing a link. I think you will get your solution here please go through it.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/429bbd709914bce10000000a155369/frameset.htm
    if you have any query please let me know.
    Thanks
    Chandan

  • Best approach for this?

    I have a table variable person_demographics.
    In this table there are a whole bunch of variables codes.
    country_code, gender_code, state_code, race_code etc etc
    all in different tables.
    I need to display to the user the real labels and not the codes which are localted on all this different tables.
    the logic is that a user enters a persons id and then the info is displayed on the screen, the info is read only enforced by the database. (belongs to a table where only DBA can write).
    can you guys suggest a good way to do this? I have already created a block called person_demographics, but again, it displays only de codes.
    please if you could be so kind, provide suggestions with actual code if possible,
    thanks!

    great suggestion William,
    but one more question, how would you avoid missing records that have Nulls on the condition variables. for instance where a record in the person demographics does not have a country code. By the simple joing it will exclude that record since the condition will not be fullfil right?.
    Now, it seems like an outter joint may be the solution, but as you know, you can do outter joint in only one table for each query. Any suggestions?
    thanks a bunch!

  • Best approach for IDOC - JDBC scenario

    Hi,
    In my scenarion I am creating sales order(ORDERS04) in R/3 system and which need to be replicated in a SQL Server system. I am sending the order to XI as an IDoc and want to use JDBC for sending data to SQL Server. I need to insert data in two tables(header & details). Is it possible without BPM?  Or what is the best approach for this?
    Thanks,
    Sri.

    Yes, this is possible without the BPM.
    Just create the Corresponding Datatype for the insertion.
    if the records to be inserted are different, then there wil be 2 different datatypes ( one for header and one for detail).
    Do a mutlimapping, where your Source is mapped into the header and details datatype and then send using the JDBC sender adapter.
    For the strucutre of your Datatype for insertion , just check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    To access any Database from XI, you will have to install the corresponding Driver on your XI server.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    Regards,
    Bhavesh

  • Best approach for publishing a paid version and an ad supported free version of the same app

    Hi,
    One of my Windows 8 store app is almost ready for store submission.
    What is the best approach for publishing a paid version and  an ad supported  free version of the same app.
    Can I do the following
    1. Submit the app with unlimited free trial to store
    2. During the free trial ads will be displayed
    3. If the user purchases the app, then the ad would not displayed
    Any advise is greatly
    appreciated.
    Best Regards

    Although the in-App purchase option is good but for ad based apps my approach is different.
    I would suggest putting 2 different apps in the store, one free with Ads and one without. Reason being you want the extra reference and xaml ad controls depending upon how
    many you have on the paid version of the apps. I would keep my apps as lighter and cleaner as possible specially when its a paid app.
    I currently manage both free and paid app through one solution and reuse most of the code except for the views.
    Binoj Daniel www.CodeRewind.com

  • Best approach for a cross language application

    I am working on a project where we are planning to write the data acquisition code in LabVIEW, but the rest of the application is being written in C# by some developers that are unfamiliar with LabVIEW. I am looking for suggestions for the best architecture for this kind of application.
    Traditionally, in my LabVIEW applications that require UI, data aquisition, logging, and analysis, I generate a tiered producer consumer architecture. I usually build a queued event driven producer/consumer, and then create additional consumer loops to handle data as it propogates out of the acquisition loop. In this project, I am basically looking to only create the acquisition loop in LabVIEW, with the rest of the "loops" being generated by the C# guys using .NET 4.0 CLR.
    The original plan was to make my loop as I usually would in LabVIEW and build it as a .NET interop. I hadn't really sorted it out yet, but the plan was to basically get configure and start commands from the C# gui (not sure how to replace the queue here), and use some event to get the analysis parts of the program to trigger at appropriate times based on data availability. It's come to my attention that LabVIEW generated .NET interops can not run in 4.0 CLR applications though, so I'm looking for alternatives.
    Basically, I'd like to hear about similar applications and what has worked and not worked. I'm particularly interested in good approaches for interprocess communication between LabVIEW and a .NET app, and also any thoughts on triggering actions in the .NET app from the LabVIEW portion (can this be done without the .NET code polling something?).
    Thanks!
    Chris

    Hi Chris,
    C. Minnella wrote:I'm particularly interested in good approaches for interprocess communication between LabVIEW and a .NET app, and also any thoughts on triggering actions in the .NET app from the LabVIEW portion (can this be done without the .NET code polling something?).
    whenever it comes to communication between windows applications, I don't stop recommending the highly underrated Microsoft Message Queue (MSMQ) infrastructure and in my opinion, it actually screams to be used in your scenario:
    1. Let LabVIEW collect the data and place it into a designated data queue.
    2. Let C# exe attach to queue and do the data retrieval/evaluation/storage/whatever by OnMessageReceived events.
    3. Let C# send control messages to a second queue, that is read by LV.
    MSMQ is increadibly easy to use, yet very powerfull and has so many aspects and benefits for interprocess communication, especially between different machines in a LAN - a real pity that it's so little known. Just have a look at the following thread, especially at the tiny LabVIEW example I've placed there: http://forums.ni.com/t5/LabVIEW/MSMQ-with-Labview/m-p/154334
    This could be done better on the LabVIEW side (event based rather than polling), but as you just want to send some configuration and control commands, it's okay like this.
    Unfortunately, there are not too many good resources about MSMQ on the web that explain the coding basics well.The MSDN magazine has some great articles if you're somewhat experienced (like http://msdn.microsoft.com/en-us/magazine/cc163920.aspx ). What I found really helpful and gives a great introduction is this book: http://amzn.com/1590593464
    Give MSMQ try and have fun with it!
    Cheers,
    Hans

  • Design Patterns/Best Practices etc...

    fellow WLI gurus,
    I am looking for design patterns/best practices especially in EAI / WLI.
    Books ? Links ?
    With patterns/best practices I mean f.i.
    * When to use asynchronous/synchronous application view calls
    * where to do validation (if your connecting 2 EIS, both EIS, only in WLI,
    * what if an EIS is unavailable? How to handle this in your workflow?
    * performance issues
    Anyone want to share his/her thoughts on this ?
    Kris

              Hi.
              I recently bought WROX Press book Professional J2EE EAI, which discusses Enterprise
              Integration. Maybe not on a Design Pattern-level (if there is one), but it gave
              me a good overview and helped me make some desig decisions. I´m not sure if its
              technical enough for those used to such decisions, but it proved useful to me.
              http://www.wrox.com/ACON11.asp?WROXEMPTOKEN=87620ZUwNF3Eaw3YLdhXRpuVzK&ISBN=186100544X
              HTH
              Oskar
              

  • What are the best approaches for mapping re-start in OWB?

    What are the best approaches for mapping re-start in OWB?
    We are using OWB repository 10.2.0.1.0 and OWB client 10.2.0.1.31. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux.
    We have number of mappings. We built process flows for mappings as well.
    I like to know, what are the best approches to incorportate re-start options in our process. ie a failure of mapping in process flow.
    How do we re-cycle failed rows?
    Are there any builtin features/best approaches in OWB to implement the above?
    Does runtime audit tables help us to build re-start process?
    If not, do we need to maintain our own tables (custom) to maintain such data?
    How did our forum members handled above situations?
    Any idea ?
    Thanks in advance.
    RI

    Hi RI,
    How many mappings (range) do you have in a process flows?Several hundreds (100-300 mappings).
    If we have three mappings (eg m1, m2, m3) in process flow. What will happen if m2 fails?Suppose mappings connected sequentially (m1 -> m2 -> m3). When m2 fails then processflow is suspended (transition to m3 will not be performed). You should obviate cause of error (modify mapping and redeploy, correct data, etc) and then repeat m2 mapping execution from Workflow monitor - open diagram with processflow, select mapping m2 and click button Expedite, choose option Repeat.
    In re-start, will it run m1 again and m2 son on, or will it re-start at row1 of m2?You can specify restart point. "at row1 of m2" - I don't understand what you mean (all mappings run in Set based mode, so in case of error all table updates will rollback,
    but there are several exception - for example multiple target tables in mapping without corelated commit, or error in post-mapping - you must carefully analyze results of error).
    What will happen if m3 fails?Process is suspended and you can restart execution from m3.
    By having without failover and with max.number of errors=0, you achieve re-cycle failed rows to zero (0).This settings guarantee existence only two return result of mapping - SUCCSES or ERROR.
    What is the impact, if we have large volume of data?In my opinion for large volume Set based mode is the prefered processing mode of data processing.
    With this mode you have full range enterprise features of Oracle database - parallel query, parallel DML, nologging, etc.
    Oleg

  • Best approach for RFC call from Adapter module

    What is the best approach for making a RFC call from a <b>reciever</b> file adapter module?
    1. JCo
    2. Is it possible to make use of MappingLookupAPI classes to achieve this or those run in the mapping runtime environment only?
    3. Any other way?
    Has anybody ever tried this? Any pointers????
    Regards,
    Amol

    Hi ,
    The JCo lookup is internally the same as the Jco call. the only difference being you are not hardcoding the system related data in the code. So its easier to maintain during transportation.
    Also the JCO lookup code is more readable.
    Regards
    Vijaya

  • Best Approach for Reporting on SAP HANA Views

    Hi,
    Kindly provide information w.r.t the best approach for the reporting on HANA views for the architecture displayed below:
    We are on a lookout for information mainly around the following points:
    There are two reporting options which are known to us and listed below namely:
    Reporting on HANA views through SAP BW  (View > VirtualProvider > BEx > BI 4.1)
    Reporting on HANA views in ECC using BI 4.1 tools
            Which is the best option for reporting (please provide supportive reasons : as in advantages and limitations)?
             In case a better approach exists, please let us know of the same.
    Best approach for reporting option on a mixed scenario wherein data of BW and HANA views is to be utilized together.

    Hi Alston,
    To be honest I did not understand the architecture that you have figured out in your message.
    Do you have HANA instance as far as I understood and one ERP and BW is running on HANA. Or there might be 2 HANA instance and ERP and BW are running independently.
    Anyway If you have HANA you have many options to present data by using analytic views. Also you have BW on HANA as EDW. So for both you can use BO and Lumira as well for presenting data.
    Check this document as well: http://scn.sap.com/docs/DOC-34403

  • What's Best Approach for Multitrack Classical Music?

    Can someone suggest the best approach for recording classical musicians onto
    four tracks? In this scenario, they play until they make a mistake on, say,
    measure 24, stop, then (take 2) go back to measure 20 and play until the next
    rough spot, and so on. Ultimately there may be 15 takes that all need to be
    trimmed and stitched together.
    In the old (tape) days, this was pretty basic editing. I would use a blade and block
    to cut out all the bad stuff on the multitrack tape, then I could mix. But how do I
    do this in Audition? (I use version 1.5.)
    I can't do the cuts it in edit view because the tracks would get out of sync
    Assuming all the takes are in one session, in multitrack view, this most basic of
    functions seems to elude me. What am I missing?

    Al the Drifter wrote:
    If you follow Steve's advice, and after doing the edits you discover
    that one instrument should come up 1db, you are screwed.
    I could be wrong about this in the classical music environment,
    where things are not close-mic'ed but if I am, I am confident Steve
    will correct me.  Ha.
    You always run the risk of small changes between takes - and that's where Audition 3 and the new improved crossfades score rather heavily. You won't notice 1dB on a single instrument across a fade though - it's hard to spot this as a jump, even, unless it's on pure tone. No, I very rarely close-mic stuff at all, although I did with a clavichord recently - it's seriously too quiet to mic any other way.
    jaypea500 wrote:
     when recording classical music, any engineer worth anything has the mix down pat as it's being recorded. 
    That's the way they used to work, certainly - but not nowadays, especially if it's done on location, which most classical recording is. What's more likely to happen is that you'd use decent mic preamps feeding straight into a multitrack, or even some software on a laptop. I generally record like that - but I also feed the multitrack outputs to a Yamaha mixer via ADAT, do a mix on that and record it back to a spare multitrack pair. I don't actually need to do that - but having a mix available from the multitrack that's pretty much there is good as far as being able to play back takes to conductors is concerned.
    Of course, one of the other reasons that classical sessions recorded on location aren't mixed on the spot is that the monitoring conditions are invariably far from ideal, and I'd have it that no engineer worth anything would ever risk a final mix done on location.
    But I only get paid to do all of this on a regular basis, so what would I know? Must be something though - my customers come back for more...

  • Best approach for building dialogs based on Java Beans

    I have a large amount of Java Beans with several properties each. These represent all the "data" in our system. We will now build a new GUI for the system and I intend to reuse the beans as far as possible. My idea is to automatically generate the configuration dialogs for each bean using the java.beans package.
    What is the best approach for achieving this? Should I use PropertyEditors or should I make my own dialog-generator using the Introspetor class or are there any other suitable solutions?
    All suggestions and tips are very welcome.
    Thanks!
    Erik

    Definitely, it is better for you to use JTable. Why not try it?

  • What’s the best practice for this scenario?

    Hi,
    My users want the ability to change the WHERE and/or ORDER BY clause at runtime. They may define user preferences on each screen ( which is bind to a view object). They want to see the same records based on WHERE/ORDER BY defined on the last visit. That is why I keep the users preferences and load the screen based on that, using :
    View.setWhereClause(...);
    View.setOrderByClause(...);
    View.executeQuery();
    This works good when only one user working with the application but faced low performance when more than one user working with the application.
    What are the points to increase the performance and what is the best practice for this scenario?
    Thanks for your help in advance.

    Sung,
    I am talking only about 2 users in my testing. I am sure i missed something but could not recognize that.
    This page is my custom query page including a tag to instantiate app module in stateful mode at the top <jbo:ApplicationModule..> and a tag to instantiate data source <jbo:Datasource...> and release tag at the bottom <jbo:ReleasePageResources..> and some java code in the middle(body). The java code constructed the query statement and then fires the query to set the view object based on the query statement using the above methods.
    So, I am facing very slow performance(speed) when two clients load this page at the same time. Looks like the entire application locks for others when one client load this page and fire the query. i realized the battle neck is where executeQuery() is executing.
    what do you think.
    Thanks in advance for your comments.

  • Best Approach for Pagination  in 11.1.1.6 or 11.1.1.7  for Portals

    Hi ,
    We have a requirement for using pagination in webcenter portal . We already installed Jdev 11.1.1.6 , So is their any approach or a solution for Pagination in 11.1.1.6 . If not could you please suggest any other approach for upgrading to 11.1.1.7 .
    If we upgrade to Jdev 11.1.1.7 , Is it compatable with Webcenter Portals . Could you please suggest the best appraoch for this.
    Thank you,
    Sashank P

    I do believe pagination is coming back in .7 but am not 100% sure.
    Anyway you can build your own custom pagination by following this blog: http://andrejusb.blogspot.co.uk/2011/05/oracle-adf-11g-custom-table-pagination.html
    edit: it's back in .7: http://andrejusb.blogspot.co.uk/2013/04/adf-11g-ps6-adf-10g-table-pagination.html
    Edited by: Yannick Ongena on Apr 15, 2013 11:51 PM

Maybe you are looking for

  • Using usb webcam with facetime

    I have a generic USB Webcam 720p connected to a USB port on my Mac Mini (2012 version) running 10.8.2. Tried using webcam on facetime, my HD monitor doesn't have webcam, for the first time. When opening FT the image from webcam displayed in the windo

  • Purchase Req and Goods Receipt

    My client has ECC 6 and EP 7 in the landscape. I am implementing Employee Self Service portal. It looks like standard Purchasing Requisition and Goods Receipts iviews (ESS package) are pointing to SRM. We are not implementing SRM here. Is there any w

  • Problem with a nokia 5310 xpress and a bluetooth

    i have problem with a nokia 5310 xpress and a bluetooth!i can transfer anything from my phone to pc with or without pc suite! but when i want to transfer files from pc to phone i doesen"t work! with pcsuite soethings work but very slow! i want to tra

  • Problem syncing music to slideshow

    Hello, I use iPhoto 6.06. I am trying to set a slideshow to music--specifically, to a playlist I've created in iTunes. However, when I click on the "music" icon at the bottom of the slideshow window, and then click on iTunes, none of my slideshows ap

  • Ovi maps-ovi suite internal error e66

    I have done a hard reset on a nokia e66 with firmware 410... When I first connected to ovi suite the maps module showed me internal error. But it wasn't any server error or try again etc... The steps are the following: 1)  Format memory card 2) Downl