Jump to content

Call Library Function Node / void** and void*


Recommended Posts

Hello experts,

I would like to use the two functions:

int clSerialInit(unsigned long SerialIndex, void** SerialRefPtr);
int clSerialClose(void* SerialRef);

Execute via a Call Library Function Node.

I have chosen the parameterisation shown. But it does not seem to work. The function prototype does not seem to be correct either.

image.png.1e8c062c9b77334f609c941f47f7fa18.png

image.png.0dddd3fcf0671553cfc85e000fdab778.png


Can someone tell me how to parameterise the call library function Node in order to execute the two functions?

Have a good time, Jim

 

 

Link to comment
5 minutes ago, JimPanse said:

Hello experts,

I would like to use the two functions:

int clSerialInit(unsigned long SerialIndex, void** SerialRefPtr);
int clSerialClose(void* SerialRef);

Execute via a Call Library Function Node.

I have chosen the parameterisation shown. But it does not seem to work. The function prototype does not seem to be correct either.

image.png.1e8c062c9b77334f609c941f47f7fa18.png

image.png.0dddd3fcf0671553cfc85e000fdab778.png


Can someone tell me how to parameterise the call library function Node in order to execute the two functions?

Have a good time, Jim

 

 

For the clSerialInit you want that parameter to be a pointer sized integer, Pass: Pointer to Value. For the other function make it a Pointer sized Integer, Pass: Value.

If you pass this value around through VI connector panes, always make it a (u)int64 bit integer.

Don't forget to call the clSerialClose() function or whatever it is called. The clSerialInit() function allocates resources (and almost certainly opens the serial port underneath making it inaccessible for anyone else until it is closed properly). If you don't close this resource properly you would create a memory leak and likely make the port inaccessible when starting your program again.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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