Multithrea​ding with DLL function seems to run serial in stead of parallel

The following problem was posted earlier in the Knowledgebase. I have the same problem only in LabVIEW 6.1, which is according to the solution fixed.
Am I doing something else wrong?
Problem: When I run DLLs (built in LabVIEW 6.0.x) in a multi-threading environment, it seems like my calls are being run in series
rather than in parallel. Why is this happening, and how can I fix it?
Solution: LabVIEW 6.0.x only creates 2 data spaces for re-entrant VIs that are LabVIEW DLL entry points. Therefore, only 2
calls can happen concurrently (run the same LV DLL entry point in parallel.) This means that if you launch 6
threads to run the
same LabVIEW DLL entry point, your 6 threads will run serially in pairs of two. With the release of LabVIEW 6.1, this has been
fixed to allow for a more true multi-thread capability.
Attachments:
dlltest.llb ‏199 KB

One problem is that if both threads are trying to access the same hardware resource (PCI-bus card) those accesses could be serializing the calls.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Create image buffer with dll function

    Hi,
    I have a usb barcode scanner which I control with a bunch of functions in a dll file. I used the wizard which was pretty straightforward. Now I can send most of the commands I want but have a slight problem when initializing image mode. There is a createimagebuffer function but it wants a string input, "a pointer to the destination buffer for image data returned from the scanner". What am I suppose to point at and how do I do it? Im new to this (first time experimenting with dll files) so I may have missed something important.
    Regards
    Andreas

    It should point to a string. The string should be large enough, e.g. it
    should have a lot of characters in it. If the function also has a length
    input, you can configure the dll so that the string length is automatically
    linked to that input.
    Regards,
    Wiebe.

  • Multithrea​ding with error check

    hi
      how to use orror in and orror out  in multithreading procedure?
      for single threading procedure ,we can use error in and error out to controll error
      for multithreading procedure, we can use one error in but have many error out ,I only want to use one error out.
      thanks your helps .
    sonic
    Sonic
    Diffrent Strokes for Different Folks

    Hi sonic,
    there's a 'Merge Errors' function. Up to LV7.1 it can be found in the time&dialog palette.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Wrapper for invoking external DLL-function

    I want to run a Host-Command (e.g. rwrun60 report=xyz.rdf batch=yes) invoked by a trigger that fires when a new record is inserted.
    I wrote a DLL which has an exported function that accepts a commandline (with parameters) and invokes the command via ShellExecute.
    The problem is, that when i invoke the PL/SQL-wrapper, the DLL-function is properly run, but the program i want to run is only visible in the taskmanager(NT) and does nothing.
    So what i need is a correct wrapper for the function:
    DLL-function: OExecSysCmd(cmdLine *char)
    Wrapper:
    PROCEDURE OExecSysCmd(p_SysCmd in char)
    IS EXTERNAL
    NAME "OExecSysCmd"
    LIBRARY demolib;
    Thanks in advance
    Dannys

    Hi Russ,
    with "invoke an external dll" I mean that I have to wite a log file to register my fdk client events and to do this I have to use an external dll wich exposes some functions to write to a common log file. I have imported the external dll in my client project and at the beginning of client code I have included the dll header file:
    #include "LogDll.h"
    Then I've tried to invoke a LogDll function (not within F_ApiInitialize (), but in a custom dialog box event):
    int retval=LogDllFunction();
    The code compiles, but if I start FM, I receive the message error. If I comment the line above, FM and my client start normally.
    Thanks,
    Stefano

  • Problem with CONTAINS function

    Hi all!!
    i got a problem with contains function. i'm running oracle 11g.
    if i execute this query:
    SELECT x.lid as id,  x.sztitular as titular, e.szname as proName, x.szresumen  as resumen, b.sztitle  as catName,
    f.szname  as secName, d.szname  as cliName, x.datecreation as datecreation
    FROM CPR_PRACTICAL_CASE x,ctg_category b, CPR_CLIENT d, pro_product e, CAT_SECTOR f, CPR_PCASE_PRODUCT g, CPR_PCASE_SECTOR h,
    PRO_PRODUCTCATEGORY i WHERE  x.lid = g.lpcaseid and e.lid = g.lproductid and x.lid = h.lpcaseid
    and f.lid = h.lsectorid and x.lclientid = d.lid and i.lproductid = e.lid and  b.lid = i.lcategoryid
    AND x.szlocale = 'es-ES' AND  x.bavailable = '1'i get 1 row as result with the column sztitular = "rodillos de medidas"
    if i only add one more sentece to that query:
    AND CONTAINS( x.sztitular, 'rodillos',1) >0the query returns an empty set.. i really don't understand why because the term "rodillos" is present in the row's column called "sztitular"...
    i've put an index on that column:
    create index ITXT_TITULAR on CPR_PRACTICAL_CASE(sztitular) INDEXTYPE IS CTXSYS.CONTEXT;any help?
    many thanks!!!!
    Edited by: ElMazzaX on May 21, 2012 5:51 PM
    Edited by: ElMazzaX on May 21, 2012 5:53 PM

    How are you synchronising the index?
    http://docs.oracle.com/cd/E11882_01/text.112/e24435/ind.htm#i1008452
    Also see the Oracle Text forum:
    Text

  • PDA: Calling library functions - seems to link the stubbed .cpp file instead of the DLL

    I'm having trouble developing a Lab View PDA module that calls a DLL built using Visual C++. The DLL functions correctly when called in a non-PDA VI. My issues seem to be with porting to the PDA.
    My configuration:
    - Lab View 8.5 with the PDA 8.5 module
    - Visual Studio 8.0 with the Windows Mobile 6.0 SDK
    - ASUS 626 PDA with an Intel PXA70 procesor running Windows Mobile 6 Classic
    Following the PPCBatt example code provided with the PDA module, I have:
    - used extern "C" to prevent name mangling
    - placed the DLL built with the Windows Mobile SDK in the \Windows directory on the PDA
    - created a stub Win32 DLL and lib
    - created a stubbed cpp file whose functions only return zero
    - included the stubbed cpp and lib files in the build spec / source files / additional files
    - placed Call Library Function nodes on my PDA VI, selected the function names, set the parameter types
    - built and deployed the executable, both with and without debug
    When I set the library path property of the Call Library Node, the functions appeared in the function name pulldown, but the parameters did not populate. I had to manually add them and set their types. The help page says they would autopopulate when the function was selected.
    I've debugged the VI, and the Library Function Call nodes are being called. It seems the build is linking the code from the stub C file provided in the additional files portion of the source files property page, instead of adding hooks to call the DLL on the PDA. As a test, I changed an output parameter in one of the functions in the stubbed cpp file - the changed value showed in the front panel indicator.
    What am I doing wrong?
    Dan

    Hi Dan,
    I'm not sure if I understood you problem fully. When calling external code with LabVIEW PDA, the DLL acts as a stub DLL with the correct function prototypes for the C code that you want to call. Here's a Knowledge Base article that might help explain about calling External Code in LabVIEW PDA.
    Regards,
    Stanley Hu
    National Instruments
    Applications Engineering
    http://www.ni.com/support

  • The Firefox find function seems to have become CAPS or non-caps specific, so that typing a word in non-caps will not find matching words with one or more capital letter.

    The find function seems to have changed in Firefox. Before, when doing a (CTRL + F) find, the search was not CAPS-specific or non-caps-specific. In other words, if I typed in "firefox" (no caps), it would find the words "firefox", Firefox", or "FIREFOX", regardless of capitalization. Now, however, the find function will only match the exact same capitalization. This totally undermines the usefulness of the function, and is a major hassle. Please fix it.
    == This happened ==
    A few times a week
    == I noticed in in the last two or so weeks.

    I am having a similar problem. The following page has the word Dangerfield in several times. My browser will get to Dang and turns pink
    http://www.genuki.org.uk/big/eng/HEF/ProbateRecords/WillsD.html
    Is it my Browser or is there a problem with Mozilla?
    I have also noted on other Google searches the same problem. Te term is listed in the page but Ctl F will not find the term

  • Since loading Lion, I've experienced much more instability than Snow Leopard. In particular, Mail crashes with regularity, full-screen apps seem to run slower and show the beach ball more often for longer, etc.  I'm disappointed with the performance. Any

    Since loading Lion, I've experienced much more instability than Snow Leopard. In particular, Mail crashes with regularity, full-screen apps seem to run slower and show the beach ball more often for longer, etc. I love the features, but I'm disappointed with the performance. Any help coming from Apple?  I've been sending them so many reports after crashes, that their file must be full!

    Summoning max. courage, I did what you advised. Here is the result. What does this tell you? My Lion 7.2 (mid 2011 iMac) has several annoying glitches (which I have so far tolerated through gritted teeth) but none that have actually stopped me working.
    BTW, I see several items involving CleanMyMac which I did not know I had. It is generally villified as a trouble-maker. Spotlight can't find an app. or a utility of that name. How can I get rid of what's there please? Just delete?
    Last login: Thu Nov  3 20:55:11 on console
    Steve-Kirkbys-iMac:~ stevekirkby$ kextstat -kl | awk ' !/apple/ { print $6 $7 } '
    com.AmbrosiaSW.AudioSupport(4.0)
    Steve-Kirkbys-iMac:~ stevekirkby$ sudo launchctl list | sed 1d | awk ' !/0x|apple|com\.vix|edu\.|org\./ { print $3 } '
    Password:
    com.openssh.sshd
    com.stclairsoft.DefaultFolderXAgent
    com.microsoft.office.licensing.helper
    com.bombich.ccc.scheduledtask.067493DB-2728-4DF3-87D8-092EF69086E8
    com.bombich.ccc
    com.adobe.SwitchBoard
    Steve-Kirkbys-iMac:~ stevekirkby$ launchctl list | sed 1d | awk ' !/0x|apple|edu\.|org\./ { print $3 } '
    com.sony.PMBPortable.AutoRun
    uk.co.markallan.clamxav.freshclam
    com.veoh.webplayer.startup
    com.macpaw.CleanMyMac.volumeWatcher
    com.macpaw.CleanMyMac.trashSizeWatcher
    com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae
    com.adobe.AAM.Scheduler-1.0
    Steve-Kirkbys-iMac:~ stevekirkby$ ls -1A {,/}Library/{Ad,Compon,Ex,Fram,In,La,Mail/Bu,P*P,Priv,Qu,Scripti,Sta}* 2> /dev/null
    /Library/Components:
    /Library/Extensions:
    /Library/Frameworks:
    AEProfiling.framework
    AERegistration.framework
    ApplicationEnhancer.framework
    AudioMixEngine.framework
    FxPlug.framework
    NyxAudioAnalysis.framework
    PluginManager.framework
    ProFX.framework
    ProMetadataSupport.framework
    TSLicense.framework
    iLifeFaceRecognition.framework
    iLifeKit.framework
    iLifePageLayout.framework
    iLifeSQLAccess.framework
    iLifeSlideshow.framework
    /Library/Input Methods:
    /Library/Internet Plug-Ins:
    AdobePDFViewer.plugin
    EPPEX Plugin.plugin
    Flash Player.plugin
    Flip4Mac WMV Plugin.plugin
    JavaAppletPlugin.plugin
    Quartz Composer.webplugin
    QuickTime Plugin.plugin
    SharePointBrowserPlugin.plugin
    SharePointWebKitPlugin.webplugin
    Silverlight.plugin
    flashplayer.xpt
    iPhotoPhotocast.plugin
    nsIQTScriptablePlugin.xpt
    /Library/LaunchAgents:
    com.adobe.AAM.Updater-1.0.plist
    com.sony.PMBPortable.AutoRun.plist
    /Library/LaunchDaemons:
    com.adobe.SwitchBoard.plist
    com.apple.remotepairtool.plist
    com.bombich.ccc.plist
    com.bombich.ccc.scheduledtask.067493DB-2728-4DF3-87D8-092EF69086E8.plist
    com.microsoft.office.licensing.helper.plist
    com.stclairsoft.DefaultFolderXAgent.plist
    /Library/PreferencePanes:
    .DS_Store
    Application Enhancer.prefPane
    Default Folder X.prefPane
    DejaVu.prefPane
    Flash Player.prefPane
    Flip4Mac WMV.prefPane
    /Library/PrivilegedHelperTools:
    com.bombich.ccc
    com.microsoft.office.licensing.helper
    com.stclairsoft.DefaultFolderXAgent
    /Library/QuickLook:
    iWork.qlgenerator
    /Library/QuickTime:
    AppleIntermediateCodec.component
    AppleMPEG2Codec.component
    DesktopVideoOut.component
    DivX 6 Decoder.component
    FCP Uncompressed 422.component
    Flip4Mac WMV Advanced.component
    Flip4Mac WMV Export.component
    Flip4Mac WMV Import.component
    LiveType.component
    /Library/ScriptingAdditions:
    .DS_Store
    Adobe Unit Types.osax
    Default Folder X Addition.osax
    /Library/StartupItems:
    Library/Address Book Plug-Ins:
    Library/Frameworks:
    EWSMac.framework
    Library/Input Methods:
    .localized
    Library/Internet Plug-Ins:
    Library/LaunchAgents:
    com.adobe.AAM.Updater-1.0.plist
    com.adobe.ARM.202f4087f2bbde52e3ac2df389f53a4f123223c9cc56a8fd83a6f7ae.plist
    com.macpaw.CleanMyMac.trashSizeWatcher.plist
    com.macpaw.CleanMyMac.volumeWatcher.plist
    com.veoh.webplayer.startup.plist
    uk.co.markallan.clamxav.freshclam.plist
    Library/PreferencePanes:
    .DS_Store
    Perian.prefPane
    WindowShade X.prefPane
    Library/QuickTime:
    AC3MovieImport.component
    Perian.component
    Library/ScriptingAdditions:
    Steve-Kirkbys-iMac:~ stevekirkby$

  • My Macbook Pro has a black screen when running in Bootcamp Windows 7. Since I updated the mac side my windows side now starts up with completely black screen - no prompt, nothing, Cap keys still light up as does mouse and DVD drive seems to run.

    My Macbook Pro has a black screen when running in Bootcamp Windows 7. Since I updated the mac side my windows side now starts up with completely black screen - no prompt, nothing, Cap keys still light up as does mouse and DVD drive seems to run.
    Will not show up in safe mode, will not show when started from Windows 7 DVD.
    I suspect the Mac update wiped out my PC video drivers but can not think of a way to re-install?
    Can see the PC volume from Mac side with files.
    I've looked at all the online solutions so far and have tried most of them without success. Please help!
    Specs:
    2009 Macbook Pro, 3.06 GHz Intel 2 core, Max 10.6.8.
      Model Name:          MacBook Pro
      Model Identifier:          MacBookPro5,2
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          3.06 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache:          6 MB
      Memory:          4 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          MBP52.008E.B05
      SMC Version (system):          1.42f4
      Serial Number (system):          7302300GANE
      Hardware UUID:          B2D4B4B4-CD92-5C7A-BDC2-527D30DD8DF3
      Sudden Motion Sensor:
      State:          Enabled

    EDIT: RESOLVED
    For anyone else who finds their way here like I did, this link did it for me: https://forums.geforce.com/default/topic/527599/windows-8-issues-solved-please-r ead-if-you-39-re-having-black-screen-and-or-flickering-/
    Specifically, the posts by Dunsany and valkyr did the trick.  I booted in safe mode, uninstalled and deleted the Nvidia driver, disabled automatic driver installation, and restarted normally.  I then manually downloaded and installed the previous Nvidia driver for my graphics card (which at the time of this writing was 335.23, rather than the latest which was 337.88), and everything is now bueno!
    Two hiccoughs along the way: First, when I tried to uninstall the Nvidia driver the first time, when I restarted I got the login screen (which was a good sign), but it quickly went black again.  I powered down, restarted in safe mode again, and repeated the uninstallation process, and it worked the second time.  Second, when I started the manual install of the 335.23 driver, the computer played a sound similar to the one for disconnecting a USB device, and the screen went black.  I'd seen a lot about trying to increase the brightness (though it hadn't worked up to this point; but if you haven't tried it yet, might as well); I tried it, and it worked! So far I'm back up and running. [/fingers crossed]
    Hope this helps someone else!

  • Having trouble with Tiscali/TalkTalk site when accessed with 'FireFox', can't 'reply' to emails or report 'spam', other functions seem ok

    Having trouble with Tiscali/TalkTalk site when accessed with 'FireFox',
    can't 'reply' to emails or report 'spam', other functions seem ok
    == This happened ==
    Every time Firefox opened
    == On/Off few months now all time

    Try deleting cookies and cache:
    1. Tools| Clear recent history
    2. Time range to clear: Everything
    3. If it isn't already selected, select '''Cookies''' and '''Cache'''
    4. '''Clear now'''
    <u>Check cookie exceptions</u>
    1. Tools | Options | Privacy Panel
    2. Set '''Firefox will: Use custom settings for history''' Insure Accept cookies for sites and accept third-party cookies is selected
    3. Click '''Exceptions'''. If the misbehaving site is in that list, select it and click '''Remove site'''
    Also see [[Updating Firefox]]

  • Interface with SHBrowseForFolder Function (shell32.dll)

    Dear OTN members,
    Anyone there know how to interface with SHBrowseForFolder
    Function in "shell32.dll" Windows NT's library ?
    Regards
    Khoo
    null

    I am currently using oracle developer Forms4.5 (release 1.6).
    TQ
    Regards,
    Khoo
    null

  • Need help about a dll with panel function

    Hello,
    I try to create a DLL file with a graphical panel, and i want to use it on an other platform with visual c++ compiler.
    to release this DLL, i use an UI and generate a code with the option : Tools\UI to Code Converter.
    now i have a code which can create a user interface without the file .uir
    During the compilation there is no error, but when i want to test/execute it on Visual C++, I have an error message : The memory cannot be read, address 0x00000000.
    Someone can help me about this? and if you want my project to see the code, i can give it.
    thanks.

    One quick question: are you trying to avoid needing to install the LabVIEW runtime on the target machines?  If so, I don't believe packaging it in a DLL will accomplish that.  (Correct me if I'm wrong, but I think LabVIEW created DLLs still have dependencies on the LabVIEW runtime.)
    In general though, I agree with your suspicion as to why it isn't working.  One test you could perform to clarify the situation would be to added another VISA write and DLL read in line after the second form in your attached JPG.  If the resource is hosed up after your DLL read also, I agree, it would point to the DLL calls causing the resource to hang.  Perhaps the process of translating the VISA resource name from a string to the actual resource object causes the VISA session to be tied to the scope of the DLL function call (hence automatically releasing when the call is completed)?  If so, maybe passing the actual VISA resource name would help.  The VISA resource is really nothing more than a pointer to an object (a LVRefNum).  From the perspective of language independence, I think that probably amounts to a 32-bit integer.
    Also, perhaps you could just avoid building this level of granularity into the DLLs?  The idea of creating a DLL is to abstract away some complex task.  I'm not sure what benefit you get of creating DLLs out of such basic functions.
    Anyway, good luck. 

  • "Automatic running highlight with cursor"function exists on Crystal report?

    Dear sir,
    Is there "Automatic running highlight with cursor" function in Crystal report ?
    Thanks a lot in advance for your advice!
    Best regards,
    Lai Oberdorf

    Dear Ingo,
    thanks for your help always.
    Automatic highlight with the cursor, is like the report on the following link :
    http://www.ibm.com/annualreport/2007/cfs_cf.shtml
    The highlignt is automatically showed up with the mouse cursor places on the report.
    Thanks a lot !
    Best regards from Walldorf:-)
    Lai

  • Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Using the Mac with your iPad has nothing to do with the fact that the iPad is running slow. There could be any number of reasons why the iPad is now running slow.
    Have you tried a reset on the iPad?
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I can't seem to run my Playlist under Yahoo Music.. it runs fine with IE 9 but not Firefox 4 .... any idea why?

    I can't seem to run my Playlist under Yahoo Music.. it runs fine with IE 9 but not Firefox 4 .... any idea why? I can run a single song just not my playlist.
    Thanks.

    Had this problem for quite a while but found a work-a-round. I click anywhere in the text I want to delete and insert any character. I am then able to block and delete any text I want to. It's been working great.

Maybe you are looking for

  • Error in info type 0001

    Hi all when hired an employee, while saving 0001 info type inpa40 system shows one error " Define a fiscal year variant first for company code 9369" anyone solve prob thanks and regards Seenu

  • Third party software question

    I have been a Norton Utilities, Antivirus user. I am looking into replacing this as Symantec has stopped supporting MAC platform, I'd like to know what programs out there you may like or dislike and a little about why? I'd like to find something that

  • Bonus afl live 12 month offer to me not working

    I have bee advised by the Telstra complaints team yo get in touch with you as my afl live bonus 12 month subscription is not working. It says no subs linked yo my afl account. Please can you help. Regards Tim Jackson

  • How to add an entry in the currency conversion table

    Hi all, I am loading data to ODS from 2LIS_11_VAITM. i am getting an error as below in a record.How do we enter a missing entry in the currency conversion table? Please help. Kind Regards, Shanbagavalli.S Enter rate EUR / EUR rate type 00000000 for 2

  • JUTableSortModel throws NPE if table has no rows

    Hi people, I place this here in case its not known about .... Clicking on a column header in an empty table produces this (JDeveloper 9.0.5): java.lang.NullPointerException      at oracle.jbo.uicli.jui.JUTableSortModel.sortByColumn(JUTableSortModel.j