RE: Multiple loops interrupt each other :(
- Posted by "Weichel" <steen.weichel at deepspace.dk> Jan 13, 2004
- 379 views
I am trying to merge bit patterns for the parallel port data segment that is the 8 data out registers. I have one stepper running one the four first bits, the other on the next four bits. Of course writing only to set a bit state for only one of the motors, will also set the bits of the other motor. So i have to merge the bit patterns into one bit pattern output for the port which provides the required state for both motors. I think I will try to make three seperate programs: one for each motor and then a third that will take data from the two motor programs and only do the writing to the port of the assembled bit pattern. A bit like Kat is suggesting. Any comments? and thanks for the advice. Steen Weichel -----Original Message----- From: Matt Lewis [mailto:matthewwalkerlewis at yahoo.com] Sent: 13. januar 2004 12:28 To: EUforum at topica.com Subject: RE: Multiple loops interrupt each other :( > From: Kat > On 12 Jan 2004, at 22:59, I Mullins wrote: > > > > > Weichel wrote: > > > > > > > > > Hello list, > > > > > > I have a couple of loops that I want to run in parallel > > > but, when I start number two the first stops and vise versa. > > > When I stop number two number one will continue. > > > > > > Each loop are in a procedure for itself and I am using the IDE > > > to develop the program. > > > > Short answer: you can't. > > Euphoria does not have threads. > > > > You might be able to write some tricky code which might appear to > > operate in parallel, but it would be: 1. tricky, and 2. not > > actual parallel processing. > > Two ways you can do this, and both means two separate programs: > > 1) use dde, socks, or ipc to link two apps > 2) use the windows server in the archives, it's like win3.1 > in written Eu! Here's another: use timers instead of loops. You're using the IDE, so I assume you're running under Windows. Set a couple of timers, and run one iteration of the loop for each time the timer fires. The other question I would ask is, what are you trying to do in the two loops? Maybe there's a different (better?) way to do it. Matt Lewis TOPICA - Start your own email discussion group. FREE! --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.536 / Virus Database: 331 - Release Date: 03-11-2003 ---