Recipe Management Using State Machines and DAQ Assistants

I am writing LabVIEW code to control a conversion process for up to 4 devices on one apparatus.
The operator will select from these 4 devices which ones will go through a conversion process. Therefore - they can select some or all of the devices to go through the process.  The process is the same for all 4 devices. The difference between the 4 are the digital outputs used for the conversion process.
Clearly a state machine is applicable. However, I would like to "reuse" the process conversion code of the state machine by creating a separate recipe for each device and merely change the digital outputs (their physical location) for the device under conversion. Presently I have DAQ Assistants controlling digital ouputs for the conversion of one device. Is it possible to "reuse" the code by creating a recipe or a lookup table to reassign the DAQ Assistants to their proper physical location (the digital output lines) for the device under conversion?
I could - copy and paste the code, go into the process and reassign every DAQ Assistant to the correct physical channel of each digital output for the other 3 devices. I was curious if there was a more efficient way.
I see documentation online for recipes; however they are dated 2006. I thought there may be some updated examples.
Using:
LabVIEW 2011
cDAQ-9188 chassis

Hi MgDAQ,
DAQ Assistant is a quick way to start acquiring data, however it's not the most efficient.
Everything that DAQ Assistant does can be acompished with basic DAQ functions on the
Measurement I/O -> NI-DAQmx pallete. For example, you can use DAQmx-Create Channel.vi and
a Channel Constant to select the channel from which you want to acquire data.
To get started with using the DAQmx functions you can browse through Hardware I/O examples in the Example Finder.
Open up a new LabVIEW VI and then go to Help -> Find Examples -> Hardware Input and Output [folder] -> DAQmx -> Digital Measurements
Now, as you probably know, copying and pasting code is inefficient and it's not a good programming practice. So what I would do is create the code for your conversion process and then simply change the channel constant to read the digital output you need.
Mikhail
RF Toolkits, Product Support Engineer
National Instruments

Similar Messages

  • I have a new macbook pro and want to transfer my Mail autofill from my old mac. Never used Time Machine or Migration Assistant -- looks complicated. Any easy way to do this?

    I have a new macbook pro and want to transfer my Mail autofill from my old mac. Never used Time Machine or Migration Assistant -- looks complicated. Any easy way to do this?

    caitlinfromcambridge wrote:
    Thanks -- I would like to try this. I do not know how to reach hard drive from old mac to new. Can you help me with this?
    There are two ways - you can boot your old Mac in Target Mode (reboot your Mac, and as soon as you hear the startup chime hold down the T key on the keyboard until you see the yellow/orange Firewire logo on screen).  You can then use a FireWire cable to connect your new mac to your old one.  The old Mac hard drive will appear on your new Mac as if it is an external hard drive.
    Details on Target Disk Mode:  http://support.apple.com/kb/ht1661
    If you don't have a firewire cable but you do have a home network (i.e. both computers can access the Internet at the same time), you can share the hard drive on your old Mac and then connect to it on your new Mac.
    Good article on sharing your hard drive:  http://support.apple.com/kb/HT1549
    Finally, if the above doesn't thrill you, you can hook an external drive to your old Mac, copy the mail folder over to it, then connect the external drive to your new Mac and copy it over.  It's two steps, but if you don't have a firewire cable and aren't comfortable with sharing over a network it will work just as well - you just have to wait for the mail folder to copy twice instead of once.
    If you get stuck post back!

  • State Machine and producer consumer design patterns

    Hi!
    In my application I am using state machine(for top level VI) and producer consumer(for subVIs) design patterns throught out.
    If there is no activity on the front panel for 1min then the ideal state is invoked. Following are the situation of the ideal state:
    1. It checks for any hardware present on the network . If no hardware is found on the network within 1 min then the application and LabVIEW exits.
    2. While the ideal state checks for the hardware, and user clicks on any front panel button then it should exit the ideal state. The control
    should be in the respective button state.
    I am able to achive the point#1 mentioned above but could not get the point #2 to work. I am including the snap shot of
    the state machine(default case) and prouducer consumer(deafualt state).
    Each screen has the concept of the ideal state. The only additional step in the subVIs is that when the ideal state is reached and the time has expired then it will close the subVIfront panel.It will go to the exit state of the Main(top level) VI. Thus closing the application and quitting LabVIEW.
    Any ideas or suggestions. Will multithreading and notifiers help?
    TIA
    Rachana
    Attachments:
    Sanpshot_Of_Design.zip ‏75 KB

    Hi Rachana,
    I was thinking about using event structures wherein there would an event case that would handle any value change event for any of the buttons on the front panel. But before suggesting that, I would need to know more about the Ideal State subvi( more specifically, how is it checking for any hardware present on the network and where is the one minute wait coming from?).
    Please feel free to respond to this post with your questions/comments.
    Regards,
    Ankita A.

  • My new macbook stops when trying to transfer using thunderbolt cable and Migration Assistant. Why

    I Just bought a MacBook Pro and want to transfer information from my old MacBook Pro.  Using Thunderbolt cable and Migration Assistant.  My new Macbook quits as soon as I choose to start the transfer.  Tried it through a wireless connection also.  Help!  I need to transfer my data!!

    Start over, restoring the OS on the new machine, and follow the steps outlined in  Pondini's Setup New Mac guide using the Setup Assistant.

  • Discrepancy between execution time of state machine and flat code

    I am trying to optimize the performance of my application, and I've found that the same code executed as a case in a state machine, and flat on the block diagram takes a dramatically different amount of time to run. I'm trying to figure out what I'm missing here. The picture shows a test vi I threw together (the next post will have the diagram image for the "Add New" case of my Buffer Engine.vi - basically the same as what is in frame 5). The fifth frame in the sequence is what I am concerned about. It shows that executing the case in the state machine takes ~700ms, and flat, ~113ms.
    Any thoughts?
    Chris
    Attachments:
    Test Times.jpg ‏124 KB

    Thanks for the suggestion Altenbach. I had to insert a for loop to replace array subset indivually for each column of new data to place in the buffer, but even with the extra processing, the result was about 80% faster. I guess I'll have to come up with a system to track where to place the data (it was convenient to always drop the data at the end..), but that shouldn't be an issue.
    However, this suggestion doesn't address the original concern. The same array resizing was going on in both the subvi and the sequence frame. This improvement should increase the performance of each, but doesn't explain the difference.
    As an aside, I contemplated using a queue, but without the ability to dequeue from both the beginning and the end, I don't see how I can use them for this. I want to trash the oldest data, not hold up the acquisition. In any case, I don't think it would be faster because the memory isn't pre-allocated. Now I am considering just storing the data in a control, and passing the reference as necessary. The question is, is reading the value from a control faster than reading from a shift register?
    Thanks again.
    Chris

  • I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    no.

  • I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. suggestions to complete backup please?

    I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. the same thing happens when just trying to save my pictures from iphoto to a flash drive. suggestions to complete backup please?

    Sounds like you'll need to access that drive while it is not booted. You need to replace it anyway, so do that, then one way or another (ext enclusure, et), access it and copy files.
    If you keep trying to boot it, you might kill it for good and not get your files, so just swap it out first.

  • Can I backup an External Hard Drive using Time Machine and Time Capsule?

    I have a Powerbook G4 with Mac OS X 10.5.2 and use an external hard drive *all the time*. I'd like to use Time Machine and my new 500GB Time Capsule to back it up along with the internal hard drive. Can I do this? Thanks for your help.

    I believe so; this thread indicates how. Hope this helps.

  • Can I view photos and movies from my external hard drive? I used Time Machine and a WD Passport for backup. Since my drive on my MacBook Pro is filling up I was planning to delete some of the movies and photos.

    Can I view photos and movies from my external hard drive? I used Time Machine and a WD Passport for backup. Since my drive on my MacBook Pro is filling up I was planning to delete some of the movies and photos. I wanted to see if I could view them from the hard drive. Thanks

    Hello, eco1. 
    Thank you for visiting Apple Support Communities. 
    This sounds like you are wanting to move your iTunes media folder to an external drive and have iTunes this folder from this location.  If this is the case then I would recommend taking a look at the article below. 
    iTunes for Mac: Moving your iTunes Media folder
    http://support.apple.com/kb/ht1449
    Cheers,
    Jason H. 

  • Long story short....I restored my computer to an earlier point using time machine and now all of the previous back-ups are gone. My question has to do with itunes...is it possible to restore my itunes library to the most recent backup because the restore

    Long story short....I restored my computer to an earlier point using time machine and now all of the previous back-ups are gone. My question has to do with itunes...is it possible to restore my itunes library to the most recent backup because the restore that I did was in march and the latest backup was in may....the reason being is that there were app that i had downloaded that are in my most recent back-up, that were not in the backup I restored to. Is it possible to just restore one application ie)itunes?

    See this post.
    tt2

  • I backed up my macbook pro using time machine and now my iphoto and itunes are empty. how do I reset the computer to an earlier date?

    I backed up my macbook pro using time machine and now my iphoto and itunes are empty. how do I reset the computer to an earlier date? and why would this have happened?

    Without more information, I can't tell you why it happened. As to how to restore to an earlier date, please check out the article below. Should help you to restore form a time machine backup.
    http://support.apple.com/kb/HT1427

  • HT201250 Assume I back-up my computer using Time Machine and then decide to uninstall a certain application.  If I later decide that I'd prefer to have that uninstalled application, can I simply restore it from back-up, or must I go through install proces

    Assume I back-up my computer using Time Machine and then decide to uninstall a certain application.  If I later decide that I'd prefer to have that uninstalled application on my computer, can I simply restore it from my back-up, or must I go through the entire install process again?

    Nobody can help? :(

  • Create Multiple tasks for Single Item in List using state machine workflow in sharepoint

    Hi,
    I want to create multiple create tasks for Single Item in List based on Assigned to column using state machine Workflow through visual studio
    Here Assigned to column allows multiple users. so i have to create task for every user based on column .
    I'm trying for this but i didn't got any solution
    Please provide solution for this.

    Hi,
    According to your post, my understanding is that you wanted to allow multiple users to approve.
    There are some articles about creating parallel tasks in state machine workflow, you can have a look at them.
    http://www.codeproject.com/Articles/477849/Create-Parallel-Task-in-State-Machine-Workflow-in
    http://msdn.microsoft.com/en-us/library/office/hh128697(v=office.14).aspx
    http://social.technet.microsoft.com/Forums/office/en-US/b16ee858-4360-479a-a686-4ee35b7be9db/sharepoint-2010-workflow-creating-multiple-tasks?forum=sharepointdevelopmentprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • I will be travelling abroad but use time machine and modem at home. Do I need to leave these switched on while away for iCloud to work?

    I will be travelling abroad but use time machine and modem at home. Do I need to leave these switched on while away for iCloud to work?

    No. iCloud has nothing to do with Time Machine on your computer, and as long as your computer has synched all desired content and settings to iCloud, not only does the modem not need to be switched on, your computer doesn't need to be on either.
    Regards.

  • Bought referbished macbook pro oct 2011 version, just set it up using time machine and quicklime pro has disappeared. I have quicktime but not quicktime pro. Any ideas? thanks!

    bought referbished macbook pro oct 2011 version, just set it up using time machine and quicklime pro has disappeared. I have quicktime but not quicktime pro. Any ideas? thanks!

    Try, in preferences, resetting 64 bit to 32 bits.  Should work fine.  the older vidoes, etc will not work with 64 bit.  Had the same problem/scare.  Let us know if this helps and works!

Maybe you are looking for

  • I have an apple id but i have not been able to use the same id with i tune and app store..what to do

    i have an apple id but i have not been able to use the same id with i tune and app store..what to do???every time i m trying to login it is telling that this id has not been used with i tune and App Store ....reviewing of my id is one of the option p

  • My own exception in jsp

    Hi there.... I have a doubt. How could I show a JavaBean Exception in a JSP page. Thanks

  • New wireless mouse wont scroll

    Hi I have an Imac 10.4.11 and I have just purchased a new apple bluetooth mouse today but I cant get it to scroll down through a website as they do in the video on the apple site. Can anyone shed any light on this? I have gone into system preferences

  • Where can I download an install file for Acrobat Pro version 9 for Mac.

    I had Acrobat Pro version 9 running fine under Snow Leopard but since upgrading to first Mavericks and then Yosemite it has issues. I was running it under Snow leopard Server and parallels but after some problem it needs reinstalling and I can't find

  • Removing Items from a TextArea/Pane Component

    Hi All, I have a question about text containers. Basically I'm reading Strings from a file and I'm displaying them inside a JTextArea. I'm adding new Strings to the JTextArea using it's append() method. Is there a way to limit how much stuff should t