LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need Developer studio (C++ programming language) in my computer when I call a dll through my labview?

Solved!
Go to solution

 

VTKim,

 

Do you think attached errors due to the DLL or labview? I have no idea about it.. I asked almost ten people and no solution :(. I think I am the only first person in the world making DLL with C++ builder and try to run in Labview 🙂 pufff 

 

Regards

0 Kudos
Message 41 of 48
(375 Views)

@yemin wrote:

 

VTKim,

 

Do you think attached errors due to the DLL or labview? I have no idea about it.. I asked almost ten people and no solution :(. I think I am the only first person in the world making DLL with C++ builder and try to run in Labview 🙂 pufff 

 

Regards


The only way to answer these question is to see the entire source code (and most likely go into source code level debugger as you call the code from LabVIEW). How to do source code level debugging of DLLs called by a different process with C Builder is something you have to ask on a C Builder forum. Also the errors look like message box created by your DLL, so I would say it's a problem in your C source code.

 

I still think you have currently the choice to implement everything in LabVIEW and get likely a working solution, or keep pounding your head against this concrete wall, and likely get the project shutdown at some point with no working solution.

Rolf Kalbermatter
Averna BV
Message 42 of 48
(352 Views)

yemin,

 

Did you try the repair of LabVIEW to see if that would solve this issue?  Are the errors you sent in for a new VI?

 

Here is a document related to calling C++ DLLs from LabVIEW.  Here is another document that you may have already seen about the same issue.

 

I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 43 of 48
(332 Views)

Rolf,

 

You are right, I am still asking questions at C++ forums. 

 

VTKim,

 

Thanks I am reading attachments.

 

In my C++ code there is a main program and some functions.....Do you think I need to declare my labview inputs at the beginning of all functions..Because I declared only for main program. But when I try to write a text file including these inputs after each funtion, all the numbers seems zero. 

 

Regards.....

0 Kudos
Message 44 of 48
(314 Views)

Hi yemin,

 

If you are referring to your LabVIEW Call Library Function node, all of the functions that you reference in your code you will have to declare as inputs to the Call Library Function node.  I hope this helps.

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 45 of 48
(304 Views)






Thank you VTKim, NIquist and especially Rolf, I have some good news..Finallly labview sees the function and make calculations:) I am really happy...


One C++ expert helped me... Actually he  found the solutions by trial and error....The thing is when we are declearing our input variables, we should use " %" symbol after double..i.e: "double% depth"...And we should declare all the input variables (using in labview) in all the functions of C++... i.e: void ( double depth, double flow rate, etc....)

 
I have one more question....

Now when I tried to change my input depth from 2000 to 10000..it gave error...Then I clicked the data entry and changed the increments to "0" then it didnt give error for 10000 as well but it gave error for 500 ft. My question is the problem about  "floating point" "type", "digits"  stuff?  (mine is automatic formatting and 6 digits as a default)

 


Regards

0 Kudos
Message 46 of 48
(283 Views)






Thank you VTKim, NIquist and especially Rolf, I have some good news..Finallly labview sees the function and make calculations:) I am really happy...


One C++ expert helped me... Actually he  found the solutions by trial and error....The thing is when we are declearing our input variables, we should use " %" symbol after double..i.e: "double% depth"...And we should declare all the input variables (using in labview) in all the functions of C++... i.e: void ( double depth, double flow rate, etc....)

 
I have one more question....

Now when I tried to change my input depth from 2000 to 10000..it gave error...Then I clicked the data entry and changed the increments to "0" then it didnt give error for 10000 as well but it gave error for 500 ft. My question is the problem about  "floating point" "type", "digits"  stuff?  (mine is automatic formatting and 6 digits as a default)

 


Regards

0 Kudos
Message 47 of 48
(283 Views)

@yemin wrote:


Thank you VTKim, NIquist and especially Rolf, I have some good news..Finallly labview sees the function and make calculations:) I am really happy...


One C++ expert helped me... Actually he  found the solutions by trial and error....The thing is when we are declearing our input variables, we should use " %" symbol after double..i.e: "double% depth"...And we should declare all the input variables (using in labview) in all the functions of C++... i.e: void ( double depth, double flow rate, etc....)

 
I have one more question....

Now when I tried to change my input depth from 2000 to 10000..it gave error...Then I clicked the data entry and changed the increments to "0" then it didnt give error for 10000 as well but it gave error for 500 ft. My question is the problem about  "floating point" "type", "digits"  stuff?  (mine is automatic formatting and 6 digits as a default)

 


Regards


Are you sure about the % sign???? That makes no sense in that specific place syntactically, unless you use a C++ variant that I have never seen before. What you probably meant is the ampersand sign &, which signifies a reference parameter. Reference parameters are passed as a pointer to the function, and need to be configured in the Call Library Node configuration dialog accordingly. They are technically equivalent to using the * in front of the parameter name but in C++ the ampersand has a somewhat different synopsis in how you can use that variable name syntactically afterwards.

 

Your second question is unclear and way underdefined. What is the function? Where is the example, VIs, DLLs, etc? What does the function do that you call? In short it's like if I would ask you this: I have this function in my program that does something. IF I call it with 100 as input it does something, if I call it with 200 it gives an error. Tell me why!!! Could you answer this? I can't!

Rolf Kalbermatter
Averna BV
0 Kudos
Message 48 of 48
(277 Views)