05-29-2025 11:49 PM
I would like to controll the i1pro3 from X-Right but I don't know how.
My Labview version is 2025Q1 and I got the i1pro3's SDK including .dll and .h files.
So I tried to make a code using Call Library function, but when I set a configure of the function, the warning attached below shows. And, the Call Library function dosn't shows any parameters in the Block Diagram.
I guessed I have to do something befoe making a code, such like to share the Library or something like that.
I would appreciate it if you would let me know it.
Solved! Go to Solution.
05-30-2025 02:18 AM - edited 05-30-2025 02:23 AM
@keisdad wrote:
I guessed I have to do something before making a code, such like to share the Library or something like that.
I would appreciate it if you would let me know it.
Yes, you need to go to the Parameters Tab in the Call Library Node Configuration and configure the parameters of the function according to the prototype declared in the header file. And you need to do that for every function you want to call.
And if you get anything wrong, LabVIEW will almost certainly crash. More accurately the DLL function will usually crash but that will normally generate a General Protection error, Access Violation or similar and LabVIEW will display a dialog that the function did something nasty and give you the option to abort or ignore. But ignoring this is pretty much never a good idea. The integrity of your process is not guaranteed anymore and continuing from this point onwards is the equivalent of playing Russian Roulette. It may go ok for a little while but sooner or later the CPU will run into corrupted memory and go upside down anyhow. Until then it may have accidentally destroyed other things including files or worse.
Someone else will likely recommend you to use the Import Shared Library Wizard in LabVIEW for your DLL. However that advice is only for the most trivial of DLLs really useful. The C syntax in the header is NOT capable of describing any sufficiently complex API fully. But that is all the information the Import Wizard has. It must do a lot of guessing and hoping for the best and the resulting VIs are pretty much worthless if they are not reviewed and corrected by someone with enough knowledge to create them correctly themselves. In the end the whole reviewing, refining and correction is just as much work than doing it all manually!
05-30-2025 02:42 AM
Thank you very much!
So, I will set all parameters for each function in the DLL by manually according to header file.
When Labview shows an error, I never click "ignore".
Also, I will not use share library in Labview.
05-30-2025 02:50 AM