Hello everybody, I am doing my final degree proyect and I have a doubt doing it. I have to create 2signals in order to comando a valve and acquire an other one that comes from a preassure sensor. I have to substract the signal of the preassure sensor from one of the other I create and operate in a block. I have done this with a Productor/Consumer archytecture and it works in terms that at the final of the block I obtain the values I want to get, but the real case implies that this current value must be added to one of the simulated signals and the pass to the BNC2120. I attach one picture of the structure below.
I have tried to get out the DAQmx from the first while and make a "second consumer", but it does not work properly (in fact it stops because of an error). Then I have tried to use a global variable (the most easy solution) but it works only with the first value the global variable had in the first iteration; I have use wait structures to try if with more time the global variable updates itself but does not fit. Other "solution" I have tried is make this activity in a State Machine but has the same problem of the "second consumer".
I any of you have an idea of how can I continue, please tell me, I will be very greatful.
Below are the structure and a picture of the VI.
Thank you very much.
Sinceresly,
Miguel.