LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I allow multiple CGI calls to one LabVIEW application?

I currently have web server running my application, and I am having difficulty allowing multiple calls. How can I solve this?
0 Kudos
Message 1 of 7
(3,379 Views)
I'm not sure you mean passing multiple parameters, just processing multiple times or processing multiple clients. Either way, take a look at the default index.htm page for the Internet Toolkit's G Web Server. There will be a link to Basic CGI and several examples which you will probably find useful. There is a link for Multiple Parameters if that is what you are interested in.
0 Kudos
Message 2 of 7
(3,379 Views)
I have the HTTP server setup running my application, and it only allows one active CGI. It puts all other calls in a queue. Any ideas on this?
0 Kudos
Message 3 of 7
(3,379 Views)
Craig,

Is the "only one active CGI" behavior also observed when running in the LabVIEW development environment, or just after you've built an executable?

In my experience, you can have multiple active CGI calls at the same time, but not multiple calls to the same CGI VI--that's when I've seen the queuing behavior you describe. There may be ways to get around this by playing with re-entrancy settings of various VIs, but I wanted to make sure where you were seeing the problem.

Regards,
John Lum
National Instruments
0 Kudos
Message 4 of 7
(3,379 Views)
John,

The CGI calls are all going to the same CGI VI. I have spoken with the local National Instruments field rep and he informed me of the re-entrancy issue, and I have since changed all VIs to be re-entrant. This still does not fix the problem I am having.

Also, I am not building an executable. Just simply calling the VIs via HTTP. Is it possible to call an executable in this manner? And might this method allow multiple instances of the exe to run, hence allowing multiple CGIs?

Thanks,
Craig Connor
0 Kudos
Message 5 of 7
(3,379 Views)
Craig,

I'm inquiring here at NI for some additional explanatory info about the general issue, but I'm certain that building an executable out of the whole thing will not provide any additional functionality.

Stay tuned for more info,
John
0 Kudos
Message 6 of 7
(3,379 Views)
My suspicion is that the CGI requests are handled using the VI Server.
The CGI VI is dynamically loaded and the run method is used to run the
VI. This means that only one call to the CGI handler can run at a time.

I suspect that the CGI handler could be a template, a .vit VI, instead.
This alone might allow multiple calls. I don't have the toolkit in front
of me, so I can't try it out. There may also need to be a few changes
made to the internet toolkit so that they would load the template.

You might give this a try.

Greg McKaskle
0 Kudos
Message 7 of 7
(3,379 Views)