11-09-2005 04:22 PM
11-10-2005 10:16 AM - edited 11-10-2005 10:16 AM
Message Edited by mvr on 11-10-2005 10:16 AM
11-10-2005 11:01 AM
Thanks for the response. I was looking at the following CVI lib functions;
LoadExternalModule, GetExternalModuleAddr / RunExternalModule,
My understanding of these CVI lib functions is that I can have a developer write his test software(LabWindows CVI) module(s), compile it into its own obj(s) and with the executive access/run his test software(objects) via LoadExternalModule & GetExt......
The module & function name(s) could possibly be provided via an ' ini ' configuration file (always interrogated the same way by the Executive) that the test developer must use to include his modules path(s), module name(s) and module function name(s).
Do I have the correct understanding of these functions or Not. Please comment !
11-10-2005 11:21 AM
You are on the right track. You can definitely do it with those functions. An alternative is to use the Windows SDK LoadLibrary() and GetProcessAddress() functions. It depends how independent of CVI you would like to be. It is about the same level of work for both (don't use the SDK if you are using the CVI base package and do not have the windows sdk from some other microsoft product installed).
Using an ini for the test table works fine, CVI has an instrument driver (.fp) that makes ini access pretty simple. You can also use a simple text file or the ever popular .csv format that would allow your test tables to be constructed from excel. The coding is not the hard part, honestly it is the design, and limiting the feature creep that occurs with this type of project.
You will need to define how you pass parameters to/from functions. Two common ways to pass them generically are the use of pointers to voids, and variable argument lists.
Good Luck!
11-10-2005 12:15 PM
11-10-2005 12:26 PM
11-10-2005 03:04 PM
I developed a small project and that worked fine but I ran into a problem when an object calls another object. Shouldn't the object being called have the required knowledge of the object it is calling ?
ex.
defined in test1.c myfuncA calls test_PowerUp and test_Init
defined in test2.c test_PowerUp, test_Init
test1.c & test2.c objects are in the same project and have been checked - test1 has no problems calling and running test2 functions.
When I Load test1 object and test1 myfuncA function into my executive it runs myfuncA without any problem but when myfuncA calls test_PowerUp and test_Init (Commented Back Into test1.c) test1.c module Loads OK but I get a 'Undefined references' error for the GetExternalModuleAddr
Anyone ever work with this or have any answers as to why the calls in test1.c are undefined at this point ? Shouldn't test1 object contain all references pertaining to test2 ? My executive doesn't have to know anything about test2 object ?
I asked the question in a seperate thread but how would I compile to get a .obj file not a nidobj or niobj ? The help contents indicates I should access by selecting Options>>Create Object File ---- Where is this ? Did not see it in the Options pulldown menu ?
RTyson
called
11-11-2005 03:22 AM
11-11-2005 08:03 AM
11-11-2005 08:07 AM
Thanks MVR for the explanation !
RTyson