LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVRefNum in a CIN file descriptor difficulties

I am currently developing an application that uses labview and IMAQ to acquire images from a 1429 cameralink capture card.
We aim to analyse the images using some previously devoped c code. Our complications come when trying to access the images
from within a c interface node, where we are having difficulty in obtaining the file descriptors for each image.


typedef struct {
 int32 dimSize;
 LVRefNum ImageOut[1];
 } TD1;
typedef TD1 **TD1Hdl;

MgErr CINRun(TD1Hdl ImagesOut, uInt32 *ROIWidth, uInt32 *ROIHeight,
 TD2Hdl arg1, TD3Hdl arg2)
 {
  
  File fd;
  LVRefNum *thisrefnum;
  uInt8 *target;
  int32 numread;
  int32 frames;
  MgErr test;

  frames=(*ImagesOut)->dimSize;
  thisrefnum=(*ImagesOut)->ImageOut;
  test=FRefNumToFD(thisrefnum[0], &fd);
  if(test==mgArgErr)DbgPrintf("mgArgErr");
}
   
An error is reported by FRefNumToFD ie i don't pass a valid refnum. Does anyone have any ideas what I done wrong?

Any suggestions much appreciated.

Ben

0 Kudos
Message 1 of 2
(2,664 Views)

Hi Frisson,

  in the UK we held a Vision Day (another coming December 1st 2005 - contact the UK office on 01635 572410 to register an interest or to  find out more go here : http://sine.ni.com/apps/we/nievn.ni?action=display_offerings_by_event&event_id=14895&country=GB&site...)

Please find attached one of the presentation files detailing how the image is in memory, and how (in this case) we could interface to an image acquired in LabVIEW inside of LabWindows/CVI code.

Hope this helps.

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(2,651 Views)