From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-14-2018 12:34 PM
Hi there,
I am interested to know about Call library function(CLF). Here I am explaining my question using example.
arg4 = cluster out
arg5 = int 1 out
arg6 = int 2 out
arg7 = int 3 out
I am calling simple function through CLF. Here I am using Cluster Out,Int 1 out,int 2 out, int 3 out for output purpose only. I am not sending any information to the DLL file using arg4,arg5,arg6,arg7 out arguments.
My question is that, do I need to add the controller for each indicator on left side of CFL?
I know it is giving me correct return value from the function without controller on left side. But Whenever I created Vis with help of share library function at that time it is create controller for each indicator.
So controller for each indicator make any change in terms of memory or any others?
Thank you,
Yash
Solved! Go to Solution.
11-15-2018 02:22 AM
What is happening here is that those last parameters are pointers to values.
LabVIEW will need either an input or an output (nowadays) to create that pointer. So as long as you wire an output, it's OK. If you don't want an output, you need an input.
This only works for values passed by pointers. The dll functions properly, because those pointers are probably only used to set values. Sometimes values passed by pointers are also read, but in this case apparently they are not. You might want to check. My guess would be the value at those pointers is set to 0 by LabVIEW, but I'm not sure if that is defined. So the values might be undefined. That could mean it works most of the time, and sometimes not. That is not a good situation to have...
11-15-2018 04:17 PM - edited 11-15-2018 04:42 PM
Older versions of LabVIEW required you do wire the left side of each parameter to the Call Library Node. Since several versions this is optional if LabVIEW can determine the data type for the parameter (either through explicit configuration in the Call Library Node or through wiring an indicator directly to the the right side of that parameter.
LabVIEW will then create a dataspace with the determined datatype and according default default value (0 for numbers, False for booleans, empty string or array) and pass it to the DLL function.
11-16-2018 12:25 PM
Hi Rolf,
Thank you for explaining in detail about dataspace use by the labview.
Yash
11-16-2018 12:27 PM
Hi wiebe@CARYA,
Thank you for explain concept regrading the Pointer working.
Yash