Jump to content

Search the Community

Showing results for tags 'dll'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Software & Hardware Discussions
    • LabVIEW Community Edition
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • GCentral
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
    • OpenG
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help


  • *Uncertified*
  • LabVIEW Tools Network Certified
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
    • Custom Probes
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website

Company Website

Twitter Name

LinkedIn Profile

Facebook Page



  1. Hello all, background A while ago I wrote a dll wrapper to get data from dedicated test-hardware. For this hardware there is a dll available. To use this dll you need to use an callback function. If you need to use a dll in Labview which needs a callback you need to write the callback in C code and use a Labview C lib to get the data into Labview, basically my dll takes care of this problem . Enhance the code and way of working more efficient The code I wrote code works fine. However I did not use / test it for hours on a row. And sometimes If I make a mistake when changing the code I run into problems. I was able to fix all the errors and problems however it was not the most efficient way of working. For instance If there is a serious error in the code the dll I need for the hardware can crash, it can make my wrapper crash, which will in return make Labview crash. This makes the way of coding inefficiënt and it will not enable me to read my C++ book etc etc. Example pseudo code I did try to extract some main points of intrest from the code, I did add some comment in the code. I hope someone can give me some general guideline or advice what to read. At this time I am reading: Unhandled C++ exceptions I think I might be able to use it, I did not use this before so advice would be welcome. Thank you all for the help ! // .. // This is a part of the code only intended to have a talk about how to catch errors // It is not complete and intended as Pseudo code // .. int __stdcall MyDriverLoads(const int NumberToInitialise,const bool enableAnotherOption , const char *const path , LVUserEventRef *rwer) { // loads the dll // Q -- I can check if (F_functionname !=0), if it is not 0 then I can proceed if the function returns 0 I can return an error to Labview Extern_dll = Load_Extern_dll(); // Get the functions I need from the dll p2_ExternDriver F_ExternDriver = (p2_ExternDriver)GetProcAddress(Extern_dll, "_ExternDriver"); p2_Initialise F_Initialise = (p2_Initialise)GetProcAddress(Extern_dll, "_Initialise"); p2_AdapterCount F_AdapterCount = (p2_AdapterCount)GetProcAddress(Extern_dll, "_AdapterCount"); p2_StartLogging F_StartLogging = (p2_StartLogging)GetProcAddress(Extern_dll, "_StartLogging"); p2_StopLogging F_StopLogging = (p2_StopLogging)GetProcAddress(Extern_dll, "_StopLogging"); // When there are adapters found I tell it in Labview adapterCount = F_AdapterCount(); // Get the callback function adress, if adress == 0 I can see something is wrong void(__stdcall *p2_CallbackFunction_t) (pt2Obj , const LogData & ) = &CallbackFunction; // Q -- I could use try {} and catch {} however I do not have acces to the source code of the dll so, // I do not know if they used // trow "The Blue error" , or // trow "The Red error" ret = F_ExternDriver(adapterCount, enableLogFile, path, *p2_CallbackFunction_t, pt2Obj); // This tels the dll to start logging before this command you will not receive data in Labview ret F_StartLogging(1,2,3); // Labview is receiving data thats great !!! return ret; // Q -- Labview has been receiving data for a hour what happens if the used extern dll crashes ?? // If the dll crashes when return is passed I can not use try() and catch anymore. // } extern void __stdcall CallbackFunction(pt2Obj , const LogData & ) { // There is a lot to do here // do stuff!! // I did not write everything here err = PostLVUserEvent(*event_ref, &tmpEvent); }
  2. Hello I hope someone can help me, I have been trying to get this to work for days but no success yet. What I want to do I got a dll with a wrapper, this dll and wrapper can be used for a special datalogger. The wrapper contains multiple functions, I have got some of them working using a CLFN, for instance I can read a jumper setting from the datalogger in LabView. So far everything is fine. Of course I am not that interested in the jumper setting, I would rather use the datalogger to log data. I need to run one function to start logging. When there is enough data in the databuffer of the driver dll it will call a callback function I need to write in Labview, here is the function which starts the logging as described in the header file: Int LOGEXPORT __sdcall LOG_StartLogging{const char ** logFilename, ptLogCallbackfunction ptFunction, ptObject ptObject} logFilename needs to be a NULL pointer, from my understanding I do not need to do anything with it. Only provide it. If I do not do anything with it some data is saved at a default location. ptLogCallbackfunction, as far as I know I need to provide a pointer to the callback function ptObject ptObject, this must be a void pointer The header also provided how the callback function could look like in 😄 Void __stdcall callbackLog(ptObject object, const int ArraySize, const StructLogdata *const logDataArray) { // copy data from logDataArray for use in my code } StructLogdata is a struct with different datatypes. What I did try I did a search on internet there are some examples about callback functions, most of them point to NET and active X. They use a reg Event Callback. I did read the helpfile at the end of the helpfile there is the text: “Use the Event structure or the Register For Events function to register and handle non-.NET or non-ActiveX events dynamically” I am having a hard time to find a proper example. I did find this site with some information: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8XJSA0&l=nl-NL and this one about the refnum: https://forums.ni.com/t5/LabVIEW/Passing-Event-Refnum-to-Call-Library-Function/td-p/4107748 So I did make a user event, I wired a static Vi ref containing a callback vi to the input of this user event. I did wire the user event to a Reg event and wired the event registration refnum to the start logging dll call library function node function pointer input and also to an event structure. I did place a counter in the event structure. But nothing happens besides for an exception which makes Labview crash. The parameters I did use in the call library function are: logFilename: type numeric, datatype: Signed Pointer-sized int Pass: pointer to value ptLogCallbackfunction: type: adapt to type, Data format handles by value (tried all options) ptObject: same as logFilename I did try a lot of different things. Writing them in this post will result in chaos and I don’t want that. I hope someone can help me with a simple example how to make this work, or point me into the correct direction. Thank you all for the help!
  3. Hello to you all, Sending a cluster with int's I did manage to send an array with clusters from a dll to Labview. Thank you all for the help. You can find the link here: https://lavag.org/topic/22877-can-someone-help-me-with-an-example-for-an-existing-wrapper-dll-which-uses-function-pointer-with-callback-function/#comment-147496 It works fine I am very pleased with it. 😃 Sending a text string I did got a example here: https://forums.ni.com/t5/Example-Code/Posting-Events-to-a-LabVIEW-Event-Structure-From-a-Dll/ta-p/3996283 Tested it and it works fine. Again I am happy 😃 Sending a cluster with int's AND a string Now I want to send a cluster / struct with a couple of int's AND a string of text. I Got a example of how to send text from a C / C++ wrapper to Labview, can someone please help me out? The thing I do not get is, how to combine the both examples. Is "sizeof(structSample)" valid with a LStrHandle in it? How do I copy the data from the string to the struct, etc. Can someone change the code example or help me with the example so it works? I did add some text to the example code to make it more clear I added +++ signs in my comment in the code. Hope someone can help me. Thanx ! // LVUserEvent.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #include <stdio.h> #include "LVUserEvent.h" #define STRING_LENGHT 256 //Can be any size // ++++ I want to send this Cluster/Struct to Labview typedef struct { int firstInt; int secondInt; int thirdInt // +++++ I try to add this, Gues this will not work .. see extcode.h LStrHandle textString[TEXT_STRING_SIZE]; }structSample; typedef struct{ int32_t size; structSample elm[1]; }totalstructSample, **structHdl LVUSEREVENT_API void SendEvent(LVUserEventRef *rwer) { LStrHandle newStringHandle; //Allocate memory for a LabVIEW string handle using LabVIEW's //memory manager functions. newStringHandle=(LStrHandle)DSNewHandle(sizeof(int32)+STRING_LENGHT*sizeof(uChar)); // +++++ OW no another one ... structHdl = (eventHdl)DSNewHandle(sizeof(totalstructSample)); Sleep(2000); PopulateStringHandle(newStringHandle,"+++ Dear int I don't want you in my PostLVUserEvent"); //Post event to Event structure. Refer to "Using External Code //with LabVIEW manual for information about this function. PostLVUserEvent(*rwer,(void *)&newStringHandle); return; } void PopulateStringHandle(LStrHandle lvStringHandle,char* stringData) { //Empties the buffer memset(LStrBuf(*lvStringHandle),'\0',STRING_LENGHT); //Fills the string buffer with stringData sprintf((char*)LStrBuf(*lvStringHandle),"%s",stringData); //Informs the LabVIEW string handle about the size of the size LStrLen(*lvStringHandle)=strlen(stringData); return; }
  4. I'm probably missing something fundamental about how variants are stored in memory . I want to create an array of pointers to variants. I seem to be able to write quite happily, but when read; it causes a problem. The following VI demonstrates what I am trying to do. It runs through once quite happily, but on the second execution it fails on the DSDisposePointer (even though the variant has been written and read correctly). If you disable the read, then it doesn't crash so it must be something to do with the way I'm retrieving the data. Any help appreciated. varpointers.vi
  5. Hi All! Since LabVIEW uses only Windows MME driver for sound in and out, I'm looking for an other way to get sound data into LabVIEW with much less latency. Has someone use ASIO4ALL for audio input? For sound out I use Midi via MME and the Windows own synthesizer. Its latency is really not high. But the input data comes with some hundred milliseconds lateness. With MME: I tested on 2 systems. About 350ms latency and not really depending of the system load. I tried also with small sample packages of 600 and 1200 byte/chn and a sound card acquisition rate of 96kS/s. In order to collect this data amount the time what the PC needs should be theoretical 6,25/12,5ms plus data transfer time and some reaction times of the system modules. But the response time of MME seems in-depending on it. It needs always around 320...380ms. And the processor load was very low. Maybe someone can help me to use a faster software interface (ASIO?). Best greetings, Frank
  6. Hello, I wrote a LabVIEW program to communicate with a hardware sensor using vendor-provided LLB and a DLL files. The program runs fine on my workstation both from LabVIEW IDE and from a compiled executable. The problem starts when I copy the entire executable folder to a target host without a LabVIEW IDE (only with a runtime engine). The application opens with a broken Run arrow and a "missing external function" error message appears for every function call I made to the DLL (see attached). I have tested my application on 5 completely different Windows 10 computers managed by different people. On three of them with various versions of LabVIEW IDE my executable opened with a whole Run arrow and no error message. Two other machines previously had no LabVIEW, so I installed a Runtime Engine 2017f2 32-bit with default settings to match the version of my IDE. Both gave an identical error message. The DLL is always included in the application build. I have tried placing the DLL in every conceivable location on the target host: in the executable folder, in the /data folder, in the c:\Windows and system32 folders... I even created a full folder tree matching the location of the project on the developer workstation. Same error. When I intentionally hide the DLL, my executable prompts me to point to it upon being opened, and when I do, I get all the same error messages. Vendor documentation only asks to put the two files in the same folder. From programmer's manual: " The driver was written in LabWindows/CVI, version 4.0.1 and is contained in a dynamic link library which can be linked with a variety of programming languages." There is no vendor-provided support. One way I actually got rid of the error message was by editing every Call Library Function Node in every VI in the LLB to use relative path to DLL together with the Application Directory VI. However, I feel that there has got to be a better way to compile than by editing a vendor-provided library, especially since it works as-is on some computers. Can anyone suggest what it is? Thank you for your time!
  7. Hi all, I've been trying to figure out how to get a function made with LabVIEW 2011 up and running in MS Visual C# 2010 (.NET 4.0) I've been using this guide: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/ When i try to execute the code I made in visual studio I get the following error: Failed to call InitLVClient function I've seen this thread: http://forums.ni.com/t5/LabVIEW/VIAssemblyException-quot-Failed-to-call-InitLVClient-function/td-p/1472988 My question to you is, is it possible to create LabVIEW 2011 code for use in Visual C# 2010? If so does anybody have a link to a guide on how to export LabVIEW 2011 VIs into a format that can be called from Visual C# 2010? Even better yet, does anybody have any example code I could work off?
  8. DLL functions or shared variables? Or something else? I have a Labview 2014-64 executable (or I can build a DLL) that runs one piece of equipment, the X-ray. The other engineer has a large CVI Labwindows 2015 + MS Visual Studio 2012 (C++) executable that runs everything else. I want the Labview code to be a slave of the CVI code, accepting commands to turn X-ray On or Off, reporting failures, and the like. Translating the X-ray code into C++ would be possible in principle, but not fun. Shared variables look easy, but I'm kinda scared of them. I would define all the shared variables in my LV code, since I'm more familiar with LV, then use them in both. There's a thread in here called "Shared Variable Woes" so maybe I should be scared. In the alternative, I tried building a proof-of-concept DLL in Labview, and calling its functions in CVI/C++, and it works, but it's kinda clunky. (I'm attaching it below in case you want to play, or advise.) Your advice would be appreciated. XrayDLL.zip
  9. To use a controller from LabVIEW I have to use some functions of a DLL. For one of the functions, according to the header file .h there is a structure data with parameters of different types that I have to pass to the dll. Some of the parameres are BYTE (1 Byte) and WORD (2 Bytes). When compiling this kind of structure with Visual C++ and looking at it's size with "sizeof()" it seems to me that 4 Bytes variables have to start in a position multiple of 4. For example if there is a BYTE and then a DWORD, the 3 Bytes after the BYTE are ignored and the DWORD starts at Bytes 5 to 8. When defining a LabVIEW cluster to match the DLL structure, will LabVIEW do the same? If in my cluster there is a U8 variable and then a U32, will anyway the U8 take 4 bytes? Thank you.
  10. So I created a DLL from a Labview VI that has a 2D array input (and some scalar inputs) and some 2D array outputs. Labview creates a .h file with these lines And then it defines the 2D array arguments to my function as being of this type: "void __cdecl Linear_discrim_4dll(DoubleArray *dataObsFeat, int32_t grpAsz," etc etc. Trouble is, I have no idea how to fill out this structure so that the DLL can use it. Say for simplicity I had a 2 by 3 input called dataObsFeat with elements {1,2,3; 11,12,13}; how would I create the object with these values in C or C++ and pass it to the function? I am a total C++ noob, in case it isn't obvious.
  11. Hi When I call the DLL, there is a structure: struct Signal { uint32 nStartBit; uint32 nLen; double nFactor; double nOffset; double nMin; double nMax; double nValue; uint64 nRawValue; bool is_signed; char unit[11]; char strName[66]; char strComment[201]; }; There is another Message structure to the above Signal: struct Message { uint32 nSignalCount; uint32 nID; uint8 nExtend; uint32 nSize; Signal vSignals[513]; char strName[66]; char strComment[201]; } The point is Signal vSignals[513]; I've tried to solve it like this,but the program will crash. How to create struct Message ,any good suggestions? Thanks a lot. message.vi
  12. Hello! I'd like to resize LStrHandle string in a C++ based DLL ... which is perfectly working on desktop Windows (ex.:Win7 32/64 bit) platform by include "extcode.h" and linking "labviewv.lib", with calling "NumericArrayResize" function. BUT I'd like to do the same on Windows Embedded Compact 7.0 with ARM(Cortex-A8). When I build the DLL project on "Smart device / WindowsCE" platform it compiled successfully but the linker stopped because "NumericArrayResize" is unresolved symbol ... I think the reason is that the "labviewv.lib" generated for x86 architecture not for ARM. So my question is: Is there any libviewv.lib for ARM platform?
  13. The task is to process a bundle by a DLL embedded in LABVIEW. LABVIEW crashes even if the coded is most simple. For example, I created an array of double, bundled it and plugged it into the DLL. The parameters of the DLL are "Adapt to Type". The prototype in Labview is "void pointertest(void *source);" The C program: // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include "Header.h" extern "C" __declspec(dllexport)void pointertest(LVCluster *source); BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } void pointertest(LVCluster *source) { source->dimSize = 2; source->arg[0] = 3.1; source->arg[1] = 4.2; } The header: Header.h #pragma pack(push,1) typedef struct { __int64 dimSize; double arg[2]; }LVCluster; #pragma pack(pop) The LABVIEW VI is attached. I checked the foren. However, I cannot figure out what I did wrong. Please give me a hint. Your support is highly appreciated. pointertest.vi
  14. Good morning, I have a DLL I created (in Labview) that takes in string information, does some magic crunching on it to create a password that is passed out as a string. This DLL will be called from CVI and probably from a C# application. This should be so simple, however I cannot figure out how to pass the string in and get the modified string out of my DLL. I've had no luck at all getting this DLL to work by trying many different things. It crashes LV, returns and error, or simply passes nothing out during my trials. I've included the project (its small) in zipped format. Can one of you kind souls take a look at my code and tell me what I'm doing wrong, or what I need to do correctly to both, configure the DLL and then call it from LabVIEW? Thank you! Randy Password Generator.7z
  15. Hi I am developing a LabVIEW based vision system. Though the front-end is to be developed in C#. The processed images should be displayed on the front-end. Has anyone experience in how to convert, pass and display IMAQ images in C# Thanks
  16. I'm using a Labview Shared Library (DLL) to comunicate between a C# program (made by another company) and a labview Executeable (which means different processes) on the same PC. Currently i'm using network published shared variables, to communicate between the Labview DLL and the LABVIEW program (both made by me) which works well, except for the performance. Each time the DLL is called it needs to connect to the shared variable, which takes between 50 and 300 ms. When it is connected, the data transfer is instant. I have tried to use the PSP "Open Variable Connection In Background", which is a bit faster, because it doesn't wait to verify the connection. But it still adds some overhead. I have also tried to use notifiers from this example: https://lavag.org/topic/10408-communication-between-projects/ . Opening connection and sending the notifier takes 50 - 100 ms. I guess both the notifier and the shared variables are "slow" because they use the network communication, even if it is the same pc both programs are running on (localhost). Does any of you know of a faster method of communicating between a program that is running continuesly (connection open constantly) and one only exectuted when new data is ready (connection "re"-opened on every instance)? Thanks in advance. Best Regards Mads
  17. Hello, I am trying to figure out, if it is possible to create a native LabVIEW I/O interface to C/C++ code, that is using the I/O functions through callbacks. The scenario is as follows: I made a toolkit to process multimedia formats and (so far only) video codecs, it is using internally FFmpeg shared objects (DLLs or SOs, further just "DLLs"). They way the FFmpeg DLLs access I/O is through callback mechanism. Following all happens in the wrapper. If I want the toolkit to read data from some I/O like network or disk, I have to create a session, and part of the session are function pointers to callbacks doing various tasks, one of them is reading data. Anytime a user tries to read more data (1 data packet), he forces a call to the session demuxer, that further uses the I/O callback so long, until it parses one packet/hits EOF/corrupt data/etc..., now this works nicely if you want to provide data through standard means like video file or stream URL. Since the capabilities of FFmpeg allow for example (de)muxers and codecs for images, I thought it would be cool to give the user possibility to supply his own data, that he reads via LabVIEW from database or whatever. Not just limit the usage of I/Os implemented inside the DLLs. All I know, is that I cannot use VIs as callbacks inside C/C++ code, so the only way is to somehow "decallback" the implemented I/O mechanism.
  18. I can't call the following dll function .... int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */);
  19. Hei, I am using Microsft Visual studio 2010 for the dll. I have created an image in labview which is then sent to the dll in order to extract the rgb values. I was hoping to get the arrays of red, blue and green with the data representation from 0-255 (U8). But instead, I got a weird problem on the linker. Sometimes it compiles okey, sometimes not. I was wondering that I'm doing something wrong with the image variables (color:purple), because you can handle it like array of pixels or like handles which are in the end structures. So, which method should I use? Till now I used it like array of pixels. Also this I do not understand. Each pixel of the bitmap is big 32 bits or 4bytes: 1 byte for green, 1 for red, 1 for blue and what is porpuse for the other byte? Becuase in my dll I saved every byte in a different variable, in total 4 variables, and then send ti back to labwiew. When the dll functioned, I got only value form zero to one. Thanks for the help and any comments are appreciated
  20. Hi, I am writing a LabVIEW API based on a 3rd party DLL. The DLL function I am working on right now returns a string and 2 U32. The string is only an output, but the 2 U32 are used as both inputs and outputs. So long story short the 3 parameters are defined as pointers. The 2 U32 work as specified in the documentation, one of them (psize) returning the number of characters that the string is supposed to return. However I can't get the string properly. The documentation tells me that it is a C String and I configured the parameter as such, but when I run the function I get only the first character of what I'm supposed to get. The next test I made (see below) returns all the other characters except the first one and helped me understand why this first test returned only the first character: the string is Unicode! This means that each character (though able to be represented in ASCII) takes 2 bytes, one of them being the null character. And since a C string ends when the null character is encountered, this explain why LabVIEW only gives me the ASCII value of the first character. In the second test I'm talking about, I modified the parameter to be a Pascal String Pointer instead of C String Pointer. I got all the characters except the first one, which makes sense I guess since the first character is the length in a Pascal string. Basically so far I haven't managed to find a way to read the whole string in one call. I would love to find a solution where I just ask for an array of bytes and just perform my own parsing, but the DLL returns an Invalid Parameter error when I try it. Have you run into something similar? Do you have any tips? Help would be much appreciated!! (on top of this issue, LabVIEW crashed 50% of the time )
  21. Hi everyone. I wrote wrapper in Visual Studio for OpenCV calibrateCamera() function. Every operation like converting 1D array of points to vector<vector<Point2f>> etc, works ok, except most important thing. When function ()calibrateCamera is called, LabVIEW crashes. When this line is commented out, dll works ok (at least labview is still alive). Im out of ideas. I suspect that this is problem with memory management but i dont have an idea where it cames from. Function do not operate directly on data passed from LabVIEW. Ultimately I can compile code as exe and call it via cmd, but I'm curious why such a thing appears. Thanks for your precious time! Zyga dll source (if you need i can enclose some sample input data): #include <opencv2/core/core.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <extcode.h> using namespace cv; using namespace std; static void calcBoardCornerPositions(Size boardSize, float squareSize, vector<Point3f> &corners); static void arr2vect(float *APoints,int *Asize, vector<vector<Point2f>> &imagePoints); extern "C" { float __declspec(dllexport) Calibrate(float *APoints, int *Asize, int width, int height, float squareSize) { //initialize variables vector<vector<Point2f>> imagePoints; Size boardSize; boardSize.height = height; boardSize.width = width; Mat cameraMatrix = Mat::eye(3, 3, CV_64F), distCoeffs = Mat::zeros(1, 1, CV_64F); cameraMatrix.at<double>(0,0) = 1.0; vector<Mat> rvecs, tvecs; vector<vector<Point3f>> objectPoints(1); Size imageSize; imageSize.width = 2040; imageSize.height = 2040; arr2vect(APoints, Asize, imagePoints); // prepare imagePoints calcBoardCornerPositions(boardSize, squareSize, objectPoints[0]); //prepare objectPoints objectPoints.resize(imagePoints.size(),objectPoints[0]); //calibrate double rms = calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs); return rms; } } //definitions static void arr2vect(float *APoints,int *Asize, vector<vector<Point2f>> &imagePoints) { int page = *(Asize); int row = *(Asize+1); int col = *(Asize +2); Point2f pointBuf; vector<Point2f> vectBuf; for (int i = 0; i<page; i++) { for (int j = 0; j<row; j++) { pointBuf.x = *(APoints + (i*(row*col))+j*2); pointBuf.y = *(APoints + (i*(row*col))+j*2+1); vectBuf.push_back(pointBuf); } imagePoints.push_back(vectBuf); vectBuf.clear(); } vectBuf.clear(); } static void calcBoardCornerPositions(Size boardSize, float squareSize, vector<Point3f> &corners) { corners.clear(); for( int i = 0; i < boardSize.height; ++i ) for( int j = 0; j < boardSize.width; ++j ) corners.push_back(Point3f(float( j*squareSize ), float( i*squareSize ), 0)); }
  22. Hello, I write here a topic, because I'm looking for a help since I can not deal with some issue for a long time. I'm trying to write LabView program which will program uC flash using JTAG usbWiggler manufactured by Macraigor Systems. The manufacturer provides customers with program to do whole staff connected with programming, but it's stand alone app and I would like to build the programming process into the test sequence performed by LabView (program + test). Additionally the manufacturer provides a library to call various functions related to programming, erasing etc. I tried to write a program to use dll but no success. There is some small cmd exe program which is using the dll (also created by the supplier), and its working, but there are some bugs in it, and I cannot change it or make some error handling so that's why I decided to use dll alone. I attached dll, dll readme file, ocd file (configuration file for uC), and VIs. I checked the first command called: "FlashSetupAndConnect" it's working without hardware, so you are able to test something. (checked with cmd exe program, without device it always pass if input data is ok, it fails when something is missing like bad path file etc.) Status from each function should be "1", and I get "0" all the time. The function should looks like this (copied from readme file): int FlashProgrammer_SetupAndConnect(char *ocd_filename, char *device_name, char *device_address, unsigned long baud_rate, unsigned long jtag_speed); I will be very grateful for any answer and advices. Dawid K. readme.rtf OCDandDLLl.zip
  23. Hi, I am having trouble where Labview does not detect the required "edk.dll" file (as missing) eventhought it is in the same VI directory. Any help is appreciated attached are the images labviewsystemerror.png shows the error stated. labviewsystemerror2.png show the labview library explore (edk.all not detected) labviewsystemerror3.png show the edk.dll is in the same folder as the LabviewEmotiv.dll
  24. Hi everyone, I had linked a *.dll using 'Import Shared Library'. However, I encounter this error once it is done: Your generated files are installed in the following folder: C:Program FilesNational InstrumentsLabVIEW 2013user.libLabVIEW_Emotiv_emostate_EEG Parsing header file warnings: No errors/warnings occurred when parsing the header file. The following errors/warnings occurred when generating the wrapper VIs for this shared library. VI Not Executable The VI is not executable because of one of the following reasons: 1. The shared library or a dependent file is not installed. To make the VI executable, you must install the shared library and all support files on the computer on which you run the VI. 2. A required custom control might be empty or cannot be found. To make the VI executable, update the custom control manually. 3. The VI contains a parameter with an unsupported data type. To make the VI executable, you must replace the empty cluster that the wizard generates with a control or indicator that uses supported data types. ARRAY2D.vi ARRAY2D Handle.vi Dll Main.vi LVEE Data Collectfor EEG.vi LVEE Engine Connect.vi LVEE Engine Get Next Event.vi LVEE Engine Get Next Eventfor EEG.vi LVEE Engine Get Next Eventfor Emostateand EEG.vi LVEE Engine Remote Connect.vi LVEE Number Of Data Samplefor EEG.vi array2ddataoutfor EEG.vi arraydataout.vi arraydataouthandle.vi eegcontrolinitf.vi eegcontrolstopf.vi emocontrolinitf.vi emocontrolstopf.vi And then, when I was trying to create a 'call library function node' , the library failed to load. It comes with this error : 'This application failed to start because of its side-by-side configuration is incorrect' Any help is appreciated ^^ Thanks.
  25. Hi guys, I am struggling with test stand deployment for 3 days. hope somebody can help. ( I am using teststand 4.0 nd labview 8.5 and .net 2.0) I have sequence files, with many subVi' s and .net assmeblies with dependancies, added to workspace , and when i run the sequence file, it works fine. Specifically, the sequence file calls many Vi's, some of which use the .net assembly from "C:program filesNational instrumentslabview 8.5use.lib" ( and not specifically from the folder where the Vi resides), and still it works. However, when i build the same using deployment utility (figure 1), these assemblies( all of which are required) and other go to "installation directorydata" and the build fails(figure 2), as the "property node " for the .net assembly( build using c# public static class) gets invalid( figure 3). Now, if I browse the target//.. where VI resides, and try to manually add "invoke node" and then 'property node'. invoke node finds the "ZH" class ( Figure 3) , but again, cannot find the property "hearing aid" (figure 3), saying that it is empty. If it can find the class, it has found the assembly, then, why the problem with 'property node"? Now, the same VI in different folder ( C:development...) is able to reference the assembly from "C:program filesNational instrumentslabview 8.5use.lib"( I had added the refernce from labview project initially from different location, but after copying the file to this location, VI's still worked) and works fine (figure 4). I have tried adding "installation directorydata" to Teststand search directory, but no luck. I have following questions: is it manadatory to keep the dl's and their dependencies in the same folder, in which VI's use them, for sucessful build through deployment ? if yes, by default, these would go to "installation directorydata", which is different from "installation directory...VI directory , and would not work still? it is mandatory to add the VI's that use .net assemblies to labview project, for sucessful deployment? if yes, how do we add a labview project to testsand workspace? If the assembly can be added to Global assembly cache, would this solve the problem of 'unsucessfull build" of installer , and even if it does, how can (a) I add the assembly to GAC on development system (b) make sure that installer installs the assembly to GAC on deployed system (through deployment utility)? other than above, does anybody have other solution to my problem? I am already late for deployment of project to customers, and need immediate help. Thanks vivu
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.