Will execution of VISA tasks with one DAQ (Dev1) in one VI block VISA tasks with the second DAQ (Dev2) in a second VI?

Hi all,
I have two functional VIs.  One loops a set of read and write tasks with Device 1 (NI USB-6008).  The second loops a set of write tasks with Device 2 (another NI USB-6008).  VI 2 has a massively slower timescale than VI 1, meaning that it must run in a separate loop.  Otherwise, VI 2 was created by copying and modifying VI 1, and shares variable names with it (though not, for example, global variables).  Both VIs are intended to run at the same time on the same PC.
However, if VI 1 is running at the same time as VI 2, none of the read or write operations to Device 1 in VI 1 are executed---but the VISA read and write operations to a serial device do work.  Upon stopping VI 2, all the functions in VI 1 work fine.
Though I configured the channels for the tasks using the DAQmx GUI, I execute the tasks using the DAQmx read and write commands, and have properly set the "create task" and "stop task" VIs outside the beginning and end of my loop, respectively.
Does anyone have suggestions for what might be causing this?  My thoughts so far:
a. Perhaps there is some conflict in variable names in memory between the two VIs?
b. Can LabVIEW for some reason not read and write two devices from two separate VIs? 
c. Do I need to avoid using DAQmx to configure these tasks (some sort of memory conflict)?
I know I can make it all work if I combine everything into one massive VI, but for my application it is far easier and better to have them in two separate VIs.
Thanks in advance for your help!
Solved!
Go to Solution.

In case anyone was wondering, I found the solution:
When I copied the original code to a new VI, it turns out that the timed loop structures in the new VI had the same object name in LabVIEW's execution structure as the timed loop structures in the original VI.  This was effectively preventing whichever VI was executed second from executing its timed loop.  (The serial read/write contined to work because it was in a different timed loop.) 
I found this error when I ran the VI in highlight execution mode, and noticed that the "error" output on the timed loop flashed.  When I wired it into my error stream, I found error -808, which explained the problem above.
I fixed it by right clicking on the timed loop, changing it to a while loop, and then changing it back to a timed loop and reconnecting any broken wires.  LabVIEW gave the new timed loop object a new name, and all was well in the universe.

Similar Messages

  • Background Execution Problem-Docking Container with 2 ALV Grids in one scre

    Hi Friends,
    I have created 2 ALV Grids in one screen - one below another using DOCKING CONTAINER.
    The objects are 'g_dock_cont' and 'g_dock_cont1'.
    I am getting the foreground output as expected with 2 ALV Grids.
    While executing in background (F9), I am getting only output of first ALV grid. Second ALV is not getting displayed in BACKGROUND(F9) mode.
    How to solve this.
    FORM create_objects.
    * Materials with data
      IF   g_dock_cont IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_top
            extension             = 300.
        ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid
               EXPORTING i_parent = g_dock_cont.
        wa_layout-grid_title =
              'Materials with Data'.
      ENDIF.
    IF NOT I_DETAIL[] IS INITIAL.
    CALL METHOD g_alvgrid->set_table_for_first_display
      EXPORTING
        IS_VARIANT                    = WA_VARIANT_STX
        IS_LAYOUT                     = wa_layout
      CHANGING
        it_outtab                     = I_DETAIL
        IT_FIELDCATALOG               = LIT_FIELDCATALOG[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    *MATERIALS WITHOUT DATA
      IF   g_dock_cont1 IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont1
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_bottom
            extension             = 300.
       ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid1
               EXPORTING i_parent = g_dock_cont1.
        wa_layout1-grid_title =
              'Materials without Data'.
      ENDIF.
    IF NOT I_MARA[] IS INITIAL.
    CALL METHOD g_alvgrid1->set_table_for_first_display
      EXPORTING
        IS_LAYOUT                     = wa_layout1
      CHANGING
        it_outtab                     = I_MARA
        IT_FIELDCATALOG               = i_fieldcat[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    ENDFORM.                    " create_objects
    Regards,
    Viji.

    Hi,
    What i was saying is that you need to code again for background mode of execution.
    AT END OF SELECTION.
    IF SY-BATCH EQ 'X'.
      PERFORM DISPLAY1.
      PERFORM DISPLAY2.
    In DISPLAY1 use REUSE_ALV_LIST_DISPLAY to display data from outtab1.
    In DISPLAY2 use REUSE_ALV_LIST_DISPLAY to display data from outtab2.
    For example : execute this report in background mode.this will not execute in online mode.
    After execution you will get two spools one for KNA1 and one for LFA1 data. Spool can be controlled via IS_PRINT structure.
    report  zrbackground.
    data gt_lfa1 type standard table of lfa1.
    data gt_kna1 type standard table of kna1.
    start-of-selection.
      select * from lfa1 into table gt_lfa1 up to 10 rows.
      select * from kna1 into table gt_kna1 up to 20 rows.
    end-of-selection.
      if sy-batch eq 'X'.
        perform display_lfa1.
        perform display_kna1.
      endif.
    *&      Form  DISPLAY_LFA1
          text
    -->  p1        text
    <--  p2        text
    form display_lfa1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'LFA1'
        tables
          t_outtab           = gt_lfa1
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " DISPLAY_LFA1
    *&      Form  DISPLAY_KNA1
          text
    -->  p1        text
    <--  p2        text
    form display_kna1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'KNA1'
        tables
          t_outtab           = gt_kna1
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " DISPLAY_KNA1
    Please let me know if its not clear or you need more info.
    Thanks,
    Abhishek
    Edited by: abhishek sinha on May 8, 2009 7:42 PM
    Edited by: abhishek sinha on May 8, 2009 8:45 PM

  • Importing From Excel file will not import assignments correctly where there are more than one assignment per task

    I am trying to import an excel file ... see below.   It appears if you select both Tasks and Assignments tables it will not allow you to do this, says file is not in a project recognized format.  So I import Tasks tab first then run the
    wizard again and import the assignments tab while selecting merge with project option.   This works with one exception:
    If there are more than one assignment per task.  It does not merge in the 2nd assignment, only the first.
    Is there a way to import a task with 2 or more assignments?
    Background
    To figure out what the format for the file needed to be, I started with a MPP file and from project saved as Excel and selected the "Project Template" file.  Now I am trying to import that XLS to see how it works
    ID
    Active
    Task Mode
    Name
    Duration
    Start
    Finish
    Predecessors
    Outline Level
    1
    Yes
    Auto Scheduled
    DS001
    3 days
    June 17, 2014 8:00 AM
    June 19, 2014 5:00 PM
    1
    2
    Yes
    Auto Scheduled
    MT001
    3 days
    June 17, 2014 8:00 AM
    June 19, 2014 5:00 PM
    2
    3
    Yes
    Auto Scheduled
    CT001
    1 day
    June 17, 2014 8:00 AM
    June 17, 2014 5:00 PM
    3
    4
    Yes
    Auto Scheduled
    CT002
    2 days
    June 18, 2014 8:00 AM
    June 19, 2014 5:00 PM
    3
    3
    5
    Yes
    Auto Scheduled
    DS002
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    1
    6
    Yes
    Auto Scheduled
    MT002
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    2
    7
    Yes
    Auto Scheduled
    CT003
    1 day
    June 20, 2014 8:00 AM
    June 20, 2014 5:00 PM
    4
    3
    Task   Name
    Resource Name
    % Work Complete
    Work
    Units
    CT001
    Engineer1
    0
    8h
    100%
    CT002
    Engineer2
    0
    16h
    100%
    CT003
    Engineer1
    0
    8h
    100%
    CT003
    Engineer2
    0
    8h
    100%
    Andrew Payze

    Andrew,
    I did a quick test using your example although I didn't include the Predecessor or Outline Level fields to keep things a little simpler. I imported the Excel data into a new Project file with a single import of task and assignment data. It is very important
    to set up the Excel Workbook correctly. On Sheet 1 I entered the task data (Name, Duration, Start). I did not include the ID or finish date as that is redundant - Project generates its own ID and will calculate the finish date based on the start date and duration.
    On Sheet 2 I entered the assignment data basically just as you show it except I didn't include the Units.
    The data imported as expected.
    John

  • I have a new computer now with windows 8. Old one was windows 7. The itunes library contains all I expect on new computer. Ipod will not sync with content. It says it is syncing but only picks up 1 tune. Solution please. I am on itunes 64 but it makes no

    I have a new computer now with windows 8. Old one was windows 7. The itunes library contains all I expect on new computer. Ipod will not sync with content. It says it is syncing but only picks up 1 tune. Solution please. I am on itunes 64 but it makes no difference from 32 bit.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • Hi, I live in the UK and have an ipad2 with wifi (no 3G). I plan to visit Canada in the summer and want to know how i can access the internet while i'm away e.g. can i purchase a 3G attachment that will give me access on a pay as you go basis. Thanks.

    Hi, I live in the UK and have an ipad2 with wifi (no 3G). I plan to visit Canada in the summer and want to know how i can access the internet while i'm away e.g. can i purchase a 3G attachment that will give me access on a pay as you go basis. Thanks.

    You can get Mifi devices (the iPad connects to it via wifi and they then give access to 3G networks). I've never used one and I don't know if they are available in Canada (and if so how much they would cost). If you have an iPhone then you could also use that as a mobile hotspot

  • Magic Mouse  question. I have set this in Preferences by ticking Swipe between pages with  one finger and also Swipe between full-screen apps with two fingers,  however when I try to do the latter, the 2 finger swipe will take me only to the dashboard and

    It's a Magic Mouse question. I have set this up in Preferences by ticking Swipe between pages with one finger and also Swipe between full-screen apps with two fingers,  however when I try to do the latter, the 2 finger swipe will take me from the app that I am on to the dashboard only and not to my other open apps.
    I also find that Smart zoom only works with some apps, for instance not with Word docs or email.
    How can I correct this please?

    Just figured out it also does not work with the Mail app.

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • I have two apple ID's, one with all my apps and one with only Mavericks. Will Mavericks update automatically if i'm not logged in to the apple ID I used to download it?

    I have two apple ID's, one with all my apps and one with only Mavericks. Will Mavericks update automatically if i'm not logged in to the apple ID I used to download it?

    Some things are mixed up here, seemingly...
    I seem to have two Apple ID's attached to my e-mail.
    An Apple ID is a valid email address, apparently. How can those be "attached to your email"... what email?
    Facetime will not verify my e-mail address because it is associated with the other account.
    This doesn't make sense. You can register multiple, even non-Apple-ID, email addresses and their aliases with FaceTime.
    So, maybe you can explain your problem better - what you want and the steps you've taken and what you have so far. If something doesn't work, please tell the exact error message, too.

  • Only one of my earbuds on my bose headphones works with my ipad, iphone and macbook- if I hold them there the right earbud will work, but for the life of me, I can't get them to both work. Why is this? And is Apple doing anything about this?

    Only one of my earbuds on my bose headphones works with my ipad, iphone and macbook- if I hold them there the right earbud will work, but for the life of me, I can't get them to both work. Why is this? And is Apple doing anything about this? While Apple's headphones have (finally) admittedly gotten better of late, I still prefer the much more comfortable headphones & sound quality that Bose makes and that I spent the money for.

    Bose Product Support

  • How do I use two DAQ cards in one Labview code? Current I'm getting error " error 200558 occurred at DAQmx Create Channel.vi. One task cann't contain multiple independent devices". Can someone help me?

    The two DAQ cards are NI PCI-6070E & NI PCI-6052E. The Labview I'm using is labview 7 Express and the Window system is Window XP. I'm using NI SCXI-1000 chasis and SCXI-1102 & 1102B two modules plus a feedthrough SCXI-1180. 1102 is connected through SCXI-1349 cable to DAQ card 6052E while 1102B is connected through SCXI-1349 cable to DAQ card 6070E. SCXI-1180 is connected to 6070E through SCXI-1349 adaptor on the back of 1102B.

    Sarah, thank you for replying my question. It seems that I'm making progress everyday (smile). I'm able to run the test using both daq cards in my code now. But as I'm moving forward, I'm getting new questions too. How do I use one STOP button to control both tasks and how can I save data into one single file?
    I attached my code here hoping you can get the specifics on my application by looking at the code. Thanks very much!
    Thanks.
    Attachments:
    DAQmx_Task_Example_plus_voltage_2.vi ‏416 KB

  • HT1918 I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me. There's a billing problem with a previous purchase. Please update your payment method. The program will not let me u

    I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me.
    There's a billing problem with a previous purchase. Please update your payment method.
    The program will not let me update, what am I doing wrong. rose165

    I would love to have a phone number to call someone with apple on this issue.

  • New itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari HELP

    new itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari after i type in the password PLEASE HELP ive turned on and off etc

    My guess is that the security settings on your router and iPod do not match.
    For a test, change your router so there is no security.  See if you can connect and get to the Internet. If that works, set up the router with security and use the same settings for the iPod.

  • In my system preferences, my sharing folder will not let me access it. All my photo booth share button is grayed out. One more thing, My photoshop will not let me import any photographs.  I believe this all has to do with this.  Any way to fix this issue?

    In my system preferences, my sharing folder will not let me access it. All my photo booth share button is grayed out. One more thing, My photoshop will not let me import any photographs.  I believe this all has to do with this.  Any way to fix this issue?

    The iTunes Store has no phone support and never has. Contacting them has always been via web form. Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • Will Apple exchange my iPod touch 4g with a new one if my current one is deffective

    Ok so, I got my iPod touch 4g (white) on June 19th after i made a bet with my moms boyfriend to not drink pop for a year
    So when I opened the iPod, it wouldnt connect to wi-fi. Guys, dont ask me to reset network settings or anything, because..
    IVE TRIED E-V-E-R-Y-T-H-I-N-G, but nothing has worked. So I called Apple and the guy on the phone said to go and make
    an appointment at the Genius Bar, so i did, for 1:30pm today.
    So my question is: Since the guy told me it's probably a deffective product, will Apple exchange my current iPod
    for a new one? (my current one has no scratches, still has the headphones & charger, with the manuals, the box, stickers & everything)
    Thank youu

    what do you mean by a refurbished one?
    Like a used one?? But what if i return the whole packaging (i kept the manuals & stuff, like everything )
    Could the person at the Genius Bar then give me a new one if I return the whole packaging ?
    Lol sorry for all the questions, I'm just really worried :/

  • Windows 8 Adobe Reader will not fully open a pdf compiled with several pdf's into one - why?

    Windows 8 Adobe Reader will not fully open a pdf compiled with several pdf's into one - why?

    Hi Michael,
    “AdbeRdr11003_en_US.exe” is the download installed on our CEO’s new Windows 8 laptop.  It is a Dell XPS Re: Windows 8 Adobe Reader will not fully open a pdf compiled with several pdf's into one - why? Dell XPS 13" .  It has a full install Windows 8 Professional for its’ Operating System.
    I’ll attempt to attach the file in question.  The file opens fine on our Windows 7, and XP computers (with  the proper Adobe Reader on each).
    Our CEO says there is a message that comes up saying he needs Adobe Flash.  I’m attempting to find out whether or not he is trying to open it the ‘Metro’ view, or the ‘Desktop’ view – no answer yet.
    If your system strips the attachment, let me know, and I’ll upload the file to an ftp site {if necessary}.
    Wayne Nault
    [personal info removed by moderator]

Maybe you are looking for