I think you are pretty much on the right track with Queues.  I have
implemented a very similar system myself using queues.  I have even
different systems connected to the serial interface, but I can
synchronise them all easily using the following method:

1) Make a VI for opening the serial port and reading the data.  The
data (parsed to extract the numbers required) are then stored in an
array (Shift register).  If the pre-determined time delay is reached
(say 5 seconds) the values are averaged and written to a Queue with a
defined data type.  Save the VI as a VI template.

2) Make a VI which starts an instance of this template VI for every
channel you require.  You can use VI Server to set values on the new
front panel before you set it's property to "running".  Setting a
timer value for all can help ensure that the X-Axis of your timing
values (if you require) are synchronised.  The clue here is to define
and initiate a QUEUE per channel.  (RS-232_1, RS-232_2 and so on).
The QUEUE name needs to be passed to the VI Template before running so
that each VI running in the background has an individual link to the
main program.
The second part of this VI simply uses an array of QUEUES, polling
them one after another with a timeout of, say 5 ms.  If data is found,
append accordingly to an XY-Graph.

I also add in some "Auto termination" in the VI template (MAx number
of values allowed in the QUEUE for example) to allow for the
background processes to find out if the front-VI is still running or
not.  There are many different ways to do this, shoose the best for
your application.

With this approach, it's not even important what instrument is
connected as long as data is written in a specified format into a
known QUEUE.  I have also developed systems where I can transparently
(almost) drop in VI Templates for instruments with similar
functionality (output data) from different suppliers.

I would post an example, but the time it would take me to clean it up
is too large.  Sorry.  If you have any further questions, don't
hesitate to ask further questions.

Shane.

Reply via email to