LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about CGI scripting in executable

Hi,
 
I'm trying to build an executable with CGI scripting included (via the internet developers toolkit).  I was able to do this in the past by following the directions given on the NI web site (before version 8 of LabVIEW).  The instructions are very outdated and don't really explain how to do this using the new Project Builder in LabVIEW 8.  I haven't been able to get the CGI scripting working in an executable built with LabVIEW 8 (currently using 8.2.1). 
 
The symptoms we see are: the server runs and receives the request, the VI gets cached into memory but doesn't return.
 
Thanks,
Mark
0 Kudos
Message 1 of 3
(2,937 Views)
Mark,

Are these the instructions that you are referring to?

http://digital.ni.com/public.nsf/allkb/17427B623FE6083F86256D1300705CFE


The instructions should remain the same, with the exception of the Project Explorer as you have mentioned.  This Devzone article may be helpful:

http://zone.ni.com/devzone/cda/tut/p/id/3303

0 Kudos
Message 2 of 3
(2,918 Views)
Hi,
 
A follow-up to my initial question.  It turns out the instructions basically do work as before with a couple of caveats:
 
1. The cgi code you create CANNOT be in an lvlib.  This is the problem we were having.  After removing the code from an lvlib, everything basically worked fine. 
 
2. If you create a cgi-bin destination, you cannot put the HTTP Dynamic VIs.vi file in there.  This file must be included in the top-level executable (or at least in an llb - the executable won't compile unless you do this).
 
3. The steps in the old instructions (as referenced in the previous post - http://digital.ni.com/public.nsf/allkb/17427B623FE6083F86256D1300705CFE) where you had to add your cgi files as both Dynamic VIs and Support Files isn't necessary.  You can simply create a cgi-bin destination in an appropriate place and put your cgi VIs in there.
 
These problems are significant enough that the instructions should probably be updated.  For me, it was point 1 above that was preventing things from working.  The other 2 are basically things I noticed in setting up the executable.
 
Thought I'd post these observations so that others wouldn't run into the same problems.
 
Regards,
Mark
0 Kudos
Message 3 of 3
(2,898 Views)