Jump to content

thenoob94

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by thenoob94

  1. I have created a simple labview vi that uses some .so functions. When I copy the folder to another computer I usually just have to relink the .so file and everything works. Now I get the error which can be seen in the attached images. Any idea why this happens? OS: Debian
  2. I have implemented an fft in c and compiled it to an .so. When I run the c program by itself it is twice as fast as the labview implementation. Is there any way to make this faster in labview? maybe some settings for loading .so? thank you in advance
  3. I'm trying to use the labview FFT however it's extremely slow compared to FFTW... I have wrapped the fftw in lv however it's rather inconsistent with regards to the time it takes to calculate. In plain c it's not inconsistent at all so I suppose the issue has something to do with the way the memory is allocated when I use it in lv. Any ideas how to solve this?
  4. When I use the producer consumer pattern mycamera throws an "Error" telling me that the handle is incorrect. This happens only when I try to pass the data to the consumer as shown in the following link https://labviewwiki.org/wiki/Producer/Consumer this happens as well when I use the synchronised consumer
  5. I've fully wrapped a genicam sdk in lv. The images are being read out in a loop. I would like to read the images out via another vi. The issue at the moment is, that the images are being passed after the loop is done.. I've looked into produce/consumer but then the aquisition fails. The image how I read out the data is attached. I'm curious how the lv-pros would pass each frame to antoher vi?
  6. Thanks to this amazing community I've almost fully wrapped a gige-cam api in labview. I was able to pass clusters as structs to function. My next question would be how to tackle more complex structs? I have the C-struct and want to model this in LV and pass it to the function. I know how to model simple structs but this one has a nested structure and makes use of a union. I tried to model it like the following but this doesn't seem to work. My program is not crashing but my .so function returns an unkown error.
  7. I want to pass a struct to the library function. this is the code from the function: EXTERN_C SV_GEN_SDK_API SV_RETURN SVLibSystemGetInfo(uint32_t uiIndex, SV_TL_INFO *pInfoOut); /** SVLibSystemOpen * Opens the System module and puts the instance in the phSystem handle. This allocates all system wide * resources. A System module can only be opened once. * @param [in] uiIndex Zero-based index of loaded GenTLProducers. * @param [out] phSystemOut System module handle. * @return success or error code */ this is the struct I want to pass to the function: typedef struct _SV_TL_INFO { char id[SV_STRING_SIZE]; char vendor[SV_STRING_SIZE]; char model[SV_STRING_SIZE]; char version[SV_STRING_SIZE]; char tlType[SV_STRING_SIZE]; char name[SV_STRING_SIZE]; char pathName[SV_STRING_SIZE]; char displayName[SV_STRING_SIZE]; uint32_t gentlVersionMajor; uint32_t gentlVersionMinor; int32_t encoding; }SV_TL_INFO, *PSV_TL_INFO; 1.png shows my labview architecture 2.png show how I call this function I tried almost all of the parameter permutations to call this function but my program keeps on crashing. I'm on debian.
  8. I have the following c function: extern "C"{ int getInterfaces( uint32_t numInterface, void* g_hSystem); } int getInterfaces( uint32_t numInterface, void* g_hSystem) { //Get Interface bool bChanged = false; SV_RETURN ret = SVSystemUpdateInterfaceList(g_hSystem, &bChanged, 1000); if (SV_ERROR_SUCCESS != ret) { printf("%s SVSystemUpdateInterfaceList failed!:%d\n", __FUNCTION__, ret); return -1; } ret = SVSystemGetNumInterfaces(g_hSystem, &numInterface); if (SV_ERROR_SUCCESS != ret) { printf("%s SVSystemGetNumInterfaces failed!:%d\n", __FUNCTION__, ret); return -1; } if (0 == numInterface) { printf("%s No Interface Available!\n", __FUNCTION__); return -1; } } How would I create "void* g_hSystem" in Labview?
  9. os: Debian I've written a c Function and compiled it to a shared object. I call the function in labview and it executes just fine. The function modifies a ".cti" file. When I want to execute the function a second time it fails because labview still takes ownership of the process even after it terminates. When I run the function without labview this error doesn't occur.. This is my function: extern "C"{ int InitSDK(); } int InitSDK() { string ctiPath; string genicamPath; string genicamCachePath; string clProtocolPath; #if defined (WIN32) char buffer[1024] = { 0 }; int res = GetEnvironmentVariableA("GENICAM_GENTL64_PATH", buffer, sizeof(buffer)); if (0 == res) return false; ctiPath = string(buffer); memset(buffer, 0, sizeof(buffer)); res = GetEnvironmentVariableA("SVS_GENICAM_ROOT", buffer, sizeof(buffer)); if (0 == res) return false; genicamPath = string(buffer); memset(buffer, 0, sizeof(buffer)); res = GetEnvironmentVariableA("SVS_GENICAM_CACHE", buffer, sizeof(buffer)); if (0 == res) return false; genicamCachePath = string(buffer); memset(buffer, 0, sizeof(buffer)); res = GetEnvironmentVariableA("SVS_GENICAM_CLPROTOCOL", buffer, sizeof(buffer)); if (0 == res) return false; clProtocolPath = string(buffer); SV_RETURN ret = SVLibInit(ctiPath.c_str(), genicamPath.c_str(), genicamCachePath.c_str(), clProtocolPath.c_str()); #elif defined(__linux__) ctiPath ="./"; SV_RETURN ret = SVLibInit(ctiPath.c_str(), NULL, NULL, NULL); #elif defined(__APPLE__) && defined(__MACH__) ctiPath = "/Library/Frameworks/SVGenSDK.framework/Versions/2.5.8/Libraries/cti"; SV_RETURN ret = SVLibInit(ctiPath.c_str(), NULL, NULL, NULL); #endif if (SV_ERROR_SUCCESS != ret) { printf("SVLibInit Failed! :%d", ret); return -1; } printf("Init worked \n"); return 0; }
  10. CMakeLists.txtThis is what I'm working with at the moment. The image aquisition works out fine. The only issue is that it's not event driven. Instead of only grabbing an image when a new one has been written to shared memory I'm grabbing the image constantly. I know what @Rolf Kalbermatter means by refactoring the code into the functions. The issue is that in order to grab a frame I new to access the camera(aravis "object") which is instanciated in the connection process. I don't see how I could wrap this so I can make use of these functions in Labview. main.c client.c test.vi
  11. I have compiled my code to an .so file and I'm trying to call it as a shared library. Since the data aquisition is running constantly the function never returns. So my vi freezes. Is it possible to have a function run continuously in Labview? Otherwise the function for the image aquisition has to be resarted each time I want to grab a frame. How would you implement opening the device and accessing the buffer?
  12. I'm using Debian. I'm using a c program to aquire images from a gige camera. This is the code: https://github.com/AravisProject/aravis/blob/main/tests/arvexample.c What would be the best way to bring the aquired images into labview? I don't want to call the function every time I want to grab a new image frame because I think this will slow things down since the function first has to connect to the camera.
  13. I am trying to read in an image via opencv pass the pointer to lv. Then I want to load the image from the pointer and render it in lv. How would I do this? I am running linux so there is no vision module and no IMAQ. I also thought about passing the image as an array to lv but there seems to be no option to turn the array to an image that could be rendered in lv. Any suggestions?
  14. How can I acquire GigE Images from my SVS-Vistek Exo174MGE in Debian? NI-IMAQdx is not available in Linux so I'm wondering how one coould do this?
×
×
  • Create New...

Important Information

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