There is a slightly newer released version of lvPortDriver release last September that would be better to start with, as some bugs
were fixed.
You should be able to build lvPortdriver as any other shared app, it requires epics base, asyn, and the labview header files. The
LabVIEW header files should be in the cintools subdirectory directory of your LabVIEW installation e.g. C:\Program Files (x86)\National Instuments\LabVIEW 2016\cintools if you put those header files somewhere where lvPortDriver can find them (set the directory
in your RELEASE file) then you should be able to build it.
Then you’ll want to build the IOC and include lvPortDriver. Since I don’t usually build on the cRIO, I prefer to configure epics base
for a static build, but either should work. With a dynamic build all the shared libraries included with the IOC will have to be on the cRIO, and LabVIEW will just say error loading library if any of them are not found.
If you install the VIP file included with lvPortdriver (on your LabVIEW development machine) you can run the IOC using the VI that’s
installed (page 6 of the talk you referenced).
Inside this vi is a Call Library Function Node, that runs the callmain function in the lvtest shared library (if you build your own
IOC you’ll have to add this function, so that there is an externally callable function for the shared library instead of the main function of the IOC.
It also sounds like you may be having problems with running shared libraries from LabVIEW on Linux RT. What I usually do is install
the shared libraries in /usr/local/lib on the cRIO and then run ldconfig so that the cRIO will use the library. ldconfig ?p can be used to verify the list of shared libraries that are loaded.
If you build everything statically, you can just name the IOC’s shared library liblvPortDriver.so and that’s the only shared library
you need, or you can have multiple shared libraries.
--
Correspondence
Scott Baily
AOT-IC, MS H820
Los Alamos National Laboratory
Los Alamos, NM 87545
ph: (505) 606-2260
I had a cRIO-9030 with NI Linux RT OS,and had already built EPICS IOC (base-3.14) on the cRIO by PuTTY.
The only thing I want to do now is to start the IOC using LabVIEW instead of typing command via PuTTY. But the problem
is coming.
Firstly, I tried to use "System Exec.vi" in LabVIEW to send command like "softIoc -d xx.db", but it can not be "continuous",
which means it will exit IOC shell soon once the process begin to run.
Next, I tried to use "lvPortDriver1.0" which is a software developed by LANS LLC:
In the ideal situation, IOC built as a shared library and be started from LabVIEW.
However, I have no idea to exactly built "lvPortDriver" on my cRIO, eventhough I have built asyn and modified ./configure/RELEASE
Then I just focused on the shared library producted by "lvtestMain.cpp". I used "g++" to compile ,link (with libCom.so in EPICS base),
and get a .so file. But when I use "Call library function node" in LabVIEW with the .so file, the IOC can not be started correctly,
eventhough there was no error in LV.(I can not monitor these PVs on my PC).
Does anyone have some detailed instructions for using "lvPortDriver" to start IOC as shared library?
Or any better option to start IOC via LabVIEW on cRIO?
--
------
Best Regards,
=====================================================================
赵泽锋 (Zefeng Zhao)
Institute of Applied Electromagnetic Engineering,
SEEE, Huazhong University of Science and Technology
Luoyu Road 1037#, Wuhan 430074, China
Email: [email protected]
=====================================================================