Best design idea for parallel DAQ (via GPIB), PID control and watchdog system

Hello!
I am a starter programmer in LabView, I already understand the basic ideas, and design patterns, like producer/consumer, events state machine, functional global variables, and so on, so the basics...
I started a project a few weeks ago, and first I wrote and tested all of the necessary subvi-s for my project, like the ones initializing my GPIB devices (a Keithley mux and a dvm), controlling/reading out the measured voltage/resistancy values from them, subvi for my Static Analog Output card (I have to drive 7 analog output channels, 4 has to be PID controlled regarding to some of the measured values from the GPIB devices), and another subvi for the analogue card, sending TTL watchdog signals out to my experiment in every 2 seconds.
Any idea is welcomed about suggesting the best design pattern for my project.
The main features of my program would be:
After starting the user interface the program starts with a start-up state, initializes the DAQmx channels and the GPIB devices. The program starts to read out different values from the GPIB devices, including 4 temperature values in every 3 seconds.
In the same loop (?), using PID control, the program sets the DC voltage values of 4 channels (3 to heating wires, 1 to a Peltier-heat pump) on the Static Waveform Analogue output card, the remaining 3 values are constants.
I have to send digital TTL watchdog signal to some relays from the same output card, changing its state in every 2 seconds (not the same rate as the GPIB values are read out).
When the 4 temperatures and the power values regarding to the heating wires are equilibrated after a few hours, the program goes into another state, and signals to the user, that the measurement can be started. During a measurement, I write out all of the measured values to a TDMS file, and there is also some basic calculations "on the fly", like a moving average.
After the measurement done, the user can swap samples, and the program goes into the above state, waiting for equilibration . and so on...
Do you think I should use a Producer/Consumer pattern with events? Or someone would recommend me a better design idea?
Thanks very much!
ps.: I read out lots of values from the Keithleys, so I put them in a cluster. I made a small test vi (attached without the GPIB comm subvi-s), just to test the GPIB comm. So this is the recent state of my project. (all other subvi-s tested and ready to use as I wrote above, like the DAQmx output part)
Attachments:
GUI_Calorimeter_control_image_v2.vi ‏284 KB

Okey
I think it is a better approach if I work first, and after I ask
I go with small steps. For first, now I just want to make a DAQ analog output loop, and parallel a watchdog loop sending out TTL in every 2 seconds.
The main loop in my project will iterate with approx. 10-15 seconds.
I want to check in my watchdog loop, if my main loop hangs up (in that case the PID control stops, but the danger is if the output voltages stay on).
After some readings, I have decided to use a functional global variable.
I have attached the vi, can someone give me advice, what would be the good solution for this purpose?
(I know it is a bit silly what I messed up with the shift registers in the bottom loop, it was some experimenting).
Thanks in advance!
Attachments:
watchdog_funcglobvariable.vi ‏12 KB
Global 1_stop.vi ‏4 KB
analog_output+Watchdog.vi ‏57 KB

Similar Messages

  • What is the best design pattern for this problem?

    No code to go with the question. I am trying to settle on the best design pattern for the problem before I code. I want to use an Object Oriented approach.
    I have included a basic UML diagram of what I was thinking so far. 
    Stated simply, I have three devices; Module, Wired Modem, and Wireless Modem.
    In the Device Under Test parent class, I have put the attributes that are variable from device to device, but common to all of them.
    In the child classes, I have put the attributes that are not variable to each copy of that device. The attributes are common across device types. I was planning to use controls in the class definition that have the data set to a default value, since it doesn't change for each serial number of that device. For example, a Module will always have a Device Type ID of 1. These values are used to query the database.
    An example query would be [DHR].[GetDeviceActiveVersions] '39288', 1, '4/26/2012 12:18:52 PM'
    The '1' is the device type ID, the 39288 is the serial number, and the return would be "A000" or "S002", for example.
    So, I would be pulling the Serial Number and Device Type ID from the Device Under Test parent and child, and passing them to the Database using a SQL string stored in the control of the Active Versions child class of Database.
    The overall idea is that the same data is used to send multiple queries to the database and receiving back various data that I then evaluate for pass of fail, and for date order.
    What I can't settle on is the approach. Should it be a Strategy pattern, A Chain of Command pattern, a Decorator pattern or something else. 
    Ideas?

    elrathia wrote:
    Hi Ben,
    I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here. 
    Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
    You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
    The example uses a Class of "Numeric"  and a sibling class "Text" and the both implement an Add method.
    It is dirt simple and Cory did a decent job of explaining it.
    It just be the motivation you are looking for.
    have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Design ideas for retrieving Data for Read Only

    Hi All,
    Currently I am in the process of evaluating different design ideas for the search functionality of my application. I am looking for a best option for retrieving the data by executing some complex sql queries with huge query criteria and showing the single or multiple records to the user. But the data is read only. This may involve pagination if the number of records exceeds the page limit.
    There are various options to implement this like JDBC and JDO or using some persistance framework to retrieve the data objects. Please suggest me about a good option for this.
    Thanks in Advance
    Durga

    Currently I am in the process of evaluating different
    design ideas for the search functionality of my
    application. I am looking for a best option for
    retrieving the data by executing some complex sql
    queries with huge query criteria and showing the
    single or multiple records to the user. But the data
    is read only. This may involve pagination if the
    number of records exceeds the page limit. This can typically be handled with a Fast Reader, though this is a coding ideom rather than a true design pattern.
    http://java.sun.com/blueprints/patterns/FastLaneReader.html
    Please suggest me about a
    good option for this.Apache Lucene is worth considering,
    http://lucene.apache.org/java/docs/

  • What is the best design pattern for top-down ws development..?

    Hi,
    What is the best design pattern for top-down development+ wsdl2service....?

    elrathia wrote:
    Hi Ben,
    I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here. 
    Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
    You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
    The example uses a Class of "Numeric"  and a sibling class "Text" and the both implement an Add method.
    It is dirt simple and Cory did a decent job of explaining it.
    It just be the motivation you are looking for.
    have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Best current ideas for wireless AIO printer for MBP? Prefer not HP or Canon(my MX 850's bad match)*

    Would appreciate best current ideas for wireless AIO printer to pair with MBP (bought late 2011). Prefer not HP or Canon.  Got my MX 850 to print -- with lots of work -- but would not scan.  Tried to fix that, now won't print or scan. Time to move forward, leaving Canon along with Dell notebook in recycle bin.  Thanks for any suggestions.  

    http://reviews.cnet.com/best-all-in-one-printers/
    http://reviews.cnet.com/printers/
    http://www.ask.com/web?l=sem&ifr=1&qsrc=999&q=aio%20printer%20reviews&siteid=142 18&o=14218&ar_uid=C85FE0FC-84E7-4C45-B86F-62C1459D5298&click_id=B989F809-3F45-45 C0-95E3-6121CB798ED7
    You might also want to try Macworld for their reviews.

  • Ideas for integrate two landscape that individually has one XI system

    does anyone have the Ideas for integrate two landscape that individually has one XI system?
    our scenario is: in one customer side we have a xi as integration approach, and the other one also has one xi, we need to integrate them two landscape together
    and use one of the xi server as a central access points.
    my concern is :  is it a good idea to reach this goal ? since this is a
    task like;   app in landscape 1 ---> xi1 -
    > xi2 ---> app in landscape 2
    are there any other solutions ?
    thanks a lot !!

    Hi
    I guess its a XI-XI Scenario.You need to integrate two XI's
    For Reference
    XI to XI communication
    idoc to file scenario
    Thanks

  • I am trying to download a trial version of Design Premium for Mac.  I download adobe assistant and t

    I am trying to download a trial version of Design Premium for Mac.
    I download adobe assistant and then nothing happens.
    Your site says to download assistant and then the software should download automatically. 
    Nothing is going on.
    Please help

    Can you try following the instructions in this document? Download, install trials

  • Please help me with my electrical engineering homework : temperature control and watering system for greenhouse using labview and arduino

    temperature control and watering system for greenhouse using labview and arduino
    spesification :
    1. max temp : 28 celcius (when temperature is more than 28 celcius, fan ON)
    2. min temp : 20 celcius (when temperature is under 20 celcius, heater ON)
    3. watering system : aquaponic (grow plant and fish in separate tank but connect each other). Plant roots help filter water for fish. Fish poop for plants fertilizer. So I need a pump to distribute water.
    Please help me create VI file simulation.. I'm sorry I'm not fluent in English. May God bless you all
    Attachments:
    YOOOSHH.vi ‏88 KB

    Duplicate thread.   Please keep the discussion in that thread where you already have a response. It is also the more appropriate thread for your question.
    Lynn

  • Can you help me with Page Layout and/or Design ideas for a software manual?

    Greetings,
    I am a new InDesign user, and am converting a software manual that I created in MS Word into InDesign. It will be converted to a pdf to view online. I have the basics (3 master pages, page numbers, running headers, 2column pages with text boxes on the left and screenshots on the right), but I want to make it look prettier. Could you please give me some ideas on page layout and/or design to make it look better or more creative?
    A few things that I am considering: borders around screenshots, a watermark, a logo next to the page numbers, different size/type of fonts, etc.
    I am open to any suggestions to make this look better. However, please understand that I am new to InDesign. With that being said, please tell me a few steps when you mention your tips. Thank you!

    Take a look at a few websites on Cannons of Page Construction.
    I think the best idea for you is to look at a few software manuals and take tips from how they accomplished the layouts.
    I'm not saying to copy them - but rather see what works and doesn't work, what worked for them might not necessarily work for you - research some layouts.
    Fonts/type/sizes etc. are pretty much ambigious without context - is this a software manual for kids (soft cuddly big fonts easy to read), technical (small, tight spacing etc), Adult friendly (smooth, crisp clear, well spaced), elderly (large elegant fonts).
    It all really depends on your demographic audience.
    Being new to InDesign I suggest you take up Sandy Cohens Quickstart Visual Guide.
    I think you should look at Michael Murphys Book on Styles
    And you should definitely get your printer (the guys bulk printing) the booklet for you on board from the start to work out optimal sizes to suit their printing presses and workflow etc. And to ensure that you are setup correctly in page sizes, margins, safe type areas, colour profiles and a few other things that your printers prepress can help you with.

  • Best Available IDE for JSF based applications

    I m working on JEE project. Now i am supposed to implement my web modules in JSF, so i just want to ask, What is best IDE available for JSF to use?
    I have used JBuilder (It Lacks Design View for GUI).
    I also have used NetBeans (same problem).
    and at last,
    Sun Creator 2 does not support JBOSS.
    So please help me out in this regard, so that i could start with optimal IDE for JSF based development.
    Thanks in advance. [asif]
    (I wish microsoft to make an IDE for JEE.)

    have a look at myEclipse.
    btw, there are several threads about this concern. use search.

  • Best design structure for 4710's

    We are implementing 4710's in our core network..
    what could be the best design structure from a simplicity point
    one interface vlan for for vips---connected front end to the core..and backend for servers (routed mode)
    should you have more than one interface vlan for servers and or clients?
    at which point would u need multi context.......besides an Admin context
    should you put a management interface on each context?

    We are implementing 4710's in our core network..
    --what could be the best design structure from a simplicity point
    Design would vary based on specific requirements. To connect it to a specific layer on the network (core/agg) you would have to check the traffic flow to decide what suits you best.
    In terms of ACE design, if source IP visibility is not a requirement, One-arm mode with Source NAT provides the ability for non load balanced traffic to bypass the ACE. If it is a requirement you can use PBRs but that complicates things a little because you have to now manage the routers for changes on the ACE. With routed mode, the design is simple and servers point to the ACE as their default gateway. Need to weigh the pros and cons of each of the options based on the specific requirements.
    --one interface vlan for for vips---connected front end to the core..and backend for servers (routed mode)
    Yes - for routed mode that would be the way to do it. In this case, in addition to load balancing, the ACE routes non-loadbalanced traffic to/from the servers.
    should you have more than one interface vlan for servers and or clients?
    - Depends in your subnets. If you have separate subnets for your web/app/db servers then it is a good idea to have different subnets. Also, you may want to think about separate contexts if you want complete isolation between the layers.
    --at which point would u need multi context.......besides an Admin context
    As far as possible, try to keep the Admin context only for administration. Make a separate context(s) for load balancing and manage the resources to it.
    --should you put a management interface on each context?
    Yes - that would give you the ability to have different users manage only their contexts.
    Hope that helps .

  • Need some design idea for a multi- thread  concurrent system

    I am totally new to this area. Hope ppl can give me some suggestion for the following project.
    The project is using socket to deal with huge concurrent data. Server will send me more than 50K (maybe more) XML strings in a short time.
    I need parse strings and save them in the data structure.
    What I have done is using ExecutorService to deal with this problem. Unfortunately, it's already too slow even I don't save data into data structure.(data structure will cause synchronization problem, and make system even worse).
    I was required to develop this software in a single machine and windows based OS.
    Should I only use single thread to do this project? or some other strategy?
    Can anybody give me some suggestion.
    Thanks so much.

    Peter. Thanks again.
    Could you help me to take a look at this code. Appreciate that.
    ThreadPool class:
    protected ExecutorService threadPool = Executors.newFixedThreadPool(5);
       incoming = new Socket("127.0.0.1", port1);
       outcoming = new Socket("127.0.0.1", port2);
       out = new PrintWriter(outcoming.getOutputStream(), true);
       isr = new InputStreamReader(incoming.getInputStream());
       is = new BufferedReader(isr);
    while (true) {
         String str;
         str = is.readLine();
         if (str == null) {
                 cleanup();
                 closeSocket();
                 printout();
            } else {        
                             this.threadPool.submit(new WorkerRunnable(str,          
                                                             "Thread Pooled Server"));
           }WorkerRunnable class:
    public void run() {
    try {
                SAXBuilder builder = new SAXBuilder();
                InputSource is = new InputSource( );
                is.setCharacterStream(new StringReader(xmlString));
                org.jdom.Document doc = builder.build(is);
                org.jdom.Element root = doc.getRootElement();
                org.jdom.Element order = root.getChild("Changes");
                List orderList = order.getChildren("OrderChange");
                if (orderList.size() != 0) {
                               org.jdom.Element orderchange = (org.jdom.Element) orderList.get(0);
                               String price = orderchange.getAttribute("orderPrice").getValue();
                               String quantity = bookchange.getAttribute("orderQuantity").getValue();
                               String symbol = bookchange.getAttribute("orderName").getValue();
                                } catch(Exception e)
                              {}

  • Best wireless security for mixed Mac OS X, Windows XP and Windows 2000

    While I am posting, I may as well ask this question too.
    It seems that WPA/WPA2 are only supported by Windows XP or later.
    But I also think I read somewhere that there are different flavours of WEP for Macs and Windows.
    For a home network based on AE, what is the best form of wireless security to handle 2 Macs (iMac and MacBook Pro), a Windows XP and a Windows 2000 notebook (all running wireless G).
    Thanks

    Thanks for the suggestion Michael - unfortunately software changes to the Win2k machine are not an option for me - it has been completely locked down by my corporate IT dept.
    So I think I am stuck with WEP. From scouring the Apple tech discussion posts it looks like a five letter ASCII or thirteen letter ASCII password in WEP are my only options, but I am not sure which of these is most appropriate for all 4 machines.

  • Best way to share publc folders via internet w mac and pc

    Hope someone can help me. New mac user w/ Macbook pro and osx 4.6. Dont' want to pay for .mac but do want to share large files from my public folder with my kid (ibook) and a close friend(pc w/ xp). want them to be able to copy files as well as leave files for me in the drop box.
    I'm connecting to the net using comcast cable internet with a d-link wireless modem and I don't know if this affects the info I should be plugging in. Can I file share from the coffee house or just from home? Wireless seem to work great but can't figure out the best option for file sharing. Have read felix and apple help docs and tried to connect with daughter using apple events, personal file share, etc but asp addresses are not recognized. Maybe I am not using the correct router numbers. Really don't grok ports and TCP too much although I read that TCP is the option on osx 4 and later. I hesitate to turn my firewall all the way off. would it be safer to use stealth mode or would this make it more difficult to connect with trusted friends?
    Isn't there some great shareware that can automate this for me? Or can some one walk me through what I should do? Would greatly appreciate your help.

    I really like using OS X's built in file sharing tool, this can be enabled in the System Preferences. Here you can learn much more about it and its features.
    http://docs.info.apple.com/article.html?artnum=106461
    File Sharing allows you to copy items from one computer to another, or to use files stored on another computer.
    Source: Apple Support Page "Mac OS X: About File Sharing"
    Hope this Helps
    -Internet Wiz™

  • How many licenses for Windows 7 via both Boot Camp and either VMware Fusion or Parallels on the same MacBook?

    This concerns a white MacBook running OS X 10.5.8 Leopard.
    If I install Windows 7 on my MacBook with Boot Camp, and then use either VMware Fusion or Parallels to access that Boot Camp partition, will I need to buy two Windows licenses from Microsoft?
    I had not anticipated this, but when calling VMware and Parallels to check out the tech support services of the two companies, the person at VMware mentioned that I would need two licenses.  When I called Parallels, I then asked the person at that company whether two Windows licenses would be needed.  That person told me that only one license would be necessary.
    I then called Microsoft.  The representative there told me that my question could not be answered by Microsoft because that company does not provide support for users installing Windows on Apple computers.
    After that, I called Apple.  The Apple representative was not familiar with this type of issue.  She mentioned the possibility that the VMware Fusion and Parallels products might be different, and that that might be why using the former would involve two licenses and using the latter would involve only one license.
    Has anyone had experience with installing Windows 7 via Boot Camp, and then accessing that Windows 7 installation from VMware Fusion or Parallels?  If so, did you have to buy two Windows licenses?

    One license. You may have to re-register Windows online when you start it up in Parallels because Windows sees that it is now running on new hardware (virtualized) and thinks it has been installed on a new computer. If the online re-registration does not work, just call the registration number and go through the automated registration process. Once re-registered then use Windows from Parallels. If you are also installing MS Office in Windows you will need to go through the same process again for registering Office.
    The process is automated, simple, and free. You have made the process more complicated than it is by calling Apple, Parallels, and Microsoft when there is an automated MS registration number to call.

Maybe you are looking for

  • TS1702 Trouble in App Store on iPad 2 and 3GS iPhone using IOS 6.0

    There's no search icon on the bottom bar.  No apps listed under Feature & Charts.  Anyone else with this problem?  I can see Updates on iPad and iPhone, and the a list of Apps populates when I go into Purchased.  But nothing populates under Feature a

  • TS1424 how do i speak to someone regarding charges on my account

    I have charges on my itunes account that i have no idea where and what they are.  How do i speak to someone regarding this, i can not find a phone # to call about this.

  • Need help for Calculate Percentage of Shares

    Hi Experts, I am Calculating Percentage of Shares using Down my Rule is Sub Calculate() Dim PDOwn Dim ACList Dim AC ACList=HS.Entity.List("AssociateJV","[BASE]") For each AC in ACList PDOwn = HS.Node.DOwn("S#ACTUAL.Y#2010.P#March.E#AssociateJV."& AC)

  • Copy control invoice - order - KDMAT will not be there

    Hi Experts! we create customer orders (in this case credit notes) with reference to an invoice. the problem is that the field vbap-kdmat is empty in the copy control and so it could not be filled into the new order. in VTAF we use the copy requiremen

  • Why can't I sync music to my iPhone that I didn't buy off of iTunes?

    I've been having this problem since the release of iOS 7. iTunes will not let me sync songs to my iPhone 4s that I had bought from other sites, or have the CD to. It only syncs (through USB) the songs that I had previously bought off of iTunes. to me