NL5 Forum Index  
 FAQ  •  Search  •  Memberlist  •  Usergroups   •   fChat   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 Starting HTTP link from script View next topic
View previous topic
Post new topicReply to topic
Author Message
darko



Joined: 18 Aug 2009
Posts: 14

PostPosted: Wed Oct 07, 2009 6:09 pm Reply with quoteBack to top

Hey,

Is there a way to start an HTTP link from a script? If not, how hard would this be to implement in the next version?

Basically, we are trying to launch a schematic and open an HTTP link for remote control all from a script. Something like:

http(80); % opens an http link at port 80
View user's profileSend private message
nl5
Site Admin


Joined: 15 Jan 2009
Posts: 25

PostPosted: Wed Oct 07, 2009 6:37 pm Reply with quoteBack to top

I'm not sure if script is a right place for starting http link. How about starting it from command line parameter, when you start NL5:
nl5.exe http
The port number should be already set up in the program: it is stored in the registry.
Another solution could be remember if http link was open when nl5 closed, and start it automatically next time nl5 starts: I would prefer this one.

By the way, "Run until...<condition>" transient option is ready, just too lazy/busy to put everything in the Manual. Hope to release it soon.

Thanks,
Alexei.
View user's profileSend private messageSend e-mail
darko



Joined: 18 Aug 2009
Posts: 14

PostPosted: Wed Oct 07, 2009 6:49 pm Reply with quoteBack to top

That would work. We recommend making it a command line option so it doesn't get confused with a file:

nl5.exe -http

Anyways, that would work great for us.
View user's profileSend private message
Erik Weyker



Joined: 21 Oct 2009
Posts: 1

PostPosted: Wed Oct 21, 2009 1:22 pm Reply with quoteBack to top

Hi,

I am trying to help Donny use the -http command line option and we are having some problems. It appears that the configuration file is not being read until after the http connection is open. We are trying to open multiple instances of NL5 each with a different port address. We launch NL5 with a specfied "nlp" file with the unique port address. We can start the HTTP link by hand and it works. But if we use the --http flag, then it doesn't. I believe that it trying to open the default port 80 prior to reading the configuration file. Coule you please check to see if this is the case?

Our goal is to run multiple copies of NL5 tied to separate cores on a multicore processor. We are running NL5 inside of wine on a ubuntu box. This allows us to use the "taskset" to run each instance on a specified cpu core. I have been able to speed up Donny's simulation by over 5 times on a 8 core box.

I have notices some problems with the HTTP link.
1) I have seen the http dialog box text edit lock up. The http link still works, but no new input is displayed. Also when you stop and restart the link it will not clear the http log. I believe this is caused by exceeding the windows edit dialog box buffer size. (I know that is uses to be limited to 32K)
2) Our simulation get slower each time we run them. This is related to the amount of data in the http dialog box. If I stop the link and restart it, my simulaiton will be fast again. The only thing I think is changing is that the http dialog buffer is being cleared.

We are using the NL5 in a server mode. It would be nice if we could launch NL5 is a simple http server with no GUI interface. This would speed up our simulation if we simply used it as a numeric server engine.

Thanks,

Erik Weyker
Enphase Energy
View user's profileSend private message
nl5
Site Admin


Joined: 15 Jan 2009
Posts: 25

PostPosted: Wed Oct 21, 2009 2:05 pm Reply with quoteBack to top

Hi Erik,
Thank you for comment,
1. ...configuration file is not being read... - my fault, fixed.
2. ...http dialog box text edit lock up... - actually, TMemo component I'm using does not have a limit, or at least it worked with 1.5 MB of text. However, it definitely makes sense to limit log size. I'll add the limit to preferences settings.
3. ...It would be nice if we could launch NL5 is a simple http server with no GUI interface... - this is problematic, since in current architecture at least a schematic must have a window. But, you can send command "display off" to prevent from displaying transient/AC data during simulation, and then enable it by command "display on".
I'm in the middle of some changes right now, I'll send you a link to a temporary fixed version as soon as it is ready.
Thanks,
Alexei.
View user's profileSend private messageSend e-mail
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum