BTDT Posted April 7, 2006 Report Share Posted April 7, 2006 Using LabVIEW I would like to create a pipe to PERL so that I can interactively execute PERL commands. I have been trying to create the PIPE with the command line "perl.exe -de 42" to start up the debugger, but it opens a terminal window and requires me to type in the commands. It appears as if the PERL debugger does not connect to the standard IO streams. I am using: Windows 2000 LabVIEW: 7.0 OpenG Pipe Toolkit: From CVS on April 6, 2005 Perl: ActivePERL 5.22 Does anyone know how to get this to work? Is there a way to tell PERL (or the PERL debugger) to attached to the standard input and output streams? Any other ideas? Unfortunately I must keep perl.exe running for what I am doing and cannot call it with a number of small scripts. I've attached a test VI (including the necessary PIPE vi's from CVS) if anyones interested in testing. You will need ActivePERL V5.22 installed, be running windows NT/2000/XP and will have to update the PERL5LIB path on the block diagram. The test VI demonstrates that the DIR command works as expected, while the PERL command does not. BTW, there does seem to be a bug in the openG pipe library where the first call to it doesn't properly attach to the standard output stream. You can see this with the test VI without installing PERL. Thanks for the help Download File:post-2949-1144443407.llb Quote Link to comment
BTDT Posted April 7, 2006 Author Report Share Posted April 7, 2006 So after a few more hours of testing I think I've got a solution, I had to set the environment variables as follows before starting up the PERL debugger PERLIO=:stdio PERLDB_OPTS=TTY=/dev/tty0 Readline=0 Hope this helps someone. Now I have the problem that the PIPES don't seem to be working in LabVIEW 8.0. Guess this projects stays with 7.x Quote Link to comment
Mike Ashe Posted April 8, 2006 Report Share Posted April 8, 2006 I know that you are using ActivePerl, but have you also looked at LabPERL open source? This might work as well, unless you are tied into ActivePERL Quote Link to comment
Rolf Kalbermatter Posted April 10, 2006 Report Share Posted April 10, 2006 Now I have the problem that the PIPES don't seem to be working in LabVIEW 8.0. Guess this projects stays with 7.x As the original author of the OpenG Pipe source code I can only say that the code as present now is still an alpha work in progress. I haven't found much time to go deeper into it and just got it so far to work somehow under Windows although there needs to be done more testing and also the Linux and MacOS parts would be nice to have. What might be the problem with LabVIEW 8 I have really no idea. Pipes under Windows at least are a somewhat fragile technology with lots of possible problems and it is very well possible that LabVIEW 8.0 does something with the Command Line Console for its own internal dirty work that might conflict with trying to redirect standard IO to pipes. I haven't currently any time to dig deeper into this so anyone with some C programming knowledge feel free to investigate what might be the problem. The code comes with the source code for a simple command line executable that can act as loopback device so it is definitely a good idea to try to make the DLL work with that example under LabVIEW 8 first. If this works but not with PErl then it is likely that Perl does some weird stuff too that clashes somehow with LabVIEW 8. Rolf Kalbermatter Quote Link to comment
george seifert Posted May 17, 2007 Report Share Posted May 17, 2007 QUOTE(Michael Ashe @ Apr 7 2006, 09:23 PM) I know that you are using ActivePerl, but have you also looked at http://forums.lavag.org/index.php?s=&showtopic=2805&view=findpost&p=10040' target="_blank">LabPERL open source?This might work as well, unless you are tied into ActivePERL I just tried LVPerl and get the following error "TCP Open Connection in Open Perl Connection.vi". The Open Perl Connection.vi says that the remote port must match Perl's. How do I know what port to use for Perl? George Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.