EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: How to start EPICS IOC via LabVIEW on cRIO
From: "Baily, Scott A" <[email protected]>
To: "[email protected]" <[email protected]>, tech-talk <[email protected]>
Date: Mon, 26 Mar 2018 14:54:24 +0000

One of the changes in the new release was to replace .dll in all call library nodes with .*  as this will use .so on Linux and .dll on WIN32 systems.

lvInitialized is looking for lvPortDriver.dll if you’re using the old version.  I expect you’ll have this same problem with all of the other call library nodes in the LabVIEW code.

If you don’t want to move to 2016 or newer LabVIEW, then you’ll need to modify the code.  (If you have access to LabVIEW 2016, you might be able to save the library for 2015 instead), there shouldn’t be anything that requires the newer LabVIEW (although I’m already encountering cRIO modules that require LabVIEW 2017).

One other difference you’ll find is that the original release did not allow one to write to arrays without wiring the status control (newer version assumes NO_ALARM status if the control is not wired).

Either way I’d recommend using the latest version of the c++ code, it fixes some bugs with arrays, and with using more than one port.

 

As far as the build process, I usually put the LabVIEW headers in a different include directory (as if they’re a separate shared App), but as long as it’s working.

The lvInitialized function is there to make sure that the LabVIEW program started and initialized the ports before the IOC is started.  This would only be an issue for systems where the IOC is started independently of the LabVIEW program (if done properly this would work on all systems except LinuxRT).

Even without that call you’ll be able to run the IOC, you just won’t be able to use lvPortDriver (driver initialization will return an error).

 

Also, note that one you have this up a running, it will be normal to lose connection the first time you deploy code from the debugger if the IOC had previously been run.  I have not found a way to properly run down all of the asyn tasks when the IOC exits, and if I properly delete all items, then  the tasks continue to try to access them.

--

Correspondence

-------

Scott Baily

AOT-IC, MS H820

Los Alamos National Laboratory

Los Alamos, NM 87545

ph: (505) 606-2260

From: [email protected] <[email protected]>
Sent: Sunday, March 25, 2018 9:04 AM
To: Baily, Scott A <[email protected]>; tech-talk <[email protected]>
Subject: RE: How to start EPICS IOC via LabVIEW on cRIO

 

The error "seemingly" has been solved, but new problems occur.

 

I repeted the same make process I did yesterday in my PC with CentOS 7 instead of crio, the result didn't change. 

Thus I thought maybe the "Makefile" in the top directory doesn't contain informations about the subdirectory "lvPortDriverApp". 

So I want to "make" in this subdirectory firstly. I put those labview headers to ./lvPortDriverApp/src, 

commented out "CROSS_COMPILER_TARGET_ARCHS += win32-x86-mingw" in ./configure/CONFIG_SITE,

 "make" in /lvPortDriverApp and top directory sequentially, put liblvPortDriver.so liblvtest.so to /usr/lib and "ldconfig".

 After these steps I finnally built the lvPortDriver without "errors".

 

Then I installed the VIP file(Note that I use the inital version since my LabVIEW is 2015 32-bit),

and changed Initdone VI's library name from ".dll" to ".so". When I deploy and run the LabVIEW program on crio,

the connection between PC and crio would break. It seem was caused by "lvInitialized" function.

I just deleted other Call library function nodes except "callmain" since what I only want to do is starting IOC.

However in this case it neither produced error nor started the IOC successfully (I can't "caget" the PVs).

 

If the liblvtest.so file exists, why the LabVIEW program can't call it in right way? Is the .so file wrong?

When I use the "callmain" function, whether the program can stop?  Will it run the "iocsh" all the time?

 

Thank you very much!!!

 

 

Zefeng Zhao

 

Date: 2018-03-24 00:39

Subject: RE: How to start EPICS IOC via LabVIEW on cRIO

lvPortDriver.dbd should be located in lvPortDriverApp/src,

and when that directory builds, it should be installed into the dbd folder

for your system that would be: /usr/local/EPICS/synapp/support/lvPortDriver-master/dbd/

perhaps somethings going wrong the build or install from lvPortDriverApp/src  (like no permission to create the directory, or a case mismatch in the filename)

 

From: [email protected] <[email protected]>
Sent: Friday, March 23, 2018 7:49 AM
To: tech-talk <[email protected]>; Baily, Scott A <[email protected]>
Subject: RE: How to start EPICS IOC via LabVIEW on cRIO

 

Dear Dr. Baily,

 

Thank you very much for giving me these instructions about "lvPortDriver"! But I'm still unable to build it successfully. 

 

I built the EPICS base 3.14.12.7, asyn4-30, and put the LabVIEW header(my version is LabVIEW-2015 32-bit for windows) 

and the newer released version of lvPortDriver to my cRIO-9030.

Then I set the ./configure/RELEASE file like (annotations in the file are omitted ):

 

EPICS_RELEASE = R3.14.12.7

SUPPORT=/usr/local/EPICS/synapp/support


ASYN=/usr/local/EPICS/synapp/support/asyn4-30


LINUX_GPIB=NO


LABVIEW=/usr/local/EPICS/synapp/support/labview


EPICS_BASE= /usr/local/EPICS/base-3.14.12.7


 

Next I typed "make" in this configure directory, "cd ../",and "make" in the lvPortDriver directory.

But errors occur:

 

make[3]: Entering directory '/usr/local/EPICS/synapp/support/lvPortDriver-master/lvtestApp/src/O.linux-x86_64'
perl /usr/local/EPICS/base-3.14.12.7/bin/linux-x86_64/makeIncludeDbd.pl base.dbd lvPortDriver.dbd asyn.dbd lvtestInclude.dbd
echo "../O.Common/lvtestInclude.dbd : ../Makefile" >> lvtest.dbd.d
Expanding dbd
Can't open include file "lvPortDriver.dbd"
Error at or before ""lvPortDriver.dbd"" in file "../O.Common/lvtestInclude.dbd" line 2
dbExpand: Input errors, no output generated
/usr/local/EPICS/base-3.14.12.7/configure/RULES.Db:265: recipe for target '../O.Common/lvtest.dbd' failed
make[3]: *** [../O.Common/lvtest.dbd] Error 1
make[3]: Leaving directory '/usr/local/EPICS/synapp/support/lvPortDriver-master/lvtestApp/src/O.linux-x86_64'
/usr/local/EPICS/base-3.14.12.7/configure/RULES_ARCHS:61: recipe for target 'install.linux-x86_64' failed
make[2]: *** [install.linux-x86_64] Error 2


 

I tried to uninstall and rebuild it several times, but the result didn't changed.

What should I do to correct the error? Look forward to your guidance. 

 

Best Regards,

Zefeng Zhao


References:
RE: How to start EPICS IOC via LabVIEW on cRIO [email protected]
RE: How to start EPICS IOC via LabVIEW on cRIO Baily, Scott A
RE: How to start EPICS IOC via LabVIEW on cRIO [email protected]

Navigate by Date:
Prev: Re: Job opening for embedded software engineer at PSI Dirk Zimoch
Next: Nanomotion XCD Series of motor controllers Ronald L. Sluiter
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: How to start EPICS IOC via LabVIEW on cRIO [email protected]
Next: seq error 梁雅翔
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 26 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·