A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
A PC running a number of instruments, some manually triggered to make a measuremnt some running at a regular intervals. Because of lots of tight timing requirements and frankly buggy drivers I want each data aquisition task to be it's own process.
I need to be able to control, monitor and get data from each of these tasks remotely or on the same machine - efficiently with large volumes of data.
First thought is a simple web server + cgi.
To monitor the status of a task I was planning on having each program update a small separate XML file which the server could either format up into html for a browser or hand onto another calling program.
I get data back either by downloading the resulting file, streaming the contents or reading the xml to get the location of the file on disk.
Any simple to install small web servers on windows that can format XML and run CGI - or do I just write something.
Just use Apache and REST to your CGI. I should be simple to open your files and return them. If you could also embed a we b server in each process and talk to them directly and save the whole writing files thing.
son of parnas
Thursday, May 10, 2007
I had thought of putting a webserver in each app - but it seemed overkill and running multiple instruments on one machine I would have to organise different ports for each.
Installing apache is a bit much for end user I'm aiming at - probably easiest just to write a minimal server in c#/.net
I think LabVIEW by National Instruments (www.ni.com) would probably solve your problems, if you can afford it. It's the industrial-strength, off-the-shelf solution for instrumentation tasks, and is widely used in the engineering and science worlds when people with budget just need to solve some instrumentation problem and move on.
Thanks have used labview - nearly works when makers get the drivers correct!
Unfortunately in this case we make the instruments. Usually they are run directly from within a gui that gives a CAD like view of the data - it's just that some of them could also be used as standalone automated systems.
I was looking for a architecture that would let you run a device directly without any loss of eficency but would also allow them to be operated remotely either by a user through a web page or automatically as some sort of remote service.
Choices are really:
1, Standalone web server with cgi starting separate apps to control each instrument but then stopping/communicating with a running app involves kludges with status files or inventing an extra layer of IPC messaging.
But I can use any standard web server or even just batch files to control them.
2, Embed a web server in each app. More complex software but easier integration into the instrument functions. Running multiple instruments on a single machine involves some aggregator which knows which port each app services is on.
Will probably go with 2 - not too difficult to write a minimal httpd server, or this could be a good excuse to try c#/.net.
Oh, memories. This sounds like the very first application I wrote as a professional programmer. And for your information I wrote it in assembler code for the (then newly released) Intel 8086 processor. Each data logging event was triggered by an interrupt.
Tuesday, May 22, 2007
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz