Best practice for code structure to control multiple devices in a 2 stage-sequ​ence

I have a question about code architecture and getting multiple devices controlled and sychronized for one experiment. This is an "architecture"-type inquiry, so I am hoping for some suggestions on how to proceed.
I run an experiment in which I control 2 NI PCI-6733. I am soon to add a Tektronix AFG 3022B, and have long been putting off an opportunity to rewrite my labview code from the ground up. I inherited it from an earlier research, and while functional, I would like to make it easier to modify and break up into subVi's and such. Link to the current program (labview 8.6.1) is here if you would like to see the code that is currently used, and the subvi's are in a zip file. The current version of the experiment consists of just one stage, all the writing of the data to the PCI cards is saved for the end. I need to change this in my new setup though. 
The new experiment consists of 2 stages. The first will run (looping an output array to the PCI cards) until it hears a "true" from another computer (connected via TCP). At that point, it should switch to stage 2 and run a sequence (usually 10^5 timeunits in length, where the time unit is 0.1 ms) that outputs to the two PCI cards, the AFG 3022B, and with the flexibility to add more devices in the future.
Most appreciated would be structural advice. How to arrange the VIs, if it's good to use a "master" VI that would control the two subVi's of stage 1 and 2, etc...  Feel free to ask for more details if it would help clarify my question. Thanks!
Solved!
Go to Solution.

Programs of this type usually use a state machine of some sort.  You can find many tutorials on LabVIEW state machines in these forums or the LAVA forums.  If you are doing a rewrite, I would also recommend you consider LabVIEW classes.  They help modularize your code and make the subparts more reuseable.  You may end up with less to maintain, as a result.
<shamelessPlug>You may also want to consider TestStand.  It was designed to run sequences of tests, so may make your life easier.  It could also be gross overkill.</shamelessPlug>
Let us know if you run into issues with state machines or classes.
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • Best practice for setting up iCloud with multiple devices using a single AppleID

    Hi there
    Me and my wife have an iPhone each, and are looking at getting both of us using iCloud. The problem is that we only use one Apple ID for our music library.
    Is getting a separate Apple ID necessary for each device on iCloud, or can multiple devices have seperate settings/photos/music, etc.?

    Using different Apple ID for iCloud is not necessary, but in most cases it is recommended.
    You can however choose to use separate Apple IDs for iCloud and continue to use the same Apple ID for iTunes, thereby being able to share all your purchases of music, apps and books.

  • What is the best practice for using the Calendar control with the Dispatcher?

    It seems as if the Dispatcher is restricting access to the Query Builder (/bin/querybuilder.json) as a best practice regarding security.  However, the Calendar relies on this endpoint to build the events for the calendar.  On Author / Publish this works fine but once we place the Dispatcher in front, the Calendar no longer works.  We've noticed the same behavior on the Geometrixx site.
    What is the best practice for using the Calendar control with Dispatcher?
    Thanks in advance.
    Scott

    Not sure what exactly you are asking but Muse handles the different orientations nicely without having to do anything.
    Example: http://www.cariboowoodshop.com/wood-shop.html

  • Best practices for folder structure in SOA Project

    Actually, In my project, I have more than 10 BPEL process and several DBAdapters and some HumanTasks. For each BPEL process, JDeveloper creates .bpel, .componentType, wsdl files. For DBAdapters JDeveloper creates lot of files, and same for HumanTasks as well.
    By default Jdeveloper puts all these files in root directory of the Project. It looks messy having 100's of files in root directory.
    How can I organize all these files?
    What are the best practices for folder structure in SOA Project ?
    Thanks

    Yes Yatan. I did noticed that Polling service WSDL disabled in EM . But I want to try this approach beacause I want to move all database related stuff to one composite. I have another composite with 3 BPEL Processes. One BPEL queries external webservice and save the response in DB. One BPEL just fires the first Process(Query) and respond to caller with an unique id. I have Another BPEL which keeps polling on database for 5 sec(I'm using PICK Activity), if there is any new record in database it will retrun to caller. If no new records in database, returns empty to the caller after 5 sec.
    If I put all these in one composite, having lot of files in root directory, the composite really looks very messy.
    As you said, I want to have 2 composites. First Compoiste will have 3 BPEL processes, and 2nd Composite will have DB Polling and DB Save. I will have another project for MDS to store XSDs.
    So because I can't have Polling service as exposed service, I have to keep Polling service in the same Composite where the BPEL is. Now again it goes back to Big and messy project.
    Is there any way I can separate all DB related including polling in a separate Composite ?
    Thanks
    --Sreeny                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Best Practice for the Service Distribution on multiple servers

    Hi,
    Could you please suggest as per the best practice for the above.
    Requirements : we will use all features in share point ( Powerpivot, Search, Reporting Service, BCS, Excel, Workflow Manager, App Management etc)
    Capacity : We have  12 Servers excluding SQL server.
    Please do not just refer any URL, Suggest as per the requirements.
    Thanks 
    srabon

    How about a link to the MS guidance!
    http://go.microsoft.com/fwlink/p/?LinkId=286957

  • Best Practice for re-usable forms in multiple Countries

    Dear experts,
    i'm seeking for suggestions about the best design which could help saving time on development for multiple forms i should produce for a multi-national client.
    In more details, the client is asking to create a number of forms in the SD area (Order advice, delivery note/Bill of Lading, Payment slips and in particular Billing outputs) for different Countries in North and South America.
    I'm striving to avoid creating separate forms for separate Countries, as ideally i'd want to create just one form per type (i.e. one form for Billing, one form for Delivery note...) and re-use the same forms for all Countries, where specific data should differ from one Country to the other.
    We've been working on similar topics in the past, adding some logic behind some texts which we've made "parametric", meaning different standard texts are printed in the same box depending on some organizational values (i.e. sales organization or company code), but we're looking for something "smarter", where having different pricing structures in different Ctries, for instance, might still work if those Conutries use the same billing form
    Is there any best practice you'd like to share with me with regards to this? Is there any new functionality SAP has delivered recently which helps in this direction?
    Many thanks to all who will want to reply to my weird question.
    Regards,
    Fabio

    Hi Scott.
    Storing two columns of spatial data is fine in SQL Server. And you are correct that there is no built-in reprojection in SQL Server, most folks do that as part of data loading. There was talk of porting parts of ogr2ogr to SQLCLR, but I don't think anyone
    did that.
    Cheers, Bob

  • Best practice for TM on AEBS with multiple macs

    Like many others, I just plugged a WD 1TB drive (mac ready) into the AEBS and started TM.
    But in reading here and elsewhere I'm realizing that there might be a better way.
    I'd like suggestions for best practices on how to setup the external drive.
    The environment is...
    ...G4 Mac mini, 10.4 PPC - this is the system I'm moving from, it has all iPhotos, iTunes, and it being left untouched until I get all the TM/backup setup and tested. But it will got to 10.5 eventually.
    ...Intel iMac, 10.5 soon to be 10.6
    ...Intel Mac mini, 10.5, soon to be 10.6
    ...AEBS with (mac ready) WD-1TB usb attached drive.
    What I'd like to do...
    ...use the one WD-1TB drive for all three backups, AND keep a copy of system and iLife DVD's to recover from.
    From what I'm reading, I should have a separate partition for each mac's TM to backup to.
    The first question is partitioning... disk utility see's my iMac's internal HD&DVD, but doesn't see the WD-1TB on the AEBS. (when TM is activity it will appear in disk utility, but when TM ends, it drops off the disk utility list).
    I guess I have to connect it via USB to the iMac for the partitioning, right?
    I've also read the benefits of keeping a copy of the install DVD's on the external drive... but this raises more questions.
    How do I get an image of the install DVD onto the 1TB drive?
    How do I do that? (install?, ISO image?, straight copy?)
    And what about the 2nd disk (for iLife?) - same partition, a different one, ISO image, straight copy?
    Can I actually boot from the external WD 1TB while it it connected to the AEBS, or do I have to temporarily plug it in via USB?
    And if I have to boot the O/S from USB, once I load it and it wants to restore from the TM, do I leave it USB or move it to the AEBS? (I've heard the way the backups are created differ local vs network)>
    I know its a lot of question but here are the two objectives...
    1. Use TM in typical fashion, to recover the occasion deleted file.
    2. The ability to perform a bare-metal point-in-time recovery (not always to the very last backup, but sometimes to a day or two before.)

    dmcnish wrote:
    From what I'm reading, I should have a separate partition for each mac's TM to backup to.
    Hi, and welcome to the forums.
    You can, but you really only need a separate partition for the Mac that's backing-up directly. It won't have a Sparse Bundle, but a Backups.backupdb folder, and if you ever have or want to delete all of them (new Mac, certain hardware repairs, etc.) you can just erase the partition.
    The first question is partitioning... disk utility see's my iMac's internal HD&DVD, but doesn't see the WD-1TB on the AEBS. (when TM is activity it will appear in disk utility, but when TM ends, it drops off the disk utility list).
    I guess I have to connect it via USB to the iMac for the partitioning, right?
    Right.
    I've also read the benefits of keeping a copy of the install DVD's on the external drive... but this raises more questions.
    Can I actually boot from the external WD 1TB while it it connected to the AEBS, or do I have to temporarily plug it in via USB?
    I don't think so. I've never tried it, but even if it works, it will be very slow. So connect via F/W or USB (the PPC Mac probably can't boot from USB, but the Intels can).
    And if I have to boot the O/S from USB, once I load it and it wants to restore from the TM, do I leave it USB or move it to the AEBS? (I've heard the way the backups are created differ local vs network)
    That's actually two different questions. To do a full system restore, you don't load OSX at all, but you do need the Leopard Install disc, because it has the installer. See item #14 of the Frequently Asked Questions *User Tip* at the top of this forum.
    If for some reason you do install OSX, then you can either "transfer" (as part of the installation) or "Migrate" (after restarting, via the Migration Assistant app in your Applications/Utilities folder) from your TM backups. See the *Erase, Install, & Migrate* section of the Glenn Carter - Restoring Your Entire System / Time Machine *User Tip* at the top of this forum.
    In either case, If the backups were done wirelessly, you must transfer/migrate wirelessly (although you can speed it up by connecting via Ethernet).

  • Best practice for limiting network management to few devices

    Hello ,
    I have set up a very basic security implementation that is no way realistic, but I just want to experiment and learn...
    In my 1801 router that answers DHCP requests on separate wired and wireless vlans, I have bound static IP addresses to the MAC addresses of my laptop wireless and wired interfaces.
    Then I set up an ACL to permit inbound traffic from these IPs only for the vty lines.
    Obviously this is easily defeated by statically assigning these same IPs to any device on the network, so I was thinking about a better way to limit management of the router to a few devices.
    What is the best practice in professional environments?
    Thanks.

    Obviously this is easily defeated by statically assigning these same IPs to any device on the network, so I was thinking about a better way to limit management of the router to a few devices.
    TACACs or RADIUS with robust password policy and regular interval to change the passwords (30 to 45 days).
    Read this and go to the "Composing hard-to-guess passwords" section.

  • Best practice for sharing LOV's over multiple Application Definitions?

    We want to define/generate (complex) LOV's in 1 place and use them in multiple sub-applications (different application definition files).
    What is the best practive to accomplish this?
    Frank

    Frank,
    Here is what you do:
    - Generate the LOV the "normal" way using your first app def file
    - In all other app def files, you create a "dummy" LOV group by the same name with the same items, so you can associate items with the LOV and specifiy return values
    - For each "dummy" LOV group uncheck the checkboxes "Generate Pages", "Generate Page Definitions" and "Generate Controller Group". (only visible in expert mode)
    - Make sure you first generate the first app def file before you run the [ages generated by other app def files.
    Steven Davelaar,
    JHeadstart Team.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Best practices for sharing iPhoto libraries across multiple Macs

    I have a pair of iMacs running 10.6.x. and iPhoto 11 connected via Ethernet to an Airport Extreme. I am looking for a way to share my iPhoto library between the two Macs.
    I found an Apple Support note on the topic (http://support.apple.com/kb/HT1198) which states that a disk image is a supported location for a shared iPhoto library (with limitations acceptable to me) and it strikes me that this would be a way of hosting a shared iPhoto library onto a NAS device.
    Am I missing a simpler solution or, more importantly, am I missing any blindingly obvious caveats? I'd love to hear from anybody who has tried this (successfully or otherwise) or anybody who has a better idea. I haven't bought a NAS device yet, so I'm open to alternative suggestions.
    Specific requirements:
    Members of my family use either one of a pair of iMacs.
    The only user who edits the iPhoto library is me and I only need read/write access from one machine.
    iPhoto library access limited to one user at a time is acceptable and practical in my case.

    Easiest:
    If the other users only get to see the Library then just use iPhoto Sharing.
    Enable sharing in the iPhoto Preferences on the Host machine, then go to the other macgine and in the same location enable 'Look for Shared Libraries'
    Other forms of sharing will give the users read/write access to the Library.
    A strong warning: If you're trying to edit the Library (that is, make albums, move photos around, keyword, make books or slideshows etc.) or edit individual photos in it via Wireless be very careful. Dropouts are a common fact of wireless networking, and should one occur while the app is writing to the database then your Library will be damaged. Simply, I would not do this with my Libraries. 
    Regards
    TD

  • Best practices for referencing external video across multiple computers

    I have made a .swf that references an external .f4v .  The swf plays fine on my own computer, but does not play on a colleagues computer, or another computer which we tested.  The file is not for upload to web , it is for local playback.  I assume this is a file path issue, but I have tried many different things including specifying a path and then recreating the same directory structure on the other computer.  What am I missing?  The f4v file can playback on the colleagues computer (I did install ffdshow , although another tested mp4 also plays back fine) but not the .swf.  Please , any help would be greatly appreciated!
    Thank you!

    This could be a security context issue, is it possible on your own machine you have allowed access to that file or folder containing the F4V file, maybe using the global-security-settings in flash player? Have a read of the following just in case:
    http://www.adobe.com/products/flashplayer/articles/localcontent/

  • Best Practices for directory structure Grid (standalone server) + DB

    I want to install Oracle Database and Oracle Grid Infrastructure for a standalone server for ASM and Oracle Restart. I understand that they need to be installed in different folders with different access rights. But how it is better for making?
    In documentation "Oracle® Database Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64" anything specific it is not written. Here exposures from the documentation with examples. Such examples only confuse me.
    for oracle
    # mkdir-p/u01/app/
    # chown-R oracle:oinstall/u01/app/
    # chmod-R 775/u01/app/
    for grid
    $ ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
    $ export ORACLE_HOME
    ORACLE_HOME =/u01/app/11.2.0/grid; export ORACLE_HOME
    I made so - db_1 for Grid db_2 for DB:
    /u01/app/oracle/product/11.2.0/db_1 - for Grid
    /u01/app/oracle/product/11.2.0/db_2 - for DB
    But I have doubts that so will be correct. I can not understand what permissions on what folder to give.
    Questions:
    1) What to create structure of folders for installation DB + Grid?
    2) What permissions at users should be in this structure?

    HI!
    Check documentation again!!!

  • Best Practice for Storing Spatial Data in Multiple Projections?

    From what I've been able to determine MS SQL can't do reprojections is that correct? Assuming it is, the state of Washington requires that our GIS data be managed in Washington Stat Plane South
    but for our web mapping sites need the data in Web Mercator.  Is it OK then to have two geometry columns in a spatial enabled table, say a county table, one in WSPS and the other in WM? 
    I’m coming at this from a 30 year background in GIS using ESRI software. 
    Usually we would store the shape / geometry in one projection and project it to other on the fly when needed. 
    That way there is only one definitive source.  I don’t see a way to do this in MS SQL.

    Hi Scott.
    Storing two columns of spatial data is fine in SQL Server. And you are correct that there is no built-in reprojection in SQL Server, most folks do that as part of data loading. There was talk of porting parts of ogr2ogr to SQLCLR, but I don't think anyone
    did that.
    Cheers, Bob

  • Best practice for version control B2B, ESB and BPEL

    Hello,
    we are setting up a new system using B2B, ESB and BPEL. The development team is more experienced working with PL/SQL, Oracle Workflow and we are worried that Jdeveloper generates changes to the source files during development and that we might have problems with the version control.
    Is there any best practice for setting up version control for these systems? Do we need to take anything in particular into consideration when setting up the projects?
    We are using Serena Dimensions 9.1 for version control with the add-on in Jdeveloper.
    Thanks in advance!

    I believe JDeveloper has a plugin for Dimensions.
    I havent used it but to get it, go to tools (It may be help I don't have JDeveloper on this machine to confirm) check for updates.
    If you select the thrid party check box - next, you will see an entry for dimentions.
    Configure the connection and develop as you would any other project.
    cheers
    James

  • Best practice for test reports location -multiple installers

    Hi,
    What is recommended best practice for saving test reports with multiple installers of different applications:
    For example, if I have 3 different teststand installers: Installer1, Installer2 and Installer3 and I want to save test reports of each installer at:
    1. C:\Reports\Installer1\TestReportfilename
    2. C:\Reports\Installer2\TestReportfilename
    3. C:\Reports\Installer3\TestReportfilename
    How could I do this programatically as to have all reports at the proper folder when teststand installers are deployed to a test PC?
    Thanks,
    Frank

    There's no recommended best practice for what you're suggesting. The example here shows how to programmatically modify a report path. And, this Knowledge Base describes how you can change a report's filepath based on test results.
    -Mike 
    Applications Engineer
    National Instuments

Maybe you are looking for

  • How to use another account on icloud

    I forgot the password for my current iCloud ID  and I want to change the account

  • Lightroom mobile performance and "previous" button issues

    I am considering subscribing to Lightroom mobile for iPad so I decided to give it a trial run with 2000+ photos sync-ed (iPad 3, Nikon D7000 raw files). The performance is awful! Browsing through the images is fairly decent. Flagging also does a good

  • DPMBackup -db not working.

    Morning, Last week I upgraded to DPM 2012 R2. All went well; no problem; apart from taking  hours to run consistency checks on the replicas but I was expecting that. Today when I tried to back up the database I was informed that I had to upgrade to S

  • E-mailing Revel albums to non-Revel account recipients

    The FAQ and Pattie F's answer to another user's question about sharing albums state that to share an album with a non-Revel account holder, all that is required is to send the album link to the user and the user will then be able to click on the link

  • How to check sent email messages?

    Hi all. I set up my imap account on the phone and it works great. Only problem is, how do I check my sent messages? I thought it might be in the 'Mailboxes' area, but the only thing there is inbox.. Anyone have any ideas? Thanks!