10-26-2009 09:47 AM
My problem is this:
I have to do readings of several machines. The
reading is done through a serial communication (and therefore I use the
VISA function). These readings are collected by an agent (in this
example, Simul machines.vi) which is responsible for distributing, via
DataSocket, the reading of each machine to the corresponding agent
(DS 1.vi and DS 2.vi).
So far it works perfectly.
The problem arises when I want to view all variables in each of the readings (in this example, "status"):
I 've created another agent (monitor.vi) who reads the array (global variable). This array contains the "status" variable in each of the agents on each machine.
Why it doesn't works?
I enclose a simple example. Run Simul machines.vi (Requires Data socket)
Thanks
_______________
Vicen
LV 7.1 / Win XP
Solved! Go to Solution.
10-27-2009 05:03 AM
I've solved the problem, but I don't understand my solution:
I needed to insert in the two cases (true and false) the function "Replace array subset".
Why? Is not similar placing the function outside the case structure?
10-28-2009 03:35 AM
Hi vicens
It isn't possible to execute your code because you haven't included subVI "cut message.vi". Please, attach it.
10-28-2009 08:16 AM
10-28-2009 08:46 AM
The image of the code you posted
is very similar to the example shown below
THe above images shows a BAD construct and was posted as part of my Action Engine Nugget to illustrate a Race Condition.
Please review that nugget to see how an Action Engine will prevent race conditions.
Just trying to help,
Ben