Current Position:Home > Strange problem of calling library function node in labview 2010 and 2011

Strange problem of calling library function node in labview 2010 and 2011

Update:12-10Source: network consolidation
Advertisement
one year ago,I develop a program to usb device data and it works well,in labview 8.6 or 2009(win xp).Recently, When I test
the program in labview 2010 and labview 2011(win xp).,the program always crash immediately.I check the program and find main
problem is in call library function node. In my program,I use labview 2009 library for the USBExpress driver for
Silicon Labs USB MCU's from:https://decibel.ni.com/content/docs/DOC-9522,for example, 2 functions SI_OPEN and SI_READ
can not work well.
the header definition of SI_OPEN and SI_READ is:
SI_STATUS WINAPI SI_Open(
DWORD dwDevice,
HANDLE* cyHandle
SI_STATUS WINAPI SI_Read(
HANDLE cyHandle,
LPVOID lpBuffer,
DWORD dwBytesToRead,
LPDWORD lpdwBytesReturned,
OVERLAPPED* o = NULL
the SI_STATUS is equivalent to int type.
orignally, for HANDLE * in SI_Open, the parameter type in call library function node is numeric, data format is unsigned 32 bit integer ,and pass pointer to value.
for HANDLE in SI_Read, the parameter type in call library function node is numeric, data format is unsigned 32 bit integer ,and pass value.The program works well in labview 8.6&2009,however,crash in labview 2010 &2011.
later,I debug the program, for HANDLE *, I choose parameter type in call library function node as adapt to type, data format is point to Handles.for HANDLE, I choose parameter type in call library function node as adapt to type, data format is Handles by Value.Crash not happend in labview 2010&2011,however,it cannot read any data from from USB device correctly as before.I can not find the reason.
Dear friends,I need your help to answer the problem. Thank you.

The Best Answer

Advertisement
Based on the help page it looks like it should execute asynchronously.
The thing in the description that leads me to believe they execute asynchronously is that you can configure the library to run as a multi-threaded operation.
Please take a look here to see the difference between synchronous and asynchronous execution.
Since the code even has the ability to be multi-threaded, you can consider it as running in parallel to your other code.
Any data returned is passed to the thread that called that function.
Cory K
  • Strange problem of calling library function node in labview 2010 and 2011 Update:12-10

    one year ago,I develop a program to usb device data and it works well,in labview 8.6 or 2009(win xp).Recently, When I test the program in labview 2010 and labview 2011(win xp).,the program always crash immediately.I check the program and find main pr

  • Is a call library function node in LabView 8.6 synchronous or asynchronous? Update:11-30

    I tried setting a sub-VI with a call library function node in it to "subroutine" execution status.  The error list indicated that the Call Library Function node in the block diagram was an asynchronous node.  The LabView on-line help content ind

  • Window doesn't close wheh Call Library Function Node set to Run in Any Thread Update:10-11

    This is a problem regarding Call Library Function Nodes running in the UI thread or any thread. I have a camera which has its own API supplied as a dll. I have created a set of VI wrappers which each call a function in the dll through a Call Library

  • Call Library Function Node.vi using problem Update:11-30

    Hi,   我用Labwindows 编了个读文件的程序然后生成动态库, 然后在LabVIEW里调用该动态库(Call Library Function Node), 即向该动态库传递文件名及路径和某一字符串,然后该动态库打开相应路径文件从中读出并返回三个参数值,可是每次的返回值总显示打开文件失败, 该函数在Labwindow里没有问题. 在LabVIEW里如何调试来确定传到动态库的参数格式是没有问题的呢?任何的指点迷津,不胜感激! Frank,xiejiezhou wrote: Thank G

  • Problem in call library function Update:10-11

    Hi, I encountered some problems when using call library function node. After i select the path in configuration of call library function node, an error message is shown as 1st attachment. After i tick and the specified path on diagram, link the path

  • Call a special function in the dll using Call Library Function Node???? Update:11-30

    Dear all,       I am calling a special function in the dll using call library function node. There is a input parameter that it is a enum type in this function. I don't know how to deal this parameter for calling this function.Has anybody solved this

  • Call Library Function Node 'Wrapper.C​reate': Library not found or failed to load. using windows 7 64 bits Update:11-30

    Dear all I try to interface my spectrometer (NIRquest from ocean optics) using labview on my 64 bits cumputer using windows 7. I have absolutely no problem to run the spectrometer with the program dedicated to the spectrometer (called Spetrasuite). I

  • Call Library Function Node: library not found or failed to load Update:11-30

    Hello, I had a VI that could not find some of the dll functions it needed.  It works on one machine and not on another.  So foolishly I copied the dll in question from the working machine and pasted it over the one on the non-working machine.  Now al

  • Call Library Function Node produces error in Windows 7 Update:11-30

    Hi,       I've created a simple program using LabVIEW 8.5 that uses calls in winscard.dll to read and write to a Smart Card.  I use Call Library Function Node to call functions in C:\Windows\System32\winscard.dll.  This program works without a proble

  • VI analyzer: Wire under object test fails with Call Library Function Nodes Update:11-30

    Hi, If I wire a Call Library Function Node with an ErrorIn and an ErrorOut, the VI Analyzer Test "Wire under Object" fails always with two occurrences per Call Library Function Node. A double click to the occurrence highlights the error lines co