Best way to code structure to control several instruments

Hello

I am a novice but not inexperienced labview programmer. I'm writing a labview code to control a physical optical experiement. This involves writing a GUI which of your interfaces then with a variety of instruments (such as motorized turntables, lock-in amplifiers, power supplies, Renault, etc...) all connected to the computer through various means. All the instruments are delivered with their own labview drivers to complete their most important functions. Essentially, the instruments will operate independently, but occasionally, will be a set of steps involving several instruments (such as move, take a step, move again,...)

My question is what is the best way to structure the top level VI where all GUI controls? I have currently the code structured so that each instrument has an event structure that manages keys and commands for it. Simple events like the movement are dealt with in the cases where structures themselves while queues and occurrences are then used to handle more complicated events in external loops. It is an appropriate way to handle this scenario, or is it that most commonly architecture?

Thank you for the help

You play with fire when using several structures of the event. My preferred method for executing an instrument that has a 'stream' mode (example: a spectrometer where you always see the spectrum), is to provide that it is a clean line, with a dequeue item. The 'element' may have a message part (or State) in the form of an enum or string, as well as some data in the form of a Variant. You want to set a parameter, you could send a cluster containing the enum "Set the parameter" as well as the value of the parameter in the form of a Variant. The default case would be to get a spectrum and update a graph (or send another message to a user interface management loop that updates the chart).

You can open the project template QMH who comes with LabVIEW to see how a line would work, and then you can add multiple queues for different instruments. I keep the new loops in their own SubVIs and reference to the queue in a global functional to clean the main schema.

Here is an example of what your data of the module flow record might look like (the string constant empty considered double quotes is by default to expire the message dequeue)

Tags: NI Software

Similar Questions

  • What is the best way to make a PDF file several Photoshop images, while maintaining editable layers?

    What is the best way to make a PDF file several Photoshop images, while retaining the layers in editable for later use mode? I tried to do in Acrobat, but it does not keep separate layers. I also tried to automate the PDF presentation in Photoshop, but it combines the layers as well. I need to enable layers from photoshop retain their ability to be edited.

    It is not possible at this time, Photoshop is not a page layout program and pdf is hardly a format suitable to hold several files psd layered or editable page layouts.

    Why would you do that anyway?

  • Best way to add numbers or available several pages

    I have a ticket that needs to be numbered. It is small enough to mount 5 on a sheet of 8.5 x 11.

    Each ticket must be numbered.

    I can do a master page and adds all the numbers in this way and then make a pdf.

    What is the best way to get the numbers on tickets that are printing 5 up on a sheet and I can print via a copier?

    There are several ways to do this:

    1. create single page tickets, numbered by car and use institution the Copier feature (if available and access to the)

    2. use the data with the numbered list merge and produce several cliché recording to create a 5 - up document

    3 create a 5 - model up with block of text frames for import of numbering, a numbered list that flows into the document

  • Best way to code page

    I have a flex site and that of the 'State' is a list of links to a bunch of other sites. Each list has a header art, then the list. Here's what I've done so far... but it seems cumbersome. Can I do this in Flash or is it the best way.

    "" < mx:VBox x = "10" y ="155" textAlign = "left" width ="220">

    " < mx:SWFLoader source = ' tour{}" id ="tourArtwork" / >

    < mx:Text >

    < mx:htmlText >

    <![ CDATA ["< p > < b > NBC Studio Tours < /b > < br > < a href ="http://www.nbcuniversalstore.com"> < /a > nbcuniversalstore.com "]

    " < /p > < p > < b > Warner Bros. Studios VIP Tour < /b > < br > < a href ="http://www2.warnerbros.com/vipstudiotour"> casimages.com < /a > < /p > .

    ]]>

    < / mx:htmlText >

    < / mx:Text >

    " < mx:SWFLoader source =" shop{}"id ="shopArtwork" / >

    " < mx:Text height ="162">

    < mx:htmlText >

    <![ CDATA ["< p > < b > NBC Studio Tours < /b > < br > < a href ="http://www.nbcuniversalstore.com"> < /a > nbcuniversalstore.com "]

    " < /p > < p > < b > Burbank Town Center < /b > < br > < a href ="http://www.burbanktowncenter.com"> burbanktowncenter.com < /a > .

    « < /p > < p > < b > Downtown Burbank < /b > < br > < a href = "http://www.downtown-burbank.org" > < /a > downtown - burbank.org »

    « < /p > < p > < b > Downtown Burbank < /b > < br > < a href = "http://www.downtown-burbank.org" > < /a > < /p > downtown - burbank.org »

    ]]>

    < / mx:htmlText >

    < / mx:Text >

    < / mx:VBox >

    Well Yes, there are much better ways:

    private function newWin(url:String):void {
         var urlRequest:URLRequest = new URLRequest(url);
         navigateToURL(urlRequest, "_self");//Or _blank or _top (etc)
    }
    
    http://www.adobe.com/')" />
    
    		   
  • Recommend products OR for my application (controlling several instruments at the same time)

    I'm new to Labview, currently only using the trial version.      There is money in my budget to buy control software, but I need to qualify my needs.

    What I try to do is to control several pieces of equipment to test as a single system, which allows me to perform automated on conventional measures

    and digital two way radios.

    Here is a list of the material I want to control:

    First of all, my controller is a & Rohde Schwarz 3 PSL.   Fully GPIB active and ready.  It is the PC control software will reside on.

    Equipment:

    Spectrum analyser Rohde & Schwarz FSEA 30 with modulation analysis package digital option B7

    FSEA 30 second, same configuration

    R & S AMIQ4 I / modulation generator Q (files of the software residing on the PSL3)

    Generator of analog signals from R & S SMY 02

    Agilent E4431B analog-to-digital signal generator

    Agilent E4406A spectrum analyzer/digital radio test set

    E4418B Agilent RF wattmeter with sensor

    General Dynamics R2670B service monitor

    A typical application will be a test of classical radio on VHF or UHF analog channel.

    The idea is to enter pass and receive frequencies through Labview or any software is best suited for the job, as well as modulation parameters.

    and have the following things occur: assume usage of 150,000 MHz with a FM frequency modulated 1 kHz sounds modulated to the deviation of 2.5 KHz

    in total, with your 127,3 Hz subaudible to a gap of 300 Hz

    Test phase of receiver: send commands to control of instrument of Agilent E4431B signal generator.   Level set to-60 dBm.  Set to 150,000 MHz frequency.  Set

    Audio 1 to 1 KHz and audio tone 2 to 127,3 Hz at a level of 8 pecent of your 1.  SD total do not exceed 2.5 KHz.      Inject the test signal into port RX

    on the radio.

    The value R2670B SINAD function, related to the radio via the audio output port.

    Signal level to ramp down to the SINAD falls to 12 dB.

    Increase the level of the signal to the attenuation of 20dB.   Measure the audio distortion.

    Testing of transmitter: using the attenuators appropriate necessary on the analyzers of spectrum, and/or using a switched network of wiring.

    place radio to transmit using above specifications frequency and modulation.    Analyzers to receive on the frequency designated value

    and measure the transmitter specifications, including nonessential radiation measurement and harmonics.    Measure actual output power

    Via E4418B-power meter.

    I use two monitors to perform multiple tests in a same transmission. One is optimized for spectral purity tests while

    the other analysis of modulation characteristics.    Frequency, duration and RBW are defined according to the needs.

    When you test a digital radio, the signal chain is slightly different.  The AMIQ I / Q modulation generator s I / Q outputs are sent to the

    I / Q inputs on the Agilent generator, the power is on to accept external I / entered Q and the FSEA Spectrum Analyzer (an a)

    the) is passed to a preset that implements all relevant digital parameters so that it can be used to directly evaluate the digital transmissions.

    It is not a very developed in the planning system, but I do not know now whether Labview is everything I need or if I'll need to Teststand or another

    software packages.

    I'll probably want to ask for some advice on how to get this set up, eventually.

    LabVIEW is more than capable of this task. That's what it was designed to do. Use the help > find the instrument Drivers to find and install the drivers that you can use to control and read.

    TestStand generally requires the use of a programming language. It runs the tests that you write and provides functionality built for the production of record and report database then you would need to write these modules yourself with LabVIEW fair and some add on box to tools. For a single test configuration, it is perhaps an exaggeration, but it is interesting to watch as an addition.

  • Best way to learn structured

    Hello

    Starting with a well-organized FM12 unstructured configuration, including table, para and char styles as well as anchored frames that don't have any overlying text, is there a tutorial that you recommend to switch to structured FrameMaker?

    In other words, there is a subset of styles it is possible after a Cape, a subset that are possible after the body of the text, etc.

    Thus, given an environment not structured enough well organized with no substitutions, y at - it a tutorial on moving to a structured environment and construction of ESD?

    See you soon,.

    Sean

    Sean, I see that no one answered and I won't let it stay like that. However, I don't have a great answer for you. I think that most people just get the Guide from the developer of Structure and perhaps some examples of files, then just wasting his time until they get. That said, in your message that you seem to refer specifically to the conversion of unstructured information. On my site, I have a few (very old) files that illustrate the conversion process with a conversion table, maybe they could help some:

    Resources/downloads - West Street Consulting

    My hypothesis is that these files still work, but I haven't looked at them for a long time.

    I think basically, this process is often a trip of one. I know there are books and others, but nothing beats a personal experimentation. Structure is a bit like a Toolbox, rather than a single tool, then it is profitable to learn the different elements of it.

    Russ

  • Best way to control and enforcement multiples (up to 20) deals independently in LV

    Hi all

    I am building an application in BT to control independently and methods of running multiple (up to 20), i.e., it should be able to start and stop one of the processes at a given time. What would be the best way to code for this? On the top of my head would be to use a single notification utility for controlling each process, but I think that maintenance of code can be a handful with this number of reporters being defined. Are there more effective ways to do this?

    Appreciate any help and idea on it. Thanks a bunch!

    This nugget is launching several threads and slap them with Occurences. Convert this example on notifiers and you good to go shouldb.

    I have developed applications with more than 100 background threads using variations on the theme there.

    Ben

  • What is the best way to get several updates fail to install

    I have 32 updates that have failed to install.  How is the best way to go back and get to install them?

    You receive errors related to updates?

    1. Open Windows Update by clicking the Start button, all programs and then click Windows Update.
    2. In the left pane, click view update history.
      http://Windows.Microsoft.com/en-us/Windows-Vista/see-which-Windows-updates-are-installed
    3. Find an update for Windows that has failed to install, and then double-click the update to view more information.
      Updates that have failed to install will display failed under status, next to the name of update.
    4. In the Windows Update dialog box, next to the details of the error, review the error code for the update has failed.
    5. Follow the links in the Windows Update dialog box under more information or help and Support to resolve the problem, then try to reinstall updates by using Windows Update in Control Panel or by mail with the error code and maybe someone may be able to help others.

    Windows update General troubleshooting

    Suggestions:

    How to reset the Windows Update settings?
    http://support.Microsoft.com/kb/971058

    Diagnose and automatically fix common problems with Windows Update
    http://support.Microsoft.com/mats/windows_update/

    Cannot install updates in Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2
    http://support.Microsoft.com/kb/2509997

    Or try to install the updates in a clean boot state, and run Windows Update: http://support.microsoft.com/kb/929135

  • Best way to MouseDrag several objects around a scene.

    So I'm having a little trouble tried to drag the 3 s Box in a scene.

    Originally, I had it in place where everyone was transferred to an x, is translated Z, then assign a DRC. Then I thought that instead of the click of the mouse on the box itself, I'd be at the root. From there, I would look through all the root.getChildren (then) that see if it contained the x, position y.


    So to know who my children root I clicked on I did .setOnDragged of root.getChildren.get (current) to figure out that it was dragged.

    The code itself has worked with the exception of find which box I was.

    The question that I find, is that I only PositionX, getSceneX and getScreenX. SceneX and X produce the same value and ScreenX is useless. I then tried to do event.getX () - root.getLayoutX () contains the function works, but it did not work and would require me to change many things. getLayoutX() a = 0, since I did not indicate the location of the root, only the locations of the box.

    From there on, I was wondering if there was a better way. Then I thought maybe to loop through each element in my root or in an arrayList (which is what I used, but realized the root.getchildren should work like the original) but the problem is he keeps only save one last list, then just shut up and that's it.

    So I want to know, what would be the best way to understand what object am I?

    Initially, I use contains (Swing) but Swing is different, and as we can save mouseEvents to each node, should we not we know now exactly what we we are, while making a loop in each of them? I think it's easier than having to check each contained unique mouse position, especially if I have 10000 points to check?

    Edited by: KonradZuse March 18, 2013 20:05

    KonradZuse wrote:
    Thanks for the help!

    I can now draw a box, so there is no question about it, just that I have several boxes and I need to be able to drag each without knowing the total.

    I have 1000 boxes, or 5, I can't save a mouse to each event

    Why not?

    so I thought I would go, and then I realized after I posted this I could use the function 'Mouse_ENTERED' or 'Mouse_PRESSED' field and then move each individual, but it would still be a loop in each of them and then find who's who.

    I do not see that your example below has a certain meaning.

    I have never seen sphere.addEventHandler (MouseEvent.ANY, new DragShapeHandler()); so thank you for this tip.

    Buy it, you can also do

    DragShapeHandler handler = new DragShapeHandler();
    box.setOnMousePressed(handler);
    box.setOnMouseDragged(handler);
    

    If you prefer the convenience methods. (It is important that convey you the same reference for both).

    >

    It seems that the "DragShapeHandler" will basically get the source node and then move it? If we really do not need to know which.

    OK-ish. It uses event.getSource () to determine the source of the event (i.e., the node on which the event occurred). But you might as well set a field in the DragShapeHandler class with the node that had to be moved:

      class DragShapeHandler implements EventHandler {
    
        private double sceneAnchorX;
        private double sceneAnchorY;
    
        private final Node nodeToMove ;
    
        DragShapeHandler(Node node) {
           this.nodeToMove = node ;
        } 
    
        @Override
        public void handle(MouseEvent event) {
          if (event.getEventType() == MouseEvent.MOUSE_PRESSED) {
            sceneAnchorX = event.getSceneX();
            sceneAnchorY = event.getSceneY();
          } else if (event.getEventType() == MouseEvent.MOUSE_DRAGGED) {
            double x = event.getSceneX();
            double y = event.getSceneY();
            nodeToMove.setTranslateX(node.getTranslateX() + x - sceneAnchorX);
            nodeToMove.setTranslateY(node.getTranslateY() + y - sceneAnchorY);
            sceneAnchorX = x;
            sceneAnchorY = y;
          }
        }
      }
    

    and then:

    ...
    box.addEventHandler(MouseEvent.ANY, new DragShapeHandler(box));
    ...
    sphere.addEventHandler(MouseEvent.ANY, new DragShapeHandler(sphere));
    

    I slightly prefer the getSource(), I think that, like the box.addEventHandler (..., DragShapeHandler (box)) new; is a little unnatural. Without doubt, however, this version is more robust (it's more type-safe because you are forced to specify a node to drag, while the source of the event could theoretically be any object).

    >

    That's a lot of sense that you're making a new node and just dragging it as such. so I can creater add a picture of the area between them and I just needed to understand the point of click, to get the box then he would know to do hmm...

    Should really "to display the box" as stated above. Just register a Manager with any node you want to be able to drag and the Manager he will drag.

  • best way to flash to the structure of the site... classes? XML? layer actions?

    I'm doing a website.  The Web site will have several components:

    • a preloader, which will host while content is loading.
    • an external browser, full intro slideshow swf that will work until it is clicked on a menu item and will work again when the user clicks a button 'House' in the main menu.
    • a main menu, which will be accordion style and using some fades of tweenlite/greensock etc..
    • several external swf that is loaded based on the user's selection in the main menu.  This will be the "pages" which have different slideshows, text etc..


    I learned how to do all of these things since the timeline and with a layer of actionscripts.  Should I be coding this in a document and through xml class?  Is it possible, with the knowledge that I have to do all these components on the line time and an actions layer, to make it more efficient and less load time if I do via a document class / xml?  Can anyone recommend the best way to organize a flash like this site?  I read that the sites should be done through classes with xml and coding not only on the first frame of the timeline; However, I'm not sure what kind of site, it seems to be.  This is a site for a small architecture firm, which will be river photos of the projects, descriptions, etc.

    Any ideas?

    Thank you.

    You use classes to organize your code - and so you can reuse code more easily and you can be as granular as you want - or you can paste all code into a single document class... that would really be better than putting in the timeline... Finally unless you write your code in an external editor like FlashDevelop, which is loads better than writing code in Flash.  You use XML if you need to read some data... whatever it is and want / need to be editable outside of Flash. But you could also just use a database and PHP. It's really a matter of what you are comfortable with. Using external coding and classes are all simply better in every way with a script code... so I'd say just take the leap and learn to do it "right".

  • Not sure about the best way to structure my app.

    Hello

    I'm not sure of the best way to structure my app.

    I have a main menu that links to 3 submenus, each a link to a number of pages. Initially when I clicked on a menu button, that he would open a submenu instantly and then clicking a button, the page open instantly. And return to the previous menus was also very fast.

    But at some point that he started getting really slow. I click on a button in the main menu and he thinks for a while before moving on to the pick-me-up submenu is too slow. I'm not sure why and I lose a lot of time trying different ways to do it.

    So what I want to know, as far as efficiency goes, should I create the main menu and submenus 3 at the start of my application, keep these same objects active and just pass pointers to them around like settings and pop on and off the screen of the battery when required, or should I just create them as new items whenever they are needed?

    Any advice on this would be greatly appreciated.

    If each submenu returns to the main menu, just use the screen for the navigation stack. Don't forward mainMenu for the submenus; to return, just pop the submenu and the main menu will be back at the top. At the time of mainMenu wants to open a submenu, just push without fun first.

    Have you thought to check for memory leaks? There is a discussion of 3 parts of this by Kamen:

    How to find that leak memory (part i)

    How to find this memory leak (Part Two)

    How to find this part of memory ((troisieme leak)

  • What is the best way to move the data from the app and Server data structures?

    Hi guys,.

    I developed my application locally with Apex 4.2 and Oracle 11 g XE on Windows 7. Not far away, it is time to move the application to a server Oracle Apex. I guess that Exim is the way to go app. But what about the APA tables and data (tables/as 'customer' and 'account' created specially for the application)? I've been using a modeling tool, so I can run a DDL script to create the database server data structures. What is the best way to move the application data on the server? Is it possible to move the structures and data in a single process?

    Thank you
    Kim

    There is probably another way to get here, but in Developer SQL, on the navigation tree, expand objects until your table, right-click, and then click EXPORT... you will see all the options. It is a tedious process and it sucks IMO, but yes, it works. This is zero especially because 1) it's a table at a time, 2) If your data model is robust and has constraints and sequences and triggers, then you will need to disable all for the insert and we hope you can re-enable constraints, etc. without hitch (good luck, unless you have only a handful of tables)

    I prefer to use the oracle EXP command-line to export an entire schema, then the server target, I use IMP to import the schema. In this way, it is almost true. This makes the dirty life if you develop multiple applications in a single schema, and I felt pain - however - it is much easier to drop the tables and other objects is to create them! (thus, even if the process of EXP/IMP moved more than you wanted to "move".. blow everything you don't want on the target after the fact...)

    You can use method datapump oracle too.

    If not, what can be done, IF you have access to both servers of your instance of SQL developer (or if you can tnsping both already from the command line, you can use SQL * MORE), is to run a script that will identify the objects of your applications apex (usually by the prefix for the names of objects, such as % EBA_PROJ_ etc.) and do all the manual work for you. I've created a script that does just that so that I can pass data from dev to prod servers on a dblink. It is difficult because of the order that must be executed to disable constraints and then turn it back on and of course, more complicated if don't always precede you ALL your "objects demand '... (tables, views, triggers, sequences, functions, procs, indexes, etc.)

  • Best way to control the primary databases, standby, including alert logs, etc..

    Hi, guys, I've finally commissioning of the new environment for the new redhat linux and everything works great so far (primary/secondary).

    Now I would like to setup of its surveillance analysis scripts automatically so I can let it run by itself.

    What is the best way?

    I talked to another friend of dba outside the company and he told me that his shop would not use any cron jobs to monitor, they use the grid control.

    We have no control of grid. I would like to see what fits best here? should we configure the grid control?

    And as for now, I would appreciate the ideas of all the cron scripts.

    Thank you

    I have the simple:

    ####################################################################
    # script to check alert log on PRIMARY
    #
    ####################################################################
    #
    #
    # Set the directory for alert log
    #
    cd /u01/app/oracle/diag/rdbms/primary/PRIMARY/trace
    #
    #
    #  run tail command
    #
    tail -500 alert_PRIMARY.log | more
    

    Adjust the - 500 on the tail according to your needs.

    Or you can get fancy:

    #!/bin/bash
    
    function outputMenu {
    cat > /dev/stdout <
    

    Best regards

    mseberg

  • Best way to manage documents several pages?

    Hello

    I'm creating a multiple page on top of TLF editor and I would like to hear some opinions on the best way to process documents multi-pade.

    I'm basically looking at two options:

    (1.) A unique RichEditableText and several ContainerControllers.

    2.) RichEditableText several.

    TKS.

    Sorry, I gave you the wrong title to search. See "new and updated examples, http://blogs.adobe.com/tlf/2009/12/new-and-updated-tlf-samples.html.

    Apologies,

    -robin

  • best way to control a large number of controls and indicators

    IM building a façade with 46 orders and lights, all of type boolean.

    the logic is control > send order series > receive > indicator set. I consider part of my façade (with 2 sets of control and indicator) and my block diagram.

    I have to be able to control programmatically and through the front panel individually the status and indicators, or all at once (for example to reset the both). This should be done from the tab they are and another.

    thought property nodes but still I would have 46 + 46 of them. same for local variables.

    y at - there I way to refer to a control/indicator by its label (string) and change its value?

    wouldn't be easier just to create two Boolean tables which maintain their Boolean value?

    Please advise me on what options I have. I'm new to labview.

    Thanks in advance.


Maybe you are looking for

  • MacBook air volume keeps going up on its own when im watching something, or listening to music

    Hello My macbook air 13-inch running OS X El Capitan 10.11.4 version seems to have problems of volume. Whenever I'm listening to music or watching something volume continues to go up. I turn down, but it will just continue to mount it again. I let hi

  • HP ENVY x 360-15-u110dx: reset the wireless adapter

    I have a new HP ENVY x 360-15-u110dx and it is not connected to the internet. I have to constantly reset the wireless adapter. What should I do to fix this?

  • Vertix and Pixel Shader Model is?

    "I want to play this game called BULLY: SCHOLARSHIP EDITION for PC and when I downloaded the game software it says I need 32-bit display and vertex and pixel shader model 3.0 support." There was a previous thread on this, but I was wondering if you c

  • Lines on screen flicker

    My brother just re-formatted my laptop. Since then, if my computer is closed (all on), and then I opened it I get vertical flashing green on the screen - I then reboot the computer and it goes. Its weird cause they always disappear once I restart the

  • access password

    I forgot my administrator password, how can I access it?