04-15-2008
02:39 PM
- last edited on
10-22-2025
11:02 AM
by
Content Cleaner
Hey CarlaU,
I still need to figure out how to make a fake stub so that the library function call to the VxWorks function like Basset H was saying.
He said, "You can call this with a Call Library Node in LabVIEW provided you'll need to make a fake (stub) LabVIEW.dll on the host that defines this function so the CLN will configure properly. It will only work on the RT target (VxWorks or 901x targets), not on the host, since the host has a stub."
I dont really know how to do that. Does anyone know?
04-15-2008
05:28 PM
- last edited on
10-22-2025
11:02 AM
by
Content Cleaner
Hi Rex,
Sorry, I've been unable to post over the last few days to help out due to some additional projects I've been working on. However, I'm back now and I think I can help a litte. So The process I linked to earlier says to go through these following steps:
I think your okay with Steps, 1, 3, and 4 and your really just asking how do I create a Stub dll right? So, basically to create a stub you need to compile a stub DLL using the same function names and arguments as those exported by the *.out shared library. This is also done with our some PDA targets and I found a good example here, with C code to give you the general idea.
Basically the Stub code will look like this (with includes removed):
#define DLLEXPORT __declspec(dllexport)
#define EXTERNC extern "C"
/* LvSysBatteryInfo - StubDll function that calls to SysBatteryInfo in SysManger.h in PalmOS API.
See PalmBatt.c for actual function.*/
EXTERNC DLLEXPORT unsigned short LvSysBatteryInfo (unsigned char set,unsigned short *warnThresholdP,
unsigned short *criticalThresholdP, unsigned short *maxTicksP,
unsigned char *kindP, unsigned char *pluggedIn, unsigned char *percentP)
{
return 0; //Actual code for function is in PalmBatt.c
}
And the Associated C code will look something like this (with includes removed):
UInt16 LvSysBatteryInfo (Boolean set,UInt16 *warnThresholdP, UInt16 *criticalThresholdP, Int16 *maxTicksP,
SysBatteryKind *kindP, Boolean *pluggedIn, UInt8 *percentP)
{
return SysBatteryInfo (set, warnThresholdP, criticalThresholdP, maxTicksP, kindP, pluggedIn, percentP);
}
The creation of the Stub is really so that LabVIEW RT does not pop up a warning message when you try to deploy your application that it does not recognize the .out file. I belive you can just ignore the pop up message and everything will run fine provided you have ftped the .out file to your RT target. Let me know if that makes sense or if you have issues trying to get this up and running.
Regards,
Basset Hound
04-16-2008 02:41 PM - edited 04-16-2008 02:49 PM
03-20-2009 12:51 PM
11-06-2011
02:59 PM
- last edited on
10-22-2025
11:02 AM
by
Content Cleaner
Hi CarlaU,
Sorry to disturb you. Just now I also want to use the SMB pin on the CRIO 9074 to connect to the PPS signal from the GPS receivers to synchronize the measurement (not using the PPS to correct the clock drift ). So my problem is now I can't read the PPS signal out by using the SMB pin. And I have checked this article http://digital.ni.com/public.nsf/allkb/173D82D2BFAAEA12862572D1006098B4 , but it doesn't help. Can you tell me how should I do that?
Thanks very much for your help!
Regards,
Henry
11-09-2011 10:41 AM
Henry,
Have you tried using the General Purpose Digital I/O VIs that are included on the page you reference? If so, and you are still experiencing problems, what issues are you seeing? If you can provide more information about the trouble you are having, I will be better equiped to help you.
Kind regards,
Drew T.
11-18-2011 10:01 AM
Hi Drew,
Thanks for your reply. I have tried one week to figure out the problem but failed. The thing is when I run the vi called Read Example in the folder I referenced, I get nothing from the program. When I use the probe to detect the data flow of this program. It tolds me the program is not even executed! So I just wonder is it possible that there is some little difference between the cRIOs? Since I am using the cRIO-9074 while that vi maybe for cRIO-901x. Maybe the pin number for the SMB pin is different? Just now I cannot get anything out from the SMB pin.
Thanks very much for your help!
Regards,
Henry
11-18-2011 11:02 AM
Hi Drew,
Sorry, I just realized I have used my friend's account to reply to you. Sorry.
Regards,
Henry
11-21-2011 05:57 PM
Henry,
I took a moment to set up a test system just now, and was able to get the VIs you referenced working right away. The steps I took are below.
Note that steps 3 and 9 will differ based on how you are inputting your digital signal.
Two things I would like you to do are:
LabVIEW Version
NI-RIO Version
Exact steps you took to try this out.
Good Luck!
11-24-2011 01:12 PM
Hi Drew,
Thanks for your help and now I can get the PPS signal out of the SMB pin. Basically, I want to use the PPS signal received by the SMB pin to trigger other measurements in the C series module. But the PPS signal read by the SMB pin cannot trigger the FPGA code directly and I need to use the DMA FIFO to transfer the PPS data to the FPGA module code and then trigger the measurement in the FPGA code. But now I failed to transfer the data to the FPGA module using the DMA FIFO. I have created a local variable to store the data read by the SMB pin and transfer it in the DMA FIFO code but I cannot get value out from the local variable. I have attached my project, can you give me some help on this?
Thanks very much for your help!
Best regards,
Henry