Application Structure Advice - preplanning

Hi all -
Thought I would get some advice from you before starting up a new project.  Not really how to do it, just which structure to use...
Originally I took over a project at my work that is very unresponsive and the way its coded it cannot accurately do what we are going to want it to do down the road.  I've tried to tell myself it wasn't needed, but I'm going to have to just recode the whole thing.
After just going to the labview intermediate classes, i'm a bit confused as to which scheme would work out better for the application...producer consumer w/events or producer consumer w/data...
Basically the program is a final test that is completely automated on one side.  So the user interacts by inputting serial numbers, models etc. that change the procedure of the test cycle.  Communications are at a slow 1200 baud over serial and the test per unit takes about 2-3 days.  Slow speed monitoring is required on few indicators.  Thats about it on that end.  Also though there is an entire manual test capability, that tries to give real time results back about what's going on with our test unit.  Currently it allows for us to change settings on the test hardware programatically...again through the serial port.
Later on down the road we will need to start using DAQ equipment to enhance the testing.  At present there is about a 7-8 second delay from when you hit a control and something happens.  Granted the communications are extremely slow, but still c'mon now thats just rediculus lol.
Any recommendations on the kind of structure that should be used to control this?  Currently its being implemented as a huge state machine with 8 or so states.
LV7.1, LV8.5

Something I believe in is that the hardest part of any new job is figuring out how to think about it. So I like to start by getting as much as possible on paper before I start coding. To begin with, you need to know what the desired User Interface is like. How do the operators want to use it? What will be the desired workflow for the tool? What are the response time requirements.
At the same time consider the system from the standpoint of the physical process that you're interacting with. What are the operational constraints? What are your users going to want to do in the future? What are the inputs and outputs? What is the instrumentation like? What sorts of errors can occur and how fast do you need to be able to respond to them? How do you recover from errors?
Finally, what data are you going to be collecting? How fast? What are you going to do with it? Is the customer expecting a report of some kind? What is the data's lifespan? How will results be archived and managed?
The reasons for asking these questions up front are two-fold: First, the answers to these questions (and a bunch more) will provide the nucleus of a document that will tell your customer exactly what they will get and you exactly what you need to do. Second, it should be obvious that there is no "best" universal system architecture. Each possibility has its own advantages and disadvantages. Knowing the answers to these questions will help you understand your problem and the best architecture for that particular problem. The biggest messes I have ever had to deal with (and in 20 years I've encountered some real architectural train wrecks) resulted from people deciding ahead of time what the system architecture was going to be and then trying to force-fit an application into a structure that didn't suit it.
Most important you need to sit down and have a heart-to-heart talk with your boss to set their expectations. If you do this right you may not develop any code at all for a couple weeks and if your boss is the type that "wants to see results" you need to educate them on what the results will look like. Sometimes its code, sometimes its documentation - but in either case it will be moving the project forward. And if your boss should acknowledge that "theoretically" working in this way is best, but then goes on to say, "...we don't have time to do it the right way..." Save yourself some time and start polishing up your resume now... it won't be long before you'll be needing it.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • 'The argument ' 0.000 V' cannot be interpreted as a number' when assigning application structure, line 805, contents "20140611NB F000000004500098898102E202USD 000..."

    Hi All,
    Data loading of 2LIS_02_SCL and 2LIS_02_ITM is getting failed by throwing an error
    'The argument ' 0.000 V' cannot be interpreted as a number' when assigning
    application structure, line 805, contents "20140611NB
    F000000004500098898102E202USD 000..."
    Here Data is not even loading to PSA so I cannot edit the data in PSA.The process chain is getting failed at Load step it self.
    I have even checked the ECC for the particular PO mentioned In the error message but i could not found any issue in ECC

    Hi There,
    Does anyone know the root cause of it? We are facing the same issue.
    Please keep in mind, IT`s NOT PC FILE DATASOURCE. It`s standard 2LIS_02_ITM extractor.
    Thanks in advance.

  • Page flow inheritance in Workshop 10 application structure?

    This question will probably expose my relative ignorance in this forum but I don't know who else to ask. I'm trying to use page flow inheritance to extend an abstract base controller class to controllers for several projects (which should all behave the same way but have different jsps, templates, and configuration parameters) in an application. I can't figure out how/where to build the base class and where it needs to be in order for the project controllers to have access to it. I tried building the class in its own project and exporting a jar, or including the module in an enterprise app - although I've been able to build and deploy some of these attempts, everything I've tried gives runtime errors that seem to be due to classes/files not being found because the application structure isn't workable. If anyone has examples of how to do this, or suggestions for other ways to do this besides inheritance, I would be very happy to hear them.

    This is why you break your application into task flow, this allows you to have a hierarchy of taskflows and one icon in a diagram that can represent a complete flow.
    Learn more about taskflows here:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html#a2

  • Top level application structure with parallel data acquisition

    Hey all LabVIEW-forum members!
    I have some experience programing  LabVIEW, but mostly concerning smaller for the simplest form of data acquisition. Now I need to develop a larger application that might be continuously run for several weeksin a row and for that reason I woiuld like to make sure the application structure is stable! I turn to you in hope of some input regarding the most suitable approach to my problem or some pointing in a good direction.
    -The project involves making hardware communication with a few different hardware interfaces, such as GPIB and NI’s DAQ-card (analog and digital reads/writes on PCI-6221).
    -Save acquired data to disk.
    -The communication and data save are based on condition of elapsed time (for example there could be a need to make parallel analog measurements med DAQ-card every 5th minute but GPIB-measurements every 30th second).
    -At the mean time I would have to regularly the status of the test object and update the user interface. (However, while in test the user won’t be allowed to interact with the application other than to monitor the UI or pause the test).
    The project isn’t really time critical (in case I need to make one type of data-acquisition while another one is already initiated, they can be carried out in sequence).
    I’ve started with programmatically control the user interface by using the “Top Level Application Using Events”-template and produced code that will let the user set up a new test or load an existing test. All the data concerning the status and configuration of the test I’ve saved in two clusters that can be passed along to different events.
     I’ve reserved one subdiagram in the event structure for the actual execution of the test. It is the structure of this subdiagram I am a bit confused about…
    Could I use another while-loop/event-structure inside this subdiagram and use user-registered events for the different data acquisition? Or is there some type of state-machine that is better suited to monitor time elapsed and can make a transition to a suitable state when it’s time to make any of the hardware measurement required? It would be nice to avoid using polling loops but maybe that is best way to go?
    I’ve checked the “Continuously Generate Occurrences.vi”-example and that might be a way to go? What seems to be good with this approach is that I could let the different parallel hardware acquisitions actually be parallel, right?
    I am really confused right now, hope someone has some helpful inputs!
    Regards
    Oscar

    This post here can be proved as a great starting point for your application.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Advice about application structure before starting

    Hi all,
    I am so sorry for this longest post, but I have to explain all thing. Sorry again.
    I have been studying with Labview for a year by myself without taking any professional support. When I get stuck in preparing my VIs, I always post here and you answered me with great patient. Thank you for all. Now, I am about to start a new VI and before starting it I thought it would be good to consult you on that.
    The goal of this VI could be classified under 4 main topics: Acquisition, control, analysis, and recording the data. I am studying on a test system. There are two types of data to be acquired from the test system: pressure and temperature. For this purpose I have 1xNI 9203 (analog input-current) & 2xN9214(analog input-temperature). The test system is desired to be under control by use of a DC compressor with a frequency converter. To control that frequency converter I have to use NI 9263 (analog output- voltage). All hardware system is installed on NI 9188 cDAQ.
    Before preparition of this system, I have coded a VI that acquire, analyse, and record the data-there is no use of NI 9263 (attached here). In this VI, I used a basic structure and it works fine. The only problem of this VI is delaying when the stop button is pressed. Anyway, now I want to prepare a new one. The difference of the new VI from the old one is that it controls the system while acquiring, analysing, and recording processes. And this control is supported by acquired pressure and temperature values. This will be my first big project and I need your suggesttions on structure of this VI. Do I start to build it with state machine architect or another ones? To prevent the data loss what kind of precautions could be taken?
    Thank you all in advance.
    Egemen
    Attachments:
    MAIN PROGRAM_v0.vi ‏147 KB

    Egemen,
    First, Great! It is very important to plan and design your program before starting to write it.
    Next, you do not need to apologize for providing the information necessary for someone to respond to your request. We would very much prefer a post of several paragraphs which contains the relevant information to a brief post which only elicits questions for more details.
    Now to your questions.
    1. Look at the style guides.  Your block diagram was several screens high and wide.  It is recommended to keep the diagram to one screen.  Paticularly in programs which will get large and copmlicated like yours, this readability constraint will be very worthwhile.  Effective use of subVIs is one way to help minimize screen bloat.
    2.  Look at the style guides. The use of local variables to pass data from one loop to a parallel loop is not recommended.  It can lead to race conditions, force execution of the loops in the UI thread, and is slower than wires.
    3. Read the help on Event Structures. Only one event structure per VI is recommended. Although the way you have used them will probably work, it consumes hectares of block diagram space and may be vulnerable to problems when you or another developer decides to make a few changes.
    4. Because there is no data dependency, it is possible (although not very likely) that the main loop could start running before the clear history property nodes execute.
    5. How do your temperature charts know which waveform to display?
    6. You stop on DAQ errors but do not check for file errors. You may want to consider more robust error handling.
    Now, some general comments on program structure. You list 4 topics: Acquisition, control, analysis, and recording the data.  This may also be a good way to think about program structure. The structure probably needs one more topic: User Interface.  The program you posted essentially has 2 topics: User Inputs and everything else.  Think about the timing requirements for each topic.  User interface - needs to respond to user inputs in about 100 ms or the user begins to feel as though the program is not responding. Similarly, displays do not need to update more than a few times per second. Acquisition - Software timed.  Default value = 1.67 Hz. Output not specified, but since you are talking pressure and temperature, it is probably slow also. Once you start doing closed loop control, it may become more important to keep the timing constant. Record data - same timing as acquisition.  However, writing 8-64 channels of data two two files twice per second may not be optimum. And what happens when the OS finds that the files are fragmented and must allocate new sapce for the file and takes more than half a second to do so?  Analysis - Your subVIs were not included so I have no idea what they do, how fast they may be and what effects they may have on the overall operation.
    What I suggest is that you study the Producer/Consumer Design Patterns and State Machines.  I think you may end up with 3 or 4 parallel loops. One will be the User Interface loop with the only event structure. Another will handle all the data acquisition (possibly including outputs when controlling your test system). This will be a state machine which initializes the DAQ, Reads and Writes, and shuts it down when finished. The File writes may be in a separate loop. If file I/O is put into a parallel loop, it should be a state machine which opens, writes, and closes the files and retains the file path or reference for repeated writes. The control and analysis (another state machine) may be in a separate loop or could run in the timeout case of the event structure in the UI loop.  Which is best depends on details of your system.
    With the amount of data you are moving around and the number of property nodes you need to use, learn to manipulate the front panel from a subVI. Search the Forum for posts on use of control references and on updating the main front panel from a subVI. There are some good methods posted.
    Lynn

  • ADF Application Structure

    Hi Gurus,
    I have to develop an application in ADF, but the issue is there are very frequent changes in the application. How would i will structure the application. Is is possible to make some kind of library like jar or some kind of else. I want my application should be modularize. If i change in one module i don't want to deploy the whole application agian. I need just i replace only file and there you go. that's all. Like currently in forms application i just change only in one fmx file and it take effects all. I want my application should have different module, in which module a change and replace the file not want to deploy whole application for a single change like button caption.
    Thanks,

    Hi,
    I have to develop an application in ADF, but the issue is there are very frequent changes in the application. How would i will structure the application. Is is possible to make some kind of library like jar or some kind of else. I want my application should be modularize. If i change in one module i don't want to deploy the whole application agian.
    Best is to modularize on the Java EE application level (pillar architecture) in that the frequent changing parts are deployed as a separate Java EE deployment to the rest. This way the re-deployment is minimal and the rest of the application is not impacted. In a laer version of JDeveloper you will be able to use remote task flows, giving you more fine grain control over what needs to be re-deployed
    Frank

  • Need some help with web application structure

    I'm trying to develop a web app, scalability and flexibility are very important to me.
    I'm pretty lost right now but I am a quick learner. Basically this is what I need.
    I want a web app, but I want to structure it to be able to run using multiple client types. I want to be able to access the business logic using a CLI interface (for cron jobs), as well as HTML over HTTP, XML-RPC over HTTP, and WAP/WML. Does anyone have any advice on how to set this up in a clean, structured way? I'm having a very hard time finding information on the internet.
    By the way I am also looking for ongoing tutoring which I am willing to pay for, so I can get help when I have questions like this.

    Wow, those are some requirements. You have a lot of work ahead of you.
    I think what you will have to do is take a layered approach. Find the lowest-common-denominator (which sounds like it may be XML in this case) and have your servlets return that. Then you will have to implement various frontend- / pre-processors that are capable of taking the XML output from the servlets and reformatting it as either HTML, XML-RPC, JSON, or whatever.
    Good luck.

  • Large Application Structure

    Hi all,
    I am thinking about the structure of a large application.  I have built 5 independent VIs (each from independent LV Projects); 4 which gain the necessary inputs from the user (each has While Loop with Event Structure) and do their own processing to devise a large set of input data and parameters for a main processing VI.  The main processing VI can be slow to function.
    I was considering the following structure:
    A main UI VI which calls each of the 4 UI VIs in succession using an invoke node or similar via the VI subpanels.  I have never used a VI subpanel.
    Passed to each of the 4 UI VIs is a large cluster which each contributes to.
    The large cluster is passed to the main processing VI (which has independent While Loop) via a Queue?
     Your thoughts, ideas and examples would be greatly appreciated.
    Battler.

    You could have all VI's integrated in the main VI by putting it in a state-machine and have the UI's of the different VI be accesable via a tab control.
    My personal favourite in this case is to use the subpanel when the configuration items have no direct relation and to use a single VI with tab control when they do.
    Text below is just in case you don't know what a state-machine is.
    State-machine basic explanation.
    E.g. an application has 3 states:
    Init (do all initialisation and auto-transition to next state "main"),
    Main (do all normal application stuff, e.g. event structure for UI handling, transition to state "Clean-up" on app stop event),
    Clean-up (close all references and delete temporary files). 
    Message Edited by andre.buurman@carya on 04-02-2010 03:41 PM
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Structure advice required

    As a newbie to LabVIEW programming , I need some help on the structure of my application as I can't get the programme to work in the sequence I'd like. I seem to have trouble understanding how the programme's sequence should be controlled.
    Sequence of operation:
    1. Operator presses NEW button
    2. Dialog appears prompting for the filename to save the Chart image to.
    3. User enters the file name and clicks OK on the dialogue.
    4. The VI then starts to read an analogue value and plots it on a strip chart, 1 record every 10 seconds (might be for up to 24 hours).
    5, Then VI now wait fro the user to press the END button.
    6. The END button is pressed and the chart's image is saved to a JPEG file.
    7. The chart if cleared.
    8. VI now returns to the start and waits for the NEW button to be pressed.
    Any help with this will be much appreciated.
    Thanks,
    Harry

    See the attached VIs to get a grip.
    - Partha
    LabVIEW - Wires that catch bugs!
    Attachments:
    Event-based State Machine Architecture.vi ‏30 KB
    File Name.vi ‏16 KB

  • Webdypro application structure

    can anybody explain me structur eof an webdypro project.As in books there shud be one interface controller, one component controller and can have custom controller. but in webdynpro project i am having two options for interface controller one is inside the component and other is outside the component just as at same level of models and application. so what is difference among these two.and secondly can any body explain use of used components and used models

    Hi
    The only parts of a Web Dynpro Component that are visible to the outside world, are the interface controller and the interface view(s).
    -- All Web Dynpro components have an Interface Controller.
    -- There is a one to one relationship between a Window and an Interface View.
    -- If the component has no views, then it will have no Windows, which in turn, means that it will not implement an interface view. Such components have no visual interface and are known as “faceless”components.
    --Within a Web Dynpro component, all controllers are independent programs; however, they all play a cooperative role. No controller can function in isolation from its parent component.
    -- Notice that Web Dynpro Models stand outside the Component. Models are reusable across multiple components.
    --A Web Dynpro Component can declare the use of another Web Dynpro Component. A specific component usage is then created and the parent component accesses the functionality of the child component via its component interface controller.
    <b>Custom Controllers</b>
    Custom controllers are the active parts of a Web Dynpro component that do not need any direct interaction with the user. Such controllers therefore have no visual interface.When a Web Dynpro component is created, a special custom controller is created called the Component Controller. It is this controller that drives the functionality of the entire component.All custom controllers are instantiated as singletons with respect to their parent component.Custom controllers are instantiated automatically by the Web Dynpro Framework and the instantiation
    order is undefined! Therefore, the coding in a custom controller should make no assumptions about the existence of any other custom controller.
    Regards
    Chaitanya.A

  • Opinion on application structure

    What is your opinion on this:
    If I have these 3 objects:
    AgentMasterServer (a.k.a. AMS)
    AgentSlaveServer (a.k.a. ASS)
    AgentClient (a.k.a. AC)
    I am debating between these two methodologies:
    Method 1
    AMS acts as the mediator between this suite of objects and the MySQL database. So numerous ASS and numerous AC contact the AMS when they do any database interaction. (which could be something like a few queries or updates to the database every few seconds per ASS)
    PROS:
    Streamline coding and reduce connections to the database to one (in AMS). Allow the control of synchronizing the database access in AMS code rather than depending on the database to do it.
    Simpler one time database setup (no need to worry about creating a database that allows table or row locking)
    CONS:
    As the number of ASS and AC grow the more congested the AMS will get. It is a single point of failure (as far as my application is concerned) It requires more dependency on the database to control synchronous access. More coding in the ASS and AC to handle database access (Also the username, password, database would need to be known by ASS and AC)
    Method 2
    AMS, ASS, and AC all have ability to access the database and do their respective work on their own.
    PROS:
    Reduces the amount of work that the AMS has to do on behalf of the ASS or AC as far as database interaction goes. Possibly more efficient as the ASS and AC could be far away from the AMS and don't need to send all requests thru it to get to the database since they can access it themselves.
    CONS:
    More code required in the objects to handle database access. Database needs to be able to row or table locking. All the code is dependent on the access to the database (which is bad incase of failure)

    Model View Controller separation would vote for 1, I believe.
    Clients should just display results, not interact directly with databases. That's a middle tier function.
    I'd be surprised if your AMS got so many requests that it couldn't keep up. If it did, you'd have a chance to cluster and load balance with design 1. No way to increase throughput with 2 except to add another synchronized data source.
    I vote for number 1. - MOD

  • Implementing a serial code method to your application, any advice?

    What would be a free and less complicated way to implement a serial code function to a Mac application to allow trials and shareware? And no, I'm not going over to the Mac App store!

    I haven't come across annotations for the digital graphs, but that won't really help anyway. What I need is a way to group, for example, 8 1-bit samples into an 8-bit word. Annotations could create labels, but I'd still get transitions for each bit. I would prefer that the collapsed view show the 8-bit words and the expanded view show that plus the actual bit transitions. I'm looking for something like the SPI example in this link but of course the data in this case is implicitly clocked so I don't need to show a clock as well.
    I managed to hack up the example as shown here:
    I don't like this because I had to create and interpret several "states" in each sample and fix those samples at the same value to create labeled field in the collapsed waveform. It's ugly and it has the "+" to expand it. I can cancel if the user clicks the plus, but the plus is still there. There is also no way to color in the transitions to match the background of each state.
    Hopefully that makes sense and someone has a solution.

  • How to move ahead with the flex/php application structure

    Hi,
    Its been a week since I strated learning Flex. I am a regular php web develeper.  Since starting the flex learning I have got one thing there is no concept of "pages" in flex like in a regular php web site..there is "States".
    Now I have  this project requireing a login and then as per login user role different screens.
    Lets say three loging roles 1) teacher 2)Student 3) Admin
    Screens for each role will be diffrent as each have diffrent dashboard feature. I am confused with the structure i have decided is correct or not. Please review or suggest how to accomplish this.
    The main.mxml will have login form.
    it will have three states teacher, student, admin. and then these three will have sub states for particular roles features.
    While going to one book I read a  mxml file has atleast 1 state so can the structure be like this. (Is this possible or not)
    main.mxml will have login form
    three mxmxl files for teacher student admin and each will have statets for their respective features.
    Please reply. I am trying to find out by reading the documentation properly. But your guidance will speed things up and help me  understand things quickly.
    Regards
    Siddharth

    ultimately you want to be aiming to use a MVC structure
    but this is a good tutorial to get started.
    The later videos work through a login/logged in states example
    http://www.adobe.com/devnet/flex/videotraining.html

  • General Design Structure  Advice

    I'm looking for a general strategy for my current project.
    I have a Module class with several sub classes. These modules
    are connected to each other with a Connection class. And I need to
    dynamically create and destroy these connections. For now, each
    parent module contains an array of all it's child modules. Each
    instance of the Connection class contains an array of the 2 modules
    it is connecting.
    Is this the best way of going about this? or should I be
    creating a global list of all the connections and all the
    modules?

    The nice thing about this upgrade is that we are moving from a system that has less storage to a system with more storage.
    This database isn't very large, and all the files on the entire system are under 200GB in total size. The data takes probably near 60GB, while the backup space is somewhere in the 80-90GB ballpark.
    My main goal with this disk configuration is to try and achieve the highest reliability possible to prevent future failures.
    Instead of trying to micro-manage the storage I thought an area for the FRA and the rest for the data on different disks and controllers would be a good approach because it keeps space available and reduces the possibility of volume space pressure.
    If you need anything else please let me know.
    Thanks!

  • Tree structure of portal application in NWDS

    Hi all,
    Im new to portal applications and I did not under stand the tree structure that appears after we start portal application in ep perspective in NWDS. Especially the PORTAL-INF and src.code in the tree structure .If any body has any relevant information or document about it please send me.

    portal applications are same as the Web applications developed in Java, JSP ....
    PORTAL-INF is same as the WEB-INF in normal web application structure.
    in Web application we create .war file whereas here we create as .par file.
    in web application we have web.xml inside WEB-INF folder where as here we have portalapp.xml.
    src.core and src.api is used as the source code folder.
    You can check this in "Java Build path" if u go to the project properties.
    Hope this give u a small idea on portal files structure.
    cheers.
    Chinmaya
    Reward points for hellpful answers.

Maybe you are looking for

  • Restore/recover from cold user-managed backup.

    i shutdown db,(db is in no-archivelog mode), copy the dir having *.ctl, *.log & *.dbf files, what would be steps to recover in case, my idea is restore all files in original dir and alter database open resetlogs should do the work, if that did'n work

  • Why are my alerts not working?

    Why are my alerts not working?  Sometimes the alerts work and other times I have to manually retrieve messages.

  • Command line interface to Crystal?   Batch job to refresh report data?

    Hi All. I have some users who do certain work and then want to print an updated report.  However they only have the report viewer.  As they work at night, they can't ask me to refresh the report. Is there a facility to schedule jobs like this in Crys

  • Weird Safari (v8.0.2) Search Issue

    I kept having some bizarre search results return, and I just noticed when I type something into the Safari omnibar, it's trying to search on the register.co.uk. My default search engine is set to Google.  However, those results seem to be down below.

  • How to display a .jpg in a JAR file

    I wrote a programe"demo" to display a "001.jpg " and I made a demo.jar file D:\0816>jar -tf demo.jar META-INF/ 001.jpg Demo.class META-INF/MANIFEST.MF I notice that 001.jpg is in the the jar file but the demo.class can not display it. what can I do?