Accessing hardware board with two VIs simultaneously

Hello,
I have a NI BNC-2090 board that I use to interface with a multimeter (which I get my data from) and an ion gauge (which needs to have its filament current regulated and held constant). I have a VI which I've written that performs both the data acquisition and current regulation, but it can only do one of these tasks at a time, which is undesirable because the filament current drifts when the data is being gathered.
In order to prevent the filament current from drifting, I want to create two standalone programs that I can run in parallel, so that the filament current can be regulated continuously and so that data can be acquired on demand. I've attached two programs which I've made to do this.
Each of the attached programs does its job very well. The problem I have arises when I try to run them both simultaneously. The error I get is Error -50103, which tells me the specified resource (my board, if I understand this correctly) is reserved.
I tried to be a little more explicit in my task creation and I also tried defining global virtual channels in MAX to no avail.
Any help would be greatly appreciated.
Regards,
Ali
Solved!
Go to Solution.
Attachments:
Standalone DAQ.vi ‏40 KB
Standalone PID Feedback.vi ‏51 KB

Ali H. wrote:
Brian,
Having all my reads in one task and all my writes in another makes sense, especially after I learned that the board has only one A/D converter.
What I'm struggling with now is how to restructure my set up. Is there a way to share tasks between VIs and keep the VIs distinct like I want so that I can run them individually or together as I need? Or will that requirement force me to incorporate the VIs I posted as subVIs of another VI which passes the same read and write tasks to both subVIs? (If this is unclear, see attached png; the case structures are so I can choose which subVIs run and the while loop is there so I can turn them on and off).
Thanks.
Yes,  By adding in a Special type of Action Engine I've dubbed a "Resource Module" as a hardware access layer for yor task.  Since the Module is not re-enterant any vi can call the Resource Module without fear of causing DAQmx errors but, the second caller will wait for the first call to finish.   Here is an example notice that it keeps the resorurce discriptor (in this case a DAQmx Digital Out Task) on a Shift register to avoid the need for the caller to know what is going on with the resource (saves wires too).
Jeff
Attachments:
Attenuator.vi ‏30 KB

Similar Messages

  • Accessing same computer with two IPs without changing configuration in ARD

    Hi,
    This is probably a simple question but I cannot find a way to do it. I want to access a computer from both places: inside my home LAN and from internet. Obviously IP addresses will be different.
    I know my internal IP address which has been fixed by me. I know my router external IP address, and I have configured the router for doing NAT over my computer for Remote Desktop ports ( 3283 and 5900 ) also, this IP address has a DNS name assigned to simplify things.
    The setup works fine from both places but my question is how to setup the computer in Remote Desktop to avoid changing by hand the IP addresses every time I change my location: home or office.
    Regards,
    Joan

    Hello,
    thank you very much for your answers.
    For the rollback, I will reimport the original/default keys for all the image types, this should be ok.
    Here are the problems I have trying to pu Microsoft Office Picture Manager as default picture viewer (I just want  .bmp, .jpg ... files to be opened with Microsoft Office Picture Manager by default).
    1 Using new file type under Computer Configuration\Preferences\Control Panel Settings\folder options. : I define a new file type (BMP for example), associated class Bitmap Image, I configure the icon (imageres.dll,65) and an open action where OIS.EXE
    is the application used to perform the action.
    Result : Icon is correct, file type is correct, image files are opened with OIS.EXE (correct) ... BUT now Microsoft Office 2010 appears twice in open or open with menu
    2 Using new open with under User configuration\Preferences\Control Panel Settings\Folder Options : new open with preference, action (update or replace same result), file extension BMP, associated program (path to OIS.EXE), i check set as default.
    Result : Office 2010 opens image files (correct) but icon is Office 2010 one and the file type is now 'OIS.EXE' for all image file extensions I have specified ... so it won't be possible to sort the file by image type if I select that method...
    3 Using ftype : OIS.EXE doesn't open the file when I double click on it but Microsoft Office 2010 appears twice in the open or open with list ...
    I am a bit lost ... what is the best method to put Microsoft Office Picture Manager as default picture viewer, keeping the image type (Bitmap image, JPEG image etc) and without having Microsoft Office 2010 twice in the open or open with list ??
    Last question : by default an image file is opened and previewed with Windows Photo viewer and edited with Paint. I would like just to open images with Office 2010 but keep Windows Photo viewer for preview and Paint for edit ... Is it possible ??
    Thank you in advance for any help and support !!

  • One keybord linked with two computers simultaneously

    K so here is what I want to do. I want to link my apple bluetooth keyboard to my macbook pro and imac at the same time so that when I type on one computer in say MS Word the same type will show up on the other computer at the same time. Is it even possible with bluetooth?
    thanks!

    "Is it even possible with bluetooth?"
    No.

  • Using iTunes with Two Libraries Simultaneously.

    In the living room I have a Mac Mini with a large external drive running iTunes that I use as a media server. I recently got a new TV for the bedroom and have hooked my MacBook up to it. My laptop has the iTunes library that is synced with my iPod and keeps all my music files organized.
    Is it possible for the iTunes on my Laptop to share the library of the iTunes on my Mac Mini?

    Technically movie sharing does work as well, but it has terrible performance when trying to go through itunes. However if you turn on music sharing so that the itunes library shows up under sharing on the second computer, front row seems to work ok depending on how you have the movies compressed. Launch front row, go into sources at the bottom of the list, and select the library of the other computer. Give it a bit to load and you should be able to play the movies from the other computer there now.

  • How to synchronise with two monitors

    Dear NI,
                      I have an application, for that i want to show the two different screens with different mesurement values. i am using CRT and LCD screens. in CRT screens i am running main vi in this screens i have configuration, testsettings, trendmill,and operator name etc. are displayed, i need  the seperate screens for to show measurement values to another screen. how , is it possible to do this?  can able to two diferent exe with diferent monitors? and how to synchronise two monitors for my application.
    Balaji DP
    Application Engineer,
    Gantner Instruments.
    Labview 8.5 Version
    Regards,
    Balaji DP

    Hi Balaji,
    So if you have an extended desktop across two monitors then I would say you had two options.
    1. Within one VI you could simple design the front panel in such a way that it extends across both screens with the relevant information in the right screen.  The fact that there are two monitors present is transparent to the applications.
    2. With two VIs there is a property for front panels to choose which monitor they are displayed on.  This is available by wiring a VI reference to a property node and selecting front panel window >> monitor.  You then enter an id for the monitor you want it to be displayed on, this is a numeric e.g. your primary monitor will be zero. You can see the property node help page here. 
    I hope this is the information you are after.
    Regards,
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

  • How to use 2 1409 boards with sony xc55 to acquire 2 images simutaneously

    We want to use two 1409 boards with two sony xc55 cameras to acquire two images simutaneously. From the attached files, you will find what I have done and the problems. I just followed the example program from you. But it doesn't work well. Could you help me? thank you very much.
    Attachments:
    What_happen_now.doc ‏25 KB
    XC55_Asynchronous_Reset_ExampleTwo_Cameras1.vi ‏265 KB

    Kobel,
    Both cameras are being triggered at the same time, and both boards are aquiering the image at the same time. The problem you are seeing is related to copying the correct image.
    The IMAQ driver is not currently multithreaded, therefore your second copy opperation can not execute until your first one is done. The trouble is that you have the immediate terminal set to false which forces the copy to wait for the next available image before returning.
    Since the second copy does not execute until the first one is complete, it will consider the frame that just passed as old and wait for the next available frame.
    The quick solution is to change the immediate terminal to true on both copies. The best solution depends on your entie application. You may want to re
    ad this application note on Ring Aquisitions for ideas.
    Regards,
    Amaury Rolin
    NI Applications Engineer

  • Configuring one LDAP domain with two OU (one RO, another RW)

    Hi Team,
    My client is implementing NW 7.0 Enterprise Portal on SP14, AIX 5.3 & Oracle 10.2.0.4.
    We're using MS-ADS LDAP as an UME data source. The client wishes to configure UME for one single ADS LDAP (domain) with two OU (NOT domains) such that:
        1. One OU has read only access
        2. Second OU has read/write access
    Following is an illustration of the LDAP tree structure:
    CORP_DOM
    -- INT_USERS    (CN=IntUsers, DC=CORP_DOM, DC=NET) - read-only
    -- INT_GROUPS  (CN=IntUsers, DC=CORP_DOM, DC=NET) - read-only
    -- EXT_USERS    (CN=ExtUsers, DC=CORP_DOM, DC=NET) - read/write
    -- EXT_GROUPS  (CN=ExtGrp, DC=CORP_DOM, DC=NET) - read/write
       |-- SAccounts
       |--
       |--
    Note the single LDAP domain, multiple user and group paths with different access privileges.
    Based on what I've read so far, this does not seem feasible as the datasource configuration file has to have unique datasource id and the private section allows only one tag for user path and group path.
    I checked OSS, SDN but could only find information on configuring multiple domain/LDAP and not one LDAP domain but two OU/CN.
    Kindly let me know if anyone has come across or done such a configuration.
    Thanks.

    Hi GLM,
    You are right, access permissions to the OU are given to the service account used to access the directory from the portal.
    The issue I have is not about granting permissions - its more about whether it is possible at all to configure UME for one single ADS LDAP (domain) containing two OU (NOT domains). I'd need to access the directory with two different service users having differen access privileges.
    I don't see how it can be done, since the datasource id in the portal datasource configuration file has to be same as the domain and the private section allows only one tag for user path and group path.
    Thanks.

  • How to access hardware?

    Hi there,
    Could someone please tell me if it is possible to access hardware ports with java (i.e. like inport() and outport() in c)?
    Is there any separate API available? (-> NOT the COMM API!!!)
    If not, do i have to use JNI?
    Concluding, is there any commercial library that allows you to do this in java?
    Thanks in advance,
    John

    Hi again!
    I choosed to go on and use the JNI ability of java.
    I downloaded Borland c++ 5.5.1 which is a free 32-bit command line compiler for c++. I tried the "hello world" example in the JNI tutorial page and it worked great. However, when i tried to compile some code that contained the functions 'inportb' and 'outportb' (i.e. which is the reason of why i am using JNI) it tells me that these are undefined even if i imported the correct header files!
    After some search i find out that borland removed these functions for security reasons with windows! (WHAT!?)
    To conclude, my question is:
    Does anyone know any free c++ compiler that is able to generate .dll files and also supports the functions 'inportb' and 'outportb'
    Thanks a million times!
    John

  • For Experts: Why does LabView cause System reboot while accessing hardware with driver?

    Hello NI Developers!
    I use LabView 7.1 under Windows XP
    I have a programm console application which accesses through Jungo Windriver PCI-E board.
    This program works fine - and performs DMA data transfer between PC and Board's memory.
    In order to implement this console application work together with LabView I did following:
    1) Added this function inside the source:
     _declspec(dllexport) void LVMainFunction(uInt32 *IntValue);
    _declspec(dllexport) void LVMainFunction(uInt32 *IntValue)
        AllocConsole();                   //Open new console window
        SetConsoleTitle(L"Debug Window"); //Set a title for console window
        freopen("CONOUT$","a+",stdout); //redirec standard output stream to current window so
                                        // so we are able to see "printf" outputs
       freopen("CONIN$","a+",stdin);    //redirec standard input stream to current window so
                                        // so we are able pass inputs from keyboard
       main();                          //Call applications main function which does all the work
    2) Compiled this new source as DLL library
    3) Call  LVMainFunction(...) function from LabView using Call Library Node
    In the result: Executing VI - opens new console window, shows debug outputs and receives keyboard inputs.
    It works fine till the last function, which perform DMA data transfer - and reboots PC.
    1) Why does this happen?
    2) I understand that opening console from Call Library Node, attaches together this console window and running VI. So If I close one of them - both windows closes.
         So does LabView have somekind of restrictions of accessing Hardware's functions? 
    I can read Board's resource information and view size of memory on board, interrupt functions and other information about device, but when I try to reach
    DMA my system reboots. And I understand that this should be some kind of LabView problem, cause I tried different implementations, even without use of
    console window - and the result is the same.
    3) Should I split the program in to two separate processes and perform data exchange using Sockets or Pipes techology?
    Thank you in advance!
    ACiDUser
    Message Edited by ACiDuser on 11-13-2008 09:37 AM

    Hello!
    At LAST!!!
    I solved this problem!
    From the beginning I was following National Instruments manual on how to build DLL with external IDE:
      http://zone.ni.com/reference/en-XX/help/371361A-01​/lvhowto/building_library_project/
    Set the Struct member alignment control to 1 Byte.
    Now this option caused my PC to reboot!
    So could someone explain  why this happened? and If it is a bad tip, so it's better to remove from manual. Then other people will not have such problems as I did
    - wasting 2 monthes of time determining the problem. 
    I changed it to  Set the Struct member alignment control to DEFAULT.
    and now everything works fine.
    Regards
    Message Edited by ACiDuser on 11-13-2008 11:14 AM

  • Simultaneously trigger and display two camera images with two frame grabbers

    When I try to simultaneously trigger and display two camera images, each with their own frame grabbers, Labview is only able to display one of the images at a time.
    My hardware:
    Two Sony XC-EU50 cameras (not in sync with each other)
    NI-1410
    NI-1405
    My Software:
    Windows XP and Labview 7.1 with IMAQ
    I connect each camera to its own frame grabber.  Both frame grabbers are in the same computer.  I input a trigger into each frame grabber.  Both trigger signals are identical.  Trigger rate is only 0.2 Hz. 
    I want to display and save both images at the same time.  The program i put together only displays one image at a time.  The image that is displayed alternates from one camera to the other.
    Please help with any suggestions.
    Thanks.
    Shahab K.
    Attachments:
    TriggerTwoCameras.vi ‏137 KB

    Hi Shahab.
    Without having triggered two cameras connected to two NI boards with LabVIEW yet: This shouldn't be a limitation in LabVIEW.
    Updating two Image Display Indicators in one run of a while loop definitely works properly, so this cannot be the reason for the problem.
    Your code uses the IMAQ Snap.vi. This VI is not reentrant, so the both instances of this VI on your block diagram cannot execute at the same time.
    I could not find an appropriate example matching your scenario exactly. (Maybe someone else knows better?)
    I recommend to have a look at the examples in the "IMAQ Signal IO.llb" and do some copy and paste to get a VI that satisfies your requirements.
    The "Grab with two boards.VI" illustrates how to acquire images without using the not-reentrant "IMAQ Snap.VI".
    Hope this helps, Guenter
    P.S.: Do you know NI's Vision Forum? http://forums.ni.com/ni/board?board.id=200

  • Accessing shared time capsule disk with two accounts

    Hey guys,
    I have an airport time capsule (5th gen) and want to access a connected USB disk with my Mavericks macbook. This basically works fine: i can mount it using the finder (usually I do an automatic mount when starting my account, since I put the drive into the Login Items for my user), and the disk is secured with a disk password.
    However, I have a quite annoying issue when using two accounts on the same macbook, which is my standard use case as I share the macbook with my wife: Only the user that first accesses the disk can use it, the second user gets a "no access permission" error for the disk. The second user can then disconnect the drive and reconnect, but I find this very annoying, because I have to do it all the time, and I'm wondering if I'm the only user with this problem.
    Is there any way to specify access rights for the drive, such that I can access it with both accounts simultaneously? BTW, I've already tried to define specific access rights on the disk (Context Menu > Get Info > Sharing and Permissions), and I tried to change the disk security mode to "With accounts" and "With device password" - none of it made any difference.

    Only the user that first accesses the disk can use it, the second user gets a "no access permission" error for the disk. The second user can then disconnect the drive and reconnect, but I find this very annoying, because I have to do it all the time, and I'm wondering if I'm the only user with this problem.
    That is how Apple built it. No fixes.. no repairs.. it is a hassle of protected type file systems. Windows you can do all sorts of fudgery.. but the lack of protection (amongst others) is why you use a Mac.
    Is there any way to specify access rights for the drive,
    This is not a rights issues.. it is that one user at a time is allowed. Each user must logout before the next user can gain access..
    I do not know of any workaround.
    Pondini recommends using disk image for data on the TC.. since you can otherwise mess up the TM backup. See http://pondini.org/TM/TCQ3.html
    His comments don't apply to your usage of the USB drive.. but his workaround may help.
    I am wondering if you create the sparsebundle on the USB drive and allow everyone access, once mounted on the computer it might allow two user accounts access at the same time.. Sorry I have no need to try it and I cannot recall anyone attempting.. but it might present a way around the issue.. !!

  • Simultaneous sync with two exchange servers - will it ever be possible?

    I fully understand that this is not possible at present (one has only to try to get a very clear pop-up message). I also understand that nobody can predict (or is willing to say) what is coming in future releases. My question is whether or not simultaneous syncing with two exchange servers is even theoretically possible. I don't undertstand exchange/ActiveSync well enough to even know if it's in the realm of possibility.
    If not, I'll try to find another way to do what I want (Gmail for calendar and contacts and work for mail, calendar and contacts) - I am open to suggestions. If it is, I'll have to figure out how important one (or the other) is to me for now and wait for the day when I can have my cake and eat it too.
    Thanks.

    I'm not sure if this is an ActiveSync limitation, but it might be since I don't believe accessing more than one Exchange account via ActiveSync with a Windows Mobile device is supported either, and ActiveSync and Windows Mobile are Microsoft products.

  • Communicate to Two instruments Simultaneously via VISA

    I'm thinking of ways of solving my problem, but I've run in into a question I cannot answer.
    Say I'm communicating with my instrument (Instrument 1) via VISA. Now at a particular point in my program (say, when "Function XYW" is executed), I want to send a command to another instrument (Instrument 2). Is this possible? Is it really as easy as  setting up  two VISA connections within my program?
    Thank you,
    Alex

    You can have multiple instruments connected and working at the same time on the same PC.  However, if you are using GPIB, although you communicate to the instruments in parallel, they will not communicate simultaneously.  It will be nearly at the same time.  So you can't use the PC to trigger the start of an acquisition and have them start at the very same time.  There are tricks you can do on some instruments, but let's not go into that...
    Now it also depends on your definition of "at the same time"...  If you allow 4 to 100 ms delay between the two, then yes, you should be able to accomplish that.  However, you will have to be careful of Query commands or when reading data back from an instrument.
    R

  • How to access a shared disk with two users account on same Mac

    I am seeking how to share / access at same time with two accounts on a same Mac a disk that is shared with a TC or an AEBS. When a user account is connected to the shared drive and when I switch to the 2nd user this 2nd user cannot access / see the content of the shared drive and it receives an error message. I want to use this shared drive to store some GB of movies I do not want to have on my MacBook Pro SSD but still bring able to access them from the two accounts that are set on my Mac. Just like for an internal drive. I have tried all I could but it does not want to work. How do I do that ? Thanks.

    If you were running this software, the Mac's Bonjour would automatically "discover" The Linux machine.
    http://en.wikipedia.org/wiki/Avahi_(software)

  • Can I make a hardware raid with the on board Marvell SE9128 chip on p67a-gd65?

    Hi,
    as you all know the RAID 0/1/10/5/JBOD with the p67 chipset are pure software raids or "fake" raids. I saw some sata-raid pcie 2.0 x1 cards on the sell which have the Marvell SE9128 chip. So my question is: Can I make a hardware raid with the onboard Marvell SE9128 chip on the p67a-gd65?
    Thanks
    --pepe

    Quote from: Stu on 06-November-11, 02:31:26
    Hardware RAID explained:
    http://www.pcguide.com/ref/hdd/perf/raid/conf/ctrlHardware-c.html
    What do you want to say with this? I know what's the difference between a software (fake) and hardware raid? Your post doesn't answer the question. The p67-chipset has integrated software raid. The marvell se9128 is also found on some hardware raid cards. That's why I'm still wondering if it is for a hardware raid on this board or not.

Maybe you are looking for

  • Open/close file in while loop

    VI reads 3 temperature sensors connected to RS232 port ( external rs232/RS485 converter , sensors have different addresses). When VI starts , user is asked to chose location and filename of data log file for each sensor ( write to the same file or to

  • Calendar Crashing in OS X Mavericks

    Hi. After upgrading to Mavericks, cannot use Calendar. Crashes with below message seconds after launch. Tried all the work arounds in the forum and internent. None working for me. Is there any working solution for this? Thanks Amin Process:         C

  • Issue certview exam history result

    Hi i got an issue to view my score report in certview... Issue is i had taken my 1Z0-238 (Oracle EBS R12: Install, Patch and Maintain Oracle Applications) exam with personvue.. from a few days in cert view Exam History in Grade Indicator it says REVO

  • Unable to connect to service on OVI store...

    so i'm trying to download some apps for my N8, i was able to download 1 app and after that it won't connect at all. it says, "unable to connect service..." i have no problem going to other sites... RANDi

  • Class loader probelm

    Hi all, I am using IAS 6.0 with sp1 on windows NT system .I deployed my applications in two servers which are in a cluster.I deployed two applications using one dll file.When I am navigating through the site , first i gone through one application acc