1. Data Acquisition
- Posted by Mike <vulcan at win.co.nz> Oct 01, 2002
- 392 views
Win32 coders, I need some advice on a data acquisition project I have. Basically, a continuous series of batches of bytes is supposed to be acquired by the system and processed. From what I understand, Euphoria is not reentrant and an event must have finished being processed before another one can be started. I presume that this also holds true for EU_to_C programs, right? The problem as I see it is this: Because Eu programs are not reentrant and because there will be a huge amount of program latency to process each batch of bytes, I am worried that my code will not be able to service each NEW_BATCH_EVENT in a timely manner. I am not intending to use a data acquisition card but will grab the data either using the printer port or maybe using a (very inexpensive) digital I/O card. I will be reserving a huge buffer in memory to store each new batch but since there is no buffer (that I know of) associated with the intended acquisition devices I am fairly sure that timeouts will occur from time to time and I really cannot afford to lose any of the data. The system will be Win95 and each batch will be several k long. I am expecting that a Eu program will actually capture the data and plonk it straight into the memory buffer. The external device sending the data in will be a microcontroller and it will be able to hold just over 1 batch of data in it's memory but will be acquiring data more or less continuously. Ideas, anyone? Regards, Mike
2. Re: Data Acquisition
- Posted by Kat <kat at kogeijin.com> Oct 01, 2002
- 386 views
On 2 Oct 2002, at 0:56, Mike wrote: > > Win32 coders, > > I need some advice on a data acquisition project I have. > Basically, a continuous series of batches of bytes is supposed to be > acquired by the system and processed. From what I understand, Euphoria > is not reentrant True, but why must it be reentrant? > and an event must have finished being processed before > another one can be started. Correct. But if the program can't keep up with the data flow as one instance, and you spawn another process and it cannot keep up either, eventually you will have hundreds of processes and win95 will slow down to the speed of a ZX80 from task swapping. The moral is: i believe Eu will be fast enough, unless you are doing signal extraction from real time video or audio?... in which case i suggest throwing hardware at the problem (you can buy an aweful lot of LM567 or 566 PLL's for the price of a new puter, and the hardware will be faster.). Kat, curious as a
3. Re: Data Acquisition
- Posted by thinkways at YAHOO.COM Oct 01, 2002
- 402 views
you can run mutiple processes, but they will not be threaded. you might have a master program that will trigger off an event and call a seperate program to handle the data buffers, however I'm not sure how you would expect them to share the same I/O device. Possibly you might use tcp/ip sockets in a client/server config and make your app distributed. --- Mike <vulcan at win.co.nz> wrote: > > Win32 coders, > > I need some advice on a data acquisition project I > have. > Basically, a continuous series of batches of bytes > is supposed to be > acquired by the system and processed. From what I > understand, Euphoria > is not reentrant and an event must have finished > being processed before > another one can be started.