Jump to content

empstar

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

empstar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. QUOTE (rolfk @ Jun 9 2009, 12:13 PM) Dear Rolf, As you suggested, I created an byte array with 0x200000 long by Initialize Array Function (All Elements are 0), and passed it to Call library function node with following configuration parameters Name: FrameBuffers Type: Array Data type: unsigned 8-bit Integer Dimensions: 1 Array format: Array Data Pointer When I checked the FrameBuffers as an unsigned 8-bit array, only first four elements have non-zero values and the rest are all zeros although I expected all elements have non-zero values. Why the only first four elements have non-zero values? Would you suggest any way to correctly extract data in the byte array? Thank you for your comments.
  2. QUOTE (rolfk @ Jun 8 2009, 03:07 PM) Dear Rolf, Thank you for your reply. I created an array of byte with 0x200000 and passed it as C array pointer to the function. There is no clash, and the array seems to be initialized. You can check the labview code I upload. As you mentioned, the extraction of data from the array is an issue. I tried to use MoveBlock of Labview, but it didn't work correctly because there is no output pointer to control although I can extract the data with the following C code. pVIVAGRAB_VIDEO_FRAME_ARRAY FrameBuffers; //FrameBuffers will point to an array of type VIVAGRAB_VIDEO_FRAME and is filled in by VivaGrabInit(). UINT16 *ImagePtr; retval = VivaGrabInit(10,&FrameBuffers); ImagePtr=(UINT16*)FrameBuffers; Would you guide me how to extract data information in Labview? Thank you in advance.
  3. I wrote a VI for a function called VivaGrabInit for DLL, but it always is clashed when I run with a memory error. Can anybody help where I'm wrong in the code? Function frome a head file #define VIVAGRAB_FRAME_BUFFER_SIZE 0x200000 //2Mb #define VIVAGRAB_FRAME_WIDTH 1000 #define VIVAGRAB_FRAME_HEIGHT 1000 #define VIVAGRAB_FRAME_SIZE (VIVAGRAB_FRAME_WIDTH*VIVAGRAB_FRAME_HEIGHT*sizeof(UINT16)) #define VIVAGRAB_FRAME_METADATA (VIVAGRAB_FRAME_BUFFER_SIZE-VIVAGRAB_FRAME_SIZE) typedef struct { UINT16 FrameData[VIVAGRAB_FRAME_HEIGHT][VIVAGRAB_FRAME_WIDTH]; UINT8 Metadata[VIVAGRAB_FRAME_METADATA]; } VIVAGRAB_VIDEO_FRAME, *pVIVAGRAB_VIDEO_FRAME, **pVIVAGRAB_VIDEO_FRAME_ARRAY; extern "C" __declspec(dllexport) UINT32 VivaGrabInit(UINT32 NumFrameBuffers, pVIVAGRAB_VIDEO_FRAME_ARRAY *FrameBuffers);
×
×
  • Create New...

Important Information

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