|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Native call
Quote:
Quote:
Code:
extern "C"
{
void ZomBDashboardInit(ZomBModes mode, char* ip);
int ZomBDashboardAdd(const char* name, const char* value);
int ZomBDashboardAddDebugVariable(const char* name, const char* value);
const char* ZomBDashboardGetString(const char* name);
int ZomBDashboardGetInt(const char* name);
float ZomBDashboardGetFloat(const char* name);
double ZomBDashboardGetDouble(const char* name);
int ZomBDashboardHasSpace();
int ZomBDashboardIsConnected();
int ZomBDashboardIsAnyConnected();
int ZomBDashboardCanSend();
int ZomBDashboardSend();
void ZomBDashboardResetCounter();
}
Quote:
I've also noticed (of my 3 c calls) the following: void ZomBDashboardInit(ZomBModes mode, char* ip); //no library name needed int ZomBDashboardAdd(const char* name, const char* value); //Library needed, does not give errors int ZomBDashboardSend(); //library needed, gives errors |
|
#2
|
|||
|
|||
|
Re: Native call
I added your ZomB Init.vi to the cRIO portion of the 2010 project and it was still broken wanting a library name. I entered ZomB.*, closed, and it showed that it was no longer broken. I built and it didn't indicate any errors. Unfortunately, I don't have a cRIO at home, so I can't test the fix much more than that.
Since I didn't receive your project, are these VIs being loaded using a project setup for the cRIO? If so, I believe you will be able to use the library name statically typed into the library, and the exe will link up on the cRIO the way you want. I noticed that some of the CLF nodes use the path and others don't. Again, I don't know all of the RT details, so I can't say exactly why the authors did it different ways. Make sure that your VIs are in the cRIO section of the project and that they list the cRIO context in the lower right of the window, put the ZomB.* in the dialog as the library name/path. Let me know how that works. Greg McKaskle |
|
#3
|
||||
|
||||
|
Re: Native call
nope, still
Quote:
I've also copied ZomB.out to /ZomB.out /ni-rt/ZomB.out /ni-rt/startup/ZomB.out /ni-rt/system/ZomB.out <- Loaded on startup dll's |
|
#4
|
|||
|
|||
|
Re: Native call
Thanks for the error messages.
It looks a bit like the load that takes place as part of the deploy is complaining about not being able to load the library. It shouldn't matter, but it is. Please change the configure settings to have the checkbox for the input path, and wire up a constant with ZomB.*. Either do this for each, or comment out all but one until you don't get a deploy error. Greg McKaskle |
|
#5
|
||||
|
||||
|
Re: Native call
Quote:
anyway, I got it running, and the library call spits out Quote:
|
|
#6
|
|||
|
|||
|
Re: Native call
There is a diagram disable structure in the same palette as while loops, for loops, and case structures. Just drop that on top of what you want to disable.
|
|
#7
|
|||
|
|||
|
Re: Native call
Please let me know if you can reproduce these results.
I placed the ZomB Init.vi into Begin.vi and changed it to be configured to call into the ZomB.* library within the dialog. This failed to run button deploy until I ftp'd the ZomB.out into ni-rt/system, and then, as expected, Begin.vi would run fine. I built an executable that included Begin, deployed and rebooted to see it running. As far as I can tell, the call was successfully made to ZomB.out to init. It did not return an error. If it doesn't work please give details of how it fails. Greg McKaskle |
|
#8
|
|||
|
|||
|
Re: Native call
Quote:
In the call library node, you should only specify the name.*, not the path. If you have it in the start-up DLLs, then you should see it loading in net console on boot. If that is succeeding, then the VI should not be loading it again. If it fails to load on startup, then you have a problem with your library. -Joe |
|
#9
|
||||
|
||||
|
Re: Native call
Oh, silly me! I had an earlier version of ZomB in /ni-rt/system, and assumed that labview would be using the newer one in /ni-rt/startup since it deployed there!
Now that I have it working, is there anyway to generate a lvlib that can be automatically included in projects? |
|
#10
|
|||
|
|||
|
Re: Native call
You've already gotten it to work, but for anyone else doing this level of integration, LV loads the library from the path entered -- made a bit more complicated for RT targets. For that reason, most of the time, you only enter in the library name and let the OS and/or LV insert the appropriate paths. This is controlled by LibPath or a similar mechanism and includes the LV search path. Also note that some OSes may only allow one DLL with the same name to be loaded, even if from different paths or different versions.
An lvlib provides a namespace, an ability to determine what is private and public, and that is about it. If you build VIs to wrap your DLL, you can ship them in a folder and if you like, you can include an lvlib file descriptor too. You can also include a dir.mnu file. As for where to place it, you have a number of choices. Possibly the best place to tell users to install it is into the vi.lib/addons directory. Another location is the user.lib directory. Either of these can easily integrate into the palettes and if used by the user, the VIs will be downloaded to the cRIO. I believe the users will need to install the lib on the cRIO as part of the build spec or via ftp (not sure about this one). Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java Native Interface (For using code made in windriver) | biojae | Java | 3 | 07-03-2010 22:46 |
| LAST CALL! | Amanda Morrison | Awards | 2 | 22-02-2008 10:21 |
| Official Native Win32 version of GNU Make | Astronouth7303 | Programming | 0 | 05-01-2007 00:59 |
| Call me an optimist... | Eric Tarnowski | General Forum | 3 | 02-10-2001 16:55 |