Several tasks addressing the same DO port

Hi,
I'm building a software program based on plugins.
All these plugins interact with DIOs.
When the plugin is loaded in memory, it loads its configuration and create a task to control/read DIOs port on C-series modules (9476 and 9425) placed in a cDAQ chassis.
If the task pointing on a module is already built, plugins reuse the already created task instead of creating a new one. All DIOs tasks are not synchronized on any clock, they only return the port state when necessary (software timed).
Actions on DO are always the same : Read current DO port state, apply mask and pattern on the read value and apply new calculated state on the DO port.
According to the plugins used, it might be possible that several of them will want to access the same DO port of a module at the same time. Is there something like a round-robin mechanism which handles this kind of situation ? Or should I create a semaphore to reserve the access the DO port one plugin after the other ? If an explicit semaphore is required, can it be embedded in the DAQmx task (or specific DAQmx function) or should I use standard semaphores available in LabVIEW ?
Thank you for your help !

I just use an Action Engine to control my DIO tasks.  Only one system can access the non-reentrant VI at a time, so that acts as your semaphore.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Run several tasks at the same time

    Hi,
    I have a NI-SCXI-1600 USB DAQ with SCXI 1520 strain analog input (40 channels)
    I have to run one task with 5 channels right now.Later I have to run another task with another 5 channels while keeping the previous 5 channels going. Is it possible? 
    Thanks.

    Hello Jiqiu,
    Please respond back in this duplicate thread if you have further questions.
    Gerardo O.
    RF Systems Engineering
    National Instruments

  • Several contacts have the same email address. How can I choose which contact name appears on the address line in Mail?

    Several contacts have the same email address. How can I choose which contact name appears on the address line in Mail?

    you can't really, but you might be able to filter them by message content into folders for each, or color them with tags

  • How to use a multiple boards (6321/6323) analogical acquisition task with simultaneous analogical generation task using the same boards (Labwindows CVI10)

    Subject : it seems impossible to run a multiple boards analogical acquisition task with one or several analogical generation task using the same boards.
    NI Configuration : Dev1 = Dev2 = 6321 boards
    Development environnement : LabWindows CVI 10
    Source code for analogical acquisitino task :
           DAQmxCreateTask("",&AIRecordingtaskHandle);
           DAQmxCreateAIVoltageChan(AIRecordingtaskHandle,chan,"",DAQmx_Val_NRSE,min,max,DAQmx_Val_Volts,NULL);
           DAQmxCfgSampClkTiming (AIRecordingtaskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
           DAQmxGetTaskAttribute(AIRecordingtaskHandle,DAQmx_Task_NumChans,&gNumChannels);
    Chan = "Dev1/ai0, Dev1/ai1, Dev1/ai2, Dev2/ai1"
    Source code for analogical generation taskS :
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC0, chan, "", min, max,DAQmx_Val_Volts, ""));  // chan vaut Dev1/ao0
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC1));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC1, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao1
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C2_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C2_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev2/ao0
    At the first DAQmxReadBinary call attempt, the system shows an error (see attached document) 
    What we understand about that error : it is impossible to run the two set of tasks (ai and ao) using ressources from both Dev1 and Dev2 in the set of tasks because it is not allowed to use the same Reference Clock for that.
    The question is : is there a way to to that without having that kind of message?
    We tried different combinations :
    - Using only one ao task (on Dev1/Dac0) : same error
    - Not using any ao task (only the ai task) : no error
    - configuring the ai task with only channel from Dev1 : no error 
    - Using "/Dev1/ai/SampleClock" as internal clock for the ai task and "/Devk/ao/SampleClock" for each ao task (k standing for "1" or "2" depending of the ao task we consider) : error
    Thanks a lot.
    Pièces jointes :
    MsgErreur NIDAQmx.JPG ‏38 KB

    doublon
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • How to install several instances of the same application on a computer?

    Hej,
    I have an application in LV 2009, where I have created an installer. The installer installs to a directory called \Receiver relative to the Program Files directory. If I install this once to a computer, everything is OK.
    However, I want to install the same application twice on the same computer. There should be no conflicts between the two applications, since I can configure them to work on different directories and ports. But if I call the installer again, and selects another directory, nothing is installed and I get the message "Installation Summary - No software will be installed or removed". It seems like the installer ignores that I have selected another directory, and just uses the default directory, relative to the Program Files directory.
    Anyone knows the trick, how to install several instances on the same computer ?
    BR, Jan
    Jan Nielsen
    Freelance system analyst and LabVIEW programmer

    Hi Jan,
    This is so because each installer has a GUID that is used to check whether the application needs to be upgraded or not. (It's a Microsoft function).
    What you can do is create a new installer with a different GUID (copy the installer in the projects), and check witha  text editor whether this GUID has changed.
    But any specific reason you need two seperate installs? You can run the application twice with a specific INI token:
    allowmultipleinstances=True
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Open several PDFs in the same Reader window using tabs for each document

    How do I open several PDFs in the same Reader window using tabs for each document?  I'm using Reader 11.0.03 and Windows 7.  

    That would be a nice feature!  Suggest it at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform - hopefully it will make it into Reader XII.

  • I have photos from several cameras of the same event, how do I combine them?

    I have photos from several cameras of the same events.  How can I sort them together, three pics of the same horse from three cameras side by side; I can't move pics from one camera source to another in a folder.

    Languare is critical since it is all we have to communicate with
    Folders in iPhoto do not hold photos - folders hold only other folders or albums
    If you are speaking of events then you simply merge the events (drag one onto another or select two or more and use the merge events command - for the photos to be "side by side" the three camera's time/date setting will have to be identical as photos will be sorted by time/date - if they are not you can correct by selecting the photos in an event (before merging) and using the adjust time and date command or you can make a smart album for the camera and select the photos and use the adjust time and date command
    LN

  • I have several copies of the same track - how do I remove extra tracks?

    First, I am now running iTunes for windows, 11.1.3.8
    My computer is a laptop running Windows 7.
    I have an iPod classic that I try to sync with it.
    I have a mix of songs downloaded from Amazon (sorry guys) or ripped from CD's. 
    A year ago, iTunes started creating several copies of the same track.  For example, if I wanted to listen to Adam Ant, I'd have three copies of "Desperate, but not serious" and one copy of something else and two copies of "Room at the Top."
    So, I deleted the extra tracks.  Sometimes this was horrid because if I deleted the wrong track, the other tracks wouldn't work, but they all looked the same (same number of bytes, no numbers at the end of the titles, etc) so I had to be careful. 
    I cursed, a lot, so after a time I deleted iTunes completely, then started over.  That seemed to fix it.
    BUT, today, I have the same problem.
    It's random.  Not every album is effected.  Not every song on a certain album is effected.  It's not just songs I ripped, or songs I downloaded.  There's nothing you can point at and go "AHA!"
    Furthermore...this might be a separate problem, but my iPod is not always recognized by iTunes, and some of the songs on the iPod get skipped.  Again, no way of telling which songs it doesn't like...it skips some ripped, some downloaded.  No correlation that one can easily track.
    What I would like to do is fix iTunes then reset the iPod and start over, I guess?
    Any ideas?  Thank you all in advance.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group of identical tracks to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin. This can happen, for example, if you start iTunes with a disconnected external drive, then connect it, reimport from your media folder, then restart iTunes.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background. Please take note of the warning to backup your library before deduping, whether you do so by hand or using my script, in case something goes wrong.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT?

    I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT? Is it a switch or a splitter?  And where is it best to buy one?  Thanks!

    Welcome to the Apple Community.
    You need an HDMI switch.

  • How can I export several versions at the same time?

    Greetings -
    I'm looking for something that I may just be missing, and hoping someone here can point me in the right direction.
    Basically, I'd like to be able to select an image in my library and export several versions at the same time. For example, I select a photo and export JPG, TIFF and PSD versions in one shot without having to run three separate export requests - essentially a batch action. I can't imagine that this isn't built in already - I'm just assuming that I'm missing something obvious.
    Thanks in advance for any advice anyone might have.
    John.

    Fwiw, I've not seen this requested before.
    This kind of Export option is very typical, Kirby, when the rendering of the exported version will take a long time, for example for video or audio. Then you can share several formats at once, to render a version suitable for the web, for viewing on the computer, or the iPhone at the same time. That is really useful, if you render a movie at a full HD resolution and don't have to do it again for an iPhone/iPod version.
    QuickTime 7 does this for the "File > Export for Web" option, for example. You can get three versions of your final movie at the same time.
    And I just checked, the new iMovie Theater does this as well, when sharing a movie to the Theater:
    When you add a movie, trailer, or clip to the Theater, iMovie creates versions of your movie tailored for local playback, playback on an iOS device, and streaming.
    Come to think about it - exporting a webpage from Aperture will also export thumbnail sized images plus a larger version for downloading.

  • How do I open several tabs at the same time?

    How do I open several tabs at the same time?

    Can't you open more than one tab?
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • HT4623 I recently downloaded ios 6.1.3 in my iphone s3 but could not install. The message on the phone is " unable to install update. An error occurred installing ios 6.1.3. I have tried several time but the same message keep appearing. what do i do.

    I recently downloaded ios 6.1.3 in my iphone 3, but unable to install the download. This message keeps showing "unable to install update, an error occurred installing the ios 6.1.3 I have tried several times but the same message keeps coming. What is the solution?

    There is no such thing as an iPhone 's3'.  There is a 3G which can only be updated to iOS 4.2.1 and a 3GS which can be updated to iOS 6.1.3.
    Which model iPhone is this?
    Identifying iPhone models

  • Firefox will not open after installation. i have tried to install several times with the same results. installation sends a list to firefox each time. need help. willard lee

    will not open after installation. i have tried to install several times with the same results. installation sends a list to firefox each time. need help. willard lee

    Can you attach a screenshot or link to the instructions you are following?
    You are on the 3.6 release and Firefox 7.0.1 is out. You can download and install the latest release from http://www.mozilla.org/en-US/firefox/new/ if you would like to update now. The 3.6 version will be maintained for a while longer, but you should update when you can.

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

  • Tolerance/verificat. of price entering several invoices against the same PO

    Hi!
    I'm having some troubles when trying to check the price verification at the MIRO.
    I'd like to be able to check the price verification when doing several invoices against the same PO;
    not allowing the total amount entered in all the invoices to be greater than the PO they refer to.
    I give you an example:
    I have a PO of only one line of 100eur. and a tolerance of 5%.
    Also a Invoice against this PO of 50eur.
    If i try to do another Invoice against the same PO, the maximum price allowed should be 55eur.
    Could anyone help me?
    Thanks in advance!

    Thanks for your answer Prabu,
    But my problem is still unsolved.
    I've checked the tolerance limits in the SPRO, and if I have one Invoice against one PO, all works properly.
    The issue is when having several Invoices against the same PO.
    The system checks the limits against the price of the PO, not taking account of the previous invoices that PO has.
    In the example above:
    - PO: 100eur. Tolerance of 5%.
    - 1st Invoice. 50eur against the PO.
    - 2nd Invoice. The maximun price allowed is 105eur (100eur from the PO + 5eur of tolerance).
    But the price of the 1st Invoice should be subtracted ( 100eur from the PO + 5eur of tolerance - 50eur from the 1st Invoice) , that is the maximum price allowed should be 55eur.
    Thanks anyway!

Maybe you are looking for