Setting DAQmx Tasks up in project instead of NI Max

I am writing a labview application to be installed on a PC as an executable file with the Labview Engine.  I can put my DAQmx tasks in my project or NI Max.  If I put them in my project and I build my application, do I lose the ability to change the IO settings in NI Max independent of my application?
What is the best way to mechanize this with all the features of things like DAQmx tasks being created in my project rather than NI MAX? 

id wrote:
I am writing a labview application to be installed on a PC as an executable file with the Labview Engine.  I can put my DAQmx tasks in my project or NI Max.  If I put them in my project and I build my application, do I lose the ability to change the IO settings in NI Max independent of my application?
What is the best way to mechanize this with all the features of things like DAQmx tasks being created in my project rather than NI MAX? 
First. Yes persaisting the DAQmx features to the project removes them from MAX.  You will not be able to run them or modifiy them from MAX but only within the Project Context.
This is not always BAD.  For instance, no one can "Fat Finger" your configuration or install another Task with the same name that uses different settings.  Using the Project provides a context boundary wheras MAX is universally accessable.
Using the Project to store "Tasks, Scales, etc" DOES NOT remove the ability to modify them though.  Tasks stored in projects built into an EXEs wind up deployed as a text file in the exes support directory (Exe\Support\NI DAQ\<Something.txt>  This is a human readable configuration file that has the tasks settings in it.  If you need to change a setting (like increase a sample rate or change a physical channel) you can edit the file and the exe will use the new settings.
This is not always GOOD For instance, if the test system suffers a fault, MAX cannot selectively control the IO channels for troubleshooting.
Knowing the pros and cons of each method will help you work within your team to develop the best approach for your needs.  I've recommended each approach to various clients.  (And been right both ways!) 
What I've never recommended is creating tasks programatically.  However, I can see some use cases where hiding the configuration from everyone (on a removed BD) might be desired in a highly regulated enviornment where a possible change to a Task Property Could change code validation and the ECO process requires removing any possible "Hidden" access to the config files (Although a hash on the EXE folder could be used to disable testing)
Jeff

Similar Messages

  • How to set task type of a task in MS Project using excel vba code.

    Hello Gurus,
    I am generating MS Project files(.mpp) files form excel data. An excel macro in the excel file will read the excel data and will generate the .mpp file. It is working fine. now i want to set the task type of all the tasks to "Fixed work" from excel
    vba code.
    How to use the property PjTaskFixedType in setting the task type??
    refer below links
    http://msdn.microsoft.com/en-us/library/office/ff861713.aspx
    http://msdn.microsoft.com/en-us/library/office/ff864157.aspx
    Can someone help me in setting task type property from excel vba.
    I have attached my sample code used to generate the mpp file. It is not the complete code but you will get an idea from it.
    Set pjApp = CreateObject("MSProject.Application")
    pjApp.FileNew
    Set newproj = pjApp.ActiveProject
    newproj.Tasks.Add (task_name)
    newproj.Tasks(mpp_row_number).Start = task_start_date
    newproj.Tasks(mpp_row_number).Finish = task_end_date
    newproj.Tasks(mpp_row_number).ResourceNames = resource_name
    pjApp.FileSaveAs mpp_file_save_path & mpp_file_name & ".mpp"
    pjApp.FileClose
    pjApp.Quit
    Any help is appreciated.

    Hi Syamku,
    A simple example that sets the task type:
    ActiveProject.Tasks(2).Type = pjFixedDuration
    ActiveProject.Tasks(3).Type = pjFixedUnits
    ActiveProject.Tasks(4).Type = pjFixedWork
    http://msdn.microsoft.com/en-us/library/office/ff860469(v=office.15).aspx
    Hope this helps

  • Creating a new DAQmx task after building to EXE

    Should I be able to create a new DAQmx Task while running a VI containing the DAQmx Task control that was built as an EXE?
    I can't but would like to know if there is a work around or if I am doing something wrong. See the attached screen shots.
    When I am not running the VI, I can right click the Task front panel control and select "New NI-DAQmx Task" -> "Project" or "MAX", but when it is running or I am using the VI built as an EXE (running or not) I can't. In the EXE I am able to click the Task drop down box -> "Browse..." -> "Create New..." -> "MAX Task" but nothing happens when I click on "MAX Task".
    I would like to be able to create a new task in the software to use different channels and signal types on the fly. The goal is to build a program setup similiar Signal Express but include some on off controls for some machinery and scale it down and customize it so that it is easier to show people how to use it.
    Thanks
    Attachments:
    block diagram.png ‏30 KB
    front panel.png ‏25 KB
    exe front panel.png ‏26 KB

    When running your exe, you'll be able to select from tasks created in MAX.  Instead of right clicking on the task control, try creating the tasks you want directly in MAX (under Data Neighborhood right click on DI-DAQmx Tasks to create a new one).  Tasks that you've saved in MAX will be selectable in the DAQmx Task Name control.

  • MS Project 2003 Pro - Link task from other Project files

    Starting yesterday I wanted to find a way to link a task in one Project File to a task in another Project File. The idea being I have a Site Development Project File, and wanted a certain task in that schedule to drive tasks in individual House Development
    Project Files so we wouldn't need to use one large cumbersome Project File for the entire Development. So like other users I've read about I tried copy task and paste special into an existing task cell, a predecessor of other tasks, which of course resulted
    in the "OLE Paste operation cannot be completed" error. So as a test I saved two Project files, Project1 and Project2. I then tried to "Paste Special" into a "New Task" row, which was instead empty and found that would work without
    the OLE error, except the linked task's Predecessor copied with the linked task so it's predecessor was now that numbered task within Project2 which I didn't want. So looking at Project1 since I set them both up as one parent task with five subtasks for simplicity,
    I copied the parent task from Project1 (no predecessor) into a blank Insert / New Task row in Project2, then made the linked task a predecessor to the next task below and voila! Viewing the two Project Files in Window / Arrange All, when the duration of one
    of the Subtasks in Project1 is adjusted, it drives the overall duration in Project2 just like I wanted. So while most of you may already know this trick, as I could not find much information on doing this (somewhere they suggested "Insert Project",
    which did work but was not what I wanted), I thought I'd still share this in case it helps someone else. You just need to copy a parent task with no predecessor, paste special into a blank New Task row then make that the appropriate predecessor in the pasted
    Project File. Cool!

    J.L.Fitzpatrick,
    I second the strong caution on the use of paste links in Project as indicated by Guillaume. It is the same as playing with fire and it sounds like you already got burned. Paste links do work but they are NOT for the casual user and their use requires the
    upmost in file creation expertise and file management discipline.
    Let me highlight a couple of things I think I understood in your description. First, it sounds like you were paste linking the whole task link. Paste links on individual field cells are tenuous enough but doing a whole line will only result in disaster.
    Second, it sounds like you were trying to paste link into a summary line. That is equally a really bad idea. With that construct I can virtually guarantee file corruption.
    I can understand why Insert Project did not meet your needs. You are trying to link a single task in one file with another. That is achieved with a cross-project link (i.e. external predecessor/successor). Insert Project is exactly what it says, the WHOLE
    project is inserted, not just a single task. So Insert Project and cross-project links are NOT the same thing.
    Bottom line. What you want is a single cross-project link. Even then you still open the door to potential file corruption. Once you have that link established, never move, rename, or save to a different location. Ideally both files should be in the same
    folder on a local drive, not on a shared network.
    John

  • How to Measure Frequency to RPM NI-DAQmx Tasks

    Hello,
    I am trying to measure frequency using NI DAQmx task and then convert this to an RPM if at all possible.
    I have the following hardware options at my disposal.
    I have SCXI 1126 Module along with a SCXI 1327 terminal, as well as a PXI 6289 Multifunction DAQ.
    I have wired in a mag sensor to ai7 on my 1126 and when I pass a metallic object I get a amplitude of 6  - 8  so I am able to read the mag sensor.
    What I am trying to do is to somehow convert this analog measurement into a RPM while only utilizing the NI DAQmx task.
    Any help would be appreciated.
    Tim
    Solved!
    Go to Solution.
    Attachments:
    Freq Set Up.jpg ‏2993 KB

    So I would select new in "Custom Scaling"
    Then would I select linear?
    Your calculations are simple but I am unsure if this would give me the desired result.  From my attachment I am seeing an input amplitude of 6 Hz for each pulse.  What I mean by this is that every time I bring a ferrous object near my mag pick up I get a pulse, this is what I was trying to illustrate in the attachment.  The analog pulse comes in a 6 Hz so I would simply multiple this pulse by 60 (assuming I get one pulse per rotation) to get RPM?
    How would this make sense if I only input one pulse for a long duration of time? 
    I have notice the amplitude of the pulse input increases with increased pulse frequency.  Does this mean the lowest RPM I can record is 360 RPM?  
    Tim

  • NI-DAQmx task works in MAX or DAQ Assistant test panel but not in LabVIEW

    I am attempting to read a single AI channel from a PCI-6024E card via an SCB-68. I have created a NI-DAQmx Analog Input Voltage Task in MAX for this channel, sampling in contiuous aquisition mode at 100 kHz, 10000 samples at a time, with RSE terminal config. If I use the Test feature from MAX, the channel acquires data as expected.
    In LabVIEW, I call this task using an DAQmx Task Name Constant. If I right-click this constant and select "Edit Task", the Daq Assistant opens and I can use the Test feature from the DAQ Assistant to see that the data is still being acquired as expected.
    However, when I try to programmatically read this channel in LabVIEW using the VI "DAQmx Read (Analog Wfm 1Chan NSamp).vi", the VI returns a constant DC value of 500 mV, which I know is incorrect (I can monitor the signal across the two terminals in the SCB-68 with a DMM to know that the signal coming in varies as expected, and as I read using the test panels). This erroneous reading occurs even if I make a new VI, drop the task name constant on the diagram, right-click the task name constant and select "Generate Code - Example" and let LabVIEW create its own acquisition loop (which is very similar to what I already set up, using the "DAQmx Read" VI).
    Any ideas why the Test Panels work correctly but the LabVIEW code does not?

    Hello bentnail,
    I'm not sure why the test panels are readin the value correcly but the LabVIEW code does not, but there are a couple of things we can try.
    1) What happens if you just use the DAQ Assistant and place it on the block diagram? Does it read out the correct values?
    2) Try running a shipping example that comes with LabVIEW. "Acq&Graph Voltage-Int Clk.vi" should work well.
    3) What kind of signal are you expecting to read (peak to peak voltage, freqeuncy, etc.)?
    Thanks,
    E.Lee
    Eric
    DE For Life!

  • DAQmx task does not start on RT target

    I cannot programmically start a DAQmx task on an RT target.  The PXI-8140RT controller hangs on either the DAQmx Start Task.vi, DAQmx Read.vi, or the DAQmx Create Timing Source.vi, depending on the level of complexity I try to use.  Any suggestions on what would cause this?
    The vi running on the target is based upon the wizard created target-multi rate-variables-fileIO.vi.  I cannot stop the vi once it hangs; I can only close it.  I have to restart the controller to reestablish communication.    I have tried DAQmx tasks created using MAX, created programmically, and created from a front panel task control.  The tasks test ok using the MAX or the DAQ Assistant.  For now I am trying to measure one RTD channel. 
    The RT system consists of the PXI-8140RT,  a PXI-6259 M-series controlling a SCXI chassis, and the SCXI-1102B and SCXI-1581 pair capable of measuring 32 RTD's.  There are two other modules in the SCXI chassis which aren't being used yet; a SCXI-1162HV and SCXI-1163-R.  The target and host are running LV Real-Time 8.01 and NI-VISA 3.5.  The host has NI-DAQmx 8.0.1f while the target has V8.0.0, apparently the lastest available.

    The VI didn't generate an error message.  Nor was there a message in the RT error log.  I guess it froze before an error could be generated.  I used the DAQ Assistant Express vi in a totally new project.  I have since converted this to code and added features to make it more like my original project.  The new project is working.  I suspect something went wrong with the original project.  I've tried to edit the original project to more closely match the new one and it still dies.  Guess it's time to put it to bed.

  • Timesheet could not add task from existing project task assignment

    HI there,
    I tried to add a task in Timesheet (PWA2013) from an existing assignment. However, there is no task listed under the project when I open the dialog "Add an existing task". It only shows me the project name, I click it, nothing under the project.
    Due to this issue, I could not add any existing task into the timesheet.Please look at the screenshot. The "test project" is the project name, while no  any task under this project.
    Any help is appreciated!
    Cindy

    Hi Cindy,
    Indeed if you cannot access the server setting from the quick launch menu in the left part of PWA, you have to request administrator rights to your admin.
    I would add an important comment : in PWA2013, the "close to update" PWA2010 feature no longer exists and has been replace by the "lock" feature, which works basically the same.
    To unlock tasks in PWA2013,
    go to server setting, manage views,
    choose a project view,
    insert the "lock" column,
    go to the project center,
    check out your project schedule,
    select the view you just modified,
    change the value in the lock field for the given task,
    publish the project
    Read this post here: http://social.technet.microsoft.com/Forums/projectserver/en-US/28d4914d-5a80-4638-8153-94155a7d43fe/locked-feature-not-working-in-pwa-2013?forum=projectserver2010general
    And this article: http://epmsource.com/2012/10/31/where-has-close-tasks-to-update-gone-in-project-server-2013/
    Then it should be ok.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • List of delayed tasks in MS Project 2010

    Hi Experts !!
    Is there a way out to find all the delayed tasks in a project.
    Also, a list of task either running/continuing or starting in between two dates.
    TKP86

    Hi,
    "Late" implies a comparison between two dates. One is the finish date of the task; do you mean current date is the other one?
    In other words, are you looking for tasks with a planned finish date before today, but not yet finished?
    That implies you will not really track your project, meaning that when a task's plan changes, that will impact the planning of other tasks so your planned finish date could be moving al the time.. I have the impression that in your mind, the original plan
    will always be "the plan". And the utility of a baselin is that it is an immovable copy of that original plan - such that you can enter actual start/finish dates when reality strikes..
    By all means, you could set a formula in a flag field to show the definition of Late as I guess you have in mind:
    iif([% Complete]<100;IIf((projdatediff([Finish];Now())>0);No;Yes);No)
    Greetings,

  • Examples for good programming practice with multiple DAQmx tasks

    I'm writing a program to continuously log data from 8 counters, 8 encoders, and 8 voltages. The proof of concept VI with a single counter was simple and elegant, but scaling up to all signals resulted in a wiring mess. I've been working through the Labview Core courses, and am currently on Core 3. I still haven't come across a discussion on how to work with multiple DAQmx tasks without making a mess of the block diagram. Can anyone point me in the right direction?
    Also, say I have a state machine that has a configure, idle, and logging states. I need to set the initial values of the encoders during configuration, and keep up with their changes while in the idle state so I have appropriate starting values when entering the logging state. Can anyone point to an example that shows how this might be accomplished?
    Thanks

    I'm very familiar with AE's/Functional Globals - but I have struggled in the past with handling multiple DAQmx tasks - particularly when you're using multiple devices and using different types of measurements which require seperate tasks/handling (e.g. such as thermocouples which require extra compensation).
    I'm not even sure I know whare the requirements are for needing multiple tasks - I know you can need multiple tasks for a single device if the type of measurement is different but can you share an Analogue Input task amongst multiple devices?
    I think in hindsight (and without too much thought now) it looks like a good case for Object Oriented LabVIEW - with a base DAQmx class (initialise, configure, start, acquire, stop, close etc.) and then child classes for each type of measurement (with one task associated with each - and private data unique to that specific class). You then hold an array of objects (one for each task) and iterate through each one with dynamic despatch to get the data.
    I don't know your particular experience level of using LabVIEW (and as such, OO may not be appropriate) - but as a wider discussion of 'best practice' it seems like an appropriate method I would use going forward.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Setting up number range for projects in cProjects

    Hi,
    I am new to cProjects & my apologies if my question may sound very naive. My client wants an alpha-numeric number range to be set up for numbering of projects. Is this possible & if yes how? Which is the object for setting the number range? (I believe the transaction in "SNRO")
    Thanking you for taking a note of my querry.
    Regards
    Deepak

    Sample Code Method SET_DEFAULTS_UPON_CREATION
    Method IF_EX_DPR_ATTRIBUTES~SET_DEFAULTS_UPON_CREATION
    */ This method is called when creating a new project element (i.e. project definition,
    */ phase, task, etc) and can be used to fill in default values for standard as well
    */ as customer defined data fields.
    */ This implementation is provided to assign customer specific numbers to project
    */ elements.
    */ It's interesting to note that when this method is called, the external ID of the
    */ object has already been determined and assigned by the default numbering services
    */ class CL_DPR_NUMBERING_SERVICES. It is also interesting to note that if a user
    */ specified an ID for the object through the user interface, changing the identifier
    */ in this method will have no effect -- meaning the user specified ID will still be
    */ assigned to the object.
    */ Only the example for Project Definition is provided.  For other project elements,
    */ insert similar code between the Beginning and End comments below.  In addition,
    */ the filter for this BADI implementation must be updated to include any other
    */ project element for which custom number assignment is desired.
      DATA:
        lr_parent              TYPE REF TO if_dpr_common,
        lr_project             TYPE REF TO cl_dpr_project,
        lr_approval            TYPE REF TO cl_dpr_approval,
        lr_individual_approval TYPE REF TO cl_dpr_individual_approval,
        lr_phase               TYPE REF TO cl_dpr_phase,
        lr_task                TYPE REF TO cl_dpr_task,
        lr_checklist           TYPE REF TO cl_dpr_checklist,
        lr_checklist_item      TYPE REF TO cl_dpr_checklist_item,
        LV_NUMBER              TYPE DPR_TV_EXTID,
        LV_NUMTEXT             TYPE CGPL_EXTID,
        LV_INTERVAL            TYPE NRIV.
      FIELD-SYMBOLS:
        <ls_project_attrs>             TYPE dpr_ts_project_int,
        <ls_phase_attrs>               TYPE dpr_ts_phase_int,
        <ls_task_attrs>                TYPE dpr_ts_task_int,
        <ls_checklist_attrs>           TYPE dpr_ts_checklist_int,
        <ls_checklist_item_attrs>      TYPE dpr_ts_checklist_item_int,
        <ls_approval_attrs>            TYPE dpr_ts_approval_int,
        <ls_individual_approval_attrs> TYPE dpr_ts_individual_approval_int.
    */  Determine which project element (object category) is being processed
      CASE flt_val.
        WHEN cl_dpr_co=>sc_ot_project.
          ASSIGN cs_attributes TO <ls_project_attrs>.
          lr_project ?= ir_common.
    */ Beginning of custom project number assignment.
    */    In this example, the default system numbering is manipulated to
    */    produce the Project Number...
    */    Get info regarding the number range for operative projects...
          CALL FUNCTION 'NUMBER_GET_INFO'
            EXPORTING
              NR_RANGE_NR              = 'DO'
              OBJECT                   = 'DPR_EXTID'
    *         SUBOBJECT                = ' '
    *         TOYEAR                   = '0000'
            IMPORTING
              INTERVAL                 = LV_INTERVAL
            EXCEPTIONS
              INTERVAL_NOT_FOUND       = 1
              OBJECT_NOT_FOUND         = 2
              OTHERS                   = 3.
          IF NOT SY-SUBRC IS INITIAL.
            RAISE EXCEPTION TYPE CX_DPR_FATAL_ERROR
              EXPORTING
                TEXTID = CX_DPR_FATAL_ERROR=>SC_INVALID_PARAMETERS.
          ENDIF.
    */    Strip off the year that has been appended to the object number
    */    by the default numbering services...
          write <ls_project_attrs>-project_id(20) to lv_number.
    */    Get the incremental number of the project from the number range...
          lv_number = lv_number - LV_INTERVAL-FROMNUMBER.
    */    Format the number according to customer specific requirements:
    */    In this example the number is PROJ-<inc num> where <inc num>
    */    is the incremental number of the project (i.e. for the 33rd project
    */    created, the <inc num> is 33).
          WRITE lv_number to lv_numtext no-zero.
          condense lv_numtext.
          CONCATENATE 'PROJ' lv_numtext INTO lv_numtext SEPARATED BY '-'.
          TRY.
              CALL METHOD LR_PROJECT->SET_PROJECT_ID
                EXPORTING
                  IV_PROJECT_ID              = lv_numtext.
          CATCH CX_DPR_OBJECT_UPDATE_ERROR .
              RETURN.
          ENDTRY.
    */ End of custom project number assignment.
        WHEN cl_dpr_co=>sc_ot_phase.
          ASSIGN cs_attributes TO <ls_phase_attrs>.
          lr_phase ?= ir_common.
    */ Beginning of custom phase number assignment.
    */ End of custom phase number assignment.
        WHEN cl_dpr_co=>sc_ot_approval.
          ASSIGN cs_attributes TO <ls_approval_attrs>.
          lr_approval ?= ir_common.
    */ Beginning of custom approval number assignment.
    */ End of custom approval number assignment.
        WHEN cl_dpr_co=>sc_ot_individual_approval.
          ASSIGN cs_attributes TO <ls_individual_approval_attrs>.
          lr_individual_approval ?= ir_common.
    */ Beginning of custom individual approval number assignment.
    */ End of custom individual approval number assignment.
        WHEN cl_dpr_co=>sc_ot_checklist.
          ASSIGN cs_attributes TO <ls_checklist_attrs>.
          lr_checklist ?= ir_common.
    */ Beginning of custom checklist number assignment.
    */ End of custom checklist number assignment.
        WHEN cl_dpr_co=>sc_ot_checklist_item.
          ASSIGN cs_attributes TO <ls_checklist_item_attrs>.
          lr_checklist_item ?= ir_common.
    */ Beginning of custom checklist item number assignment.
    */ End of custom checklist item number assignment.
        WHEN cl_dpr_co=>sc_ot_task.
          ASSIGN cs_attributes TO <ls_task_attrs>.
          lr_task ?= ir_common.
    */ Beginning of custom task number assignment.
    */ End of custom task number assignment.
      ENDCASE.
    ENDMETHOD.

  • Managing Tasks in large projects

    I'd like to create DAQmx tasks inside the folder structure of my project (.lvproj).
    If I right-click on folder 'beamPath' and create a New DAQmx task, it results in the above.
    However, when I close the project and re-open, it's gone.
    If I right-click on 'My Computer' create task, close project and re-open, it's still there:
    Where does the task exist? is it a file I can view when looking at the file structure.
    I have a very large project divided into sub-systems that I test individually, I'd like the tasks for each sub-system stored within a folder called "tasks" inside the autopopulating folder structure of the Project.

    The task and all other DAQmx stuff is stored in the project (*.lvproj) auto-pop folders don't work because there is no file on disk for the task besides that xml file with the .lvproj extension.  Try opening the project with Internet Explorer- you'll see exactly what I mean and learn a lot about how DAQmx tasks live.
    Which brings up another "Nice-to-Know" tidbit of information.  Auto-populating folders were invented by the devil's mother.  Have you ever seen a shipping example that used them?  Did you know that project templates can't use them? (today, but I saw a CAR show up to change that)  Don't use them.  They were helpful to build projects out of llbs and get you going with projects but, they have limitations.  The project explorers's files view is a much more powerful tool to use to sync your file structure on disk with your virtual folder structure (If you want that that) Virtual folders hold things just as effectively since you can really only hurt yourself messing with the files on disk without using the project explorer anyway (Thats how you get conflicts.)
    Jeff

  • Getting AcceesViol​ationExcep​tion from NationalIn​struments.​DAQmx.Task​.Unregiste​rAsyncWait​Handle

    Hi,
    I'm using my own .net application that communicates with NationalInstruments.DaqMx.dll (version 9.7) in order to activate NiDaq in the following configuration:
    PXI -1033 chassis with two slots of PXI-6284, measuring differential voltage. This application was already running for some months and was tested under high performance - high sampling rate and long hours, with no problems so far. Recently we were trying a new use case - running short sessions (60 mins each) of measurements in sampling rate = 100 and samples per channel =100. after few iterations we keep getting access violation exception:
    Exception Info: System.AccessViolationException
    Stack:
       at NationalInstruments.DAQmx.Task.UnregisterAsyncWait​Handle(System.Threading.WaitHandle)
       at NationalInstruments.DAQmx.Internal.DaqAsyncResult.​AsyncOpDone()
       at NationalInstruments.DAQmx.Internal.AnalogMultiChan​nelMemoryOptimizedMultiSampleReadAsyncResult.WorkI​tem(System.Object)
       at System.Threading.QueueUserWorkItemCallback.WaitCal​lback_Context(System.Object)
       at System.Threading.ExecutionContext.RunInternal(Syst​em.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threa​ding.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.QueueUserWorkItemCallback.System.​Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWa​itCallback()
    Keeping the sampling rate as 100, but setting samples per channel to 1000 seems to solve this problem.
    Can someone explain me what is the cause of this exception?
    Thanks,
    Hadas
    Solved!
    Go to Solution.

    Thanks Mike,
    I attached the relevant code pieces. Generally, it is based on the example on NI-DAQ\Examples\DotNET4.0\Synchronization\Multi-De​vice\AIContAcquisition\cs.
    It has 4 classes:
    SyncTask - an abstract class that represents one task
    NiSyncTask - a derived class that does the actual access to DAQmx API
    TaskManager - an abstract class that manages several SyncTasks
    NiTaskManager - a derived class that manages NiSyncTasks 
    It's quite complicated, but I hope it will be helpful.
    Regards,
    Hadas
    Attachments:
    SynTask.zip ‏9 KB

  • Importing Outlook Tasks in the Project 2010 Standard

    When I import Outlook tasks in the project, only task name is imported but not duration, resource, start, and finish. Is that typical behavior?

    Thanks Julie! I had asked this "How do I make my plan do what I expect/want to see? I understand that there may be nothing wrong with the behavior I am seeing in this process
    and it could be that I have to do something different to include limited resource capacity
    per day and not per task." the suggested solution of resource leveling doesn't accomplish the behavior I am trying to set.
    As mentioned before, I want all resources to be available 80%
    per project not by task. Meaning they should be fully assigned to any task up to 6.4 hours and any allocation beyond 6.4 hours should be pushed to the next working day.
    Please advise.

  • Would you Open and Close DAQmx tasks within a function or Globally

    Hi Guys,
    This should start something.
    The subject is DAQmx Tasks.
    If you were writing a function that is called many times, say MeasureVolts (double *Value) to obtain a reading from an Analogue Input Channel.
    Would you.
    1. open and start the task inside the function, do the measurement and then close the task inside the same function.
    or
    2. open the task globally and later do the measurement inside the function using the global task then close the task only when the application is closed.
    I am mostly concerned with the overhead of task generation and closing, what do you guys and girls out there do?? and what is the general opinion?
    I would appreciate your views.
    Regards
    Paul.

    I would definitely NOT keep configuring and clearing (I think that's what you mean by open and close) the same task over and over.  I would configure once, read many times in my main app, then stop & clear once.
    I typically like to package such data acq into an "Action Engine" that keeps track of its own DAQmx task id so I don't need to sling that task id wire around into multiple parallel loops / vi's.  Attached is a very stripped-down example for Digital Input. 
    I would typically do more with error testing and would make the "Action" enum into a typedef custom control, but this gives you the basic idea.  The action engine approach works very nicely when there's a small # of different kinds of input parameters and output info needed to support all the necessary action cases.   When you start needing a large number of differnent kinds of inputs and outputs to support the desired actions, then you start having difficulty with (1) having enough terminals to wire and (2) remembering which inputs and outputs are meaningful for which actions.
    -Kevin P.
    Attachments:
    DI Action Engine.vi ‏75 KB

Maybe you are looking for