11-11-2019 12:48 PM
@DavideB wrote:
Now I have the problem to connect the task out and error out pins of two DaqMx read objects. How can I fix that?
No, you have two different tasks. Each task should have its own read. You can use Merge Error if you want to combine the errors. But the task wires should remain separate.
11-12-2019 03:22 AM
I merged the errors because I cant think of any other alternative to manage them.
But what about the tasks? I have two DaqMX read objects. Task should go into the DaqMx clear task (I think), which is one. Should I have two? If yes, how can I connect the previous code to them? now it is only one flow and I dont want to duplicate the whole code.
Thanks
11-12-2019 04:22 AM
With two tasks, you need two clears.
Or at least, you need to call DAQmx Clear for each of them.
If you have several operations to carry out on both, you could build an array of the DAQmx Task wires, and pass that to a For loop, but usually I just place two sets of things to clarify intent. If you have lots of operations (Stop, Clear, check for specific errors, format a message saying a task ended etc) you could just use a subVI and place two copies of the subVI for example.
11-12-2019 05:02 AM
I have just two DaqMx read, so I will use two clear tasks at the end.
Still, I had to merge errors, because otherwise it seems to me I had to duplicate all the previous code.
I think this solution is ok (I attach the code for reference in case, sub-vi RDI is just a Daqmx read plus some algebra).
Thanks for your support
11-12-2019 06:08 AM
11-12-2019 06:59 AM
Straighten out wires?
i assume it’s just an esthetic thing..
11-12-2019 07:04 AM - edited 11-12-2019 07:07 AM
Hi Davide,
@DavideB wrote:
I think this solution is ok.
Some more improvements:
11-12-2019 09:03 AM
Thanks for your suggestions,
but if I unbundle the error I get an error, at least with my old version of Labview.
I understand from your previous post I should handle errors differently, but I dont know how..
11-12-2019 11:55 AM
Hi Davide,
@DavideB wrote:
Thanks for your suggestions,
but if I unbundle the error I get an error, at least with my old version of Labview.
I understand from your previous post I should handle errors differently, but I dont know how..
Which LabVIEW version do you use?
On error handling:
When you want to save data to file even when one of your two DAQmx tasks gives an error then you should NOT wire that error cluster into the WriteFile function: when an error is present at error in it will not write any data…
11-13-2019 04:28 AM
I use labview 2010