fillalph Posted April 1, 2009 Report Share Posted April 1, 2009 I am looking to write a dll that performs some math operations for a RT system on cRIO 9012. The C (dll) code is compiled in using the GNU tool chain for VxWork. I figured to start small with a basic dll and once I had that working and was comfortable expand on it. I am running into a couple hiccups though. Here is the dll file #include <stdio.h> #include <stdlib.h> #include <math.h> extern "C" { double testDLL(double arg_A, double arg_B) { return(arg_A + arg_B); } } extern "C" double testDLL(double arg_A, double arg_B); and here is the test vi program I wrote When I right click on the call library function on the block diagram and configure the parameters, they are set as follows. return type has the type "Numeric" arg1 has the type "Numeric" and data type "Signed 32-bit Integer" and pass by "Value" arg1 has the type "Numeric" and data type "Signed 32-bit Integer" and pass by "Value What I don't understand is what the return type is the same as arg 1. Any insights? Thanks in advance. -fillalph Quote Link to comment
Aristos Queue Posted April 1, 2009 Report Share Posted April 1, 2009 QUOTE When I right click on the call library function on the block diagram and configure the parameters, they are set as follows. You say "they are set as follows." Does this mean that LV filled in those values for you or you configured them this way? I ask because that configuration is obviously wrong. The data type for your return type and both args should be double, not integer. Quote Link to comment
fillalph Posted April 1, 2009 Author Report Share Posted April 1, 2009 Aristos Queue: I configured them this way. I thought I read a table that showed the conversion between LabVIEW and C, but I had it wrong. Thank you for your help. Cheers Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.