02-13-2017 01:06 PM
Hi everyone,
I was tasked to modify the attached program for working simultaneously with 2 additional channels. The original has one output channel for excitation and one for measurement, which is later filtered and saved.
I have duplicated the design and made arrays of channels to modify the create task vi's to use 2 inputs and 2 outputs. Measurements should always be synchronized and output excitation has to be different for both channels (so I cannot use a single excitation loop for 2 channels, I believe). Please let me know if I am on the right track. I keep getting the error of reserved resource on the start task.vi for some reason, even though I am not duplicating those.
I think my efforts have been somehow brute force, since there is probably a way to simplify all of these, but I am in a time constraint so I needed to get something functional before focusing on improving the overall design.
The original program is DNA Detector v14.3, while the new one is DNA Detector Experimenting. Another dependent vi is also attached.
Thank you very much for your help!
Regards,
Pedro Ch.
02-13-2017 01:51 PM
Hi taxo,
it's a bad idea to create a task containing two channels and then to split the channels into two separate tasks when trying to output data. Really bad…
Do you know how to specify two channels with just one channel reference? The LabVIEW help explains this…
02-13-2017 01:57 PM
Thanks for the quick reply!
Yeah i had a feeling that it was a bad idea, do you have any suggestions on how I can proceed? I want to be able to scan and choose the channels evey time I run the program, so the link you provide it seems to only indicate how to reference them if they were always the same.
I really appreciate your help, and I hope I have described my issue well.
Taxo
02-13-2017 02:04 PM - edited 02-13-2017 02:07 PM
Hi Taxo,
I want to be able to scan and choose the channels evey time I run the program, so the link you provide it seems to only indicate how to reference them if they were always the same.
Why do you think so? The link tells you how to put multiple channels into one channel reference control!
When your VI is in run mode: click the array of the channel reference. A menu opens: select "Search…". Now you get a listbox with all available channels: simply select all channels you like using shift/control keys and mouse-click…
When your task contains two channels then your DAQmxWrite operation expects an array of 2 elements (for "N channel 1 sample" mode)!
Btw.: did you examine the example VIs coming with LabVIEW? There are probably also examples of how to read or write multiple channels in a task…
02-13-2017 02:10 PM
Oh ok I understand. I actually did a version of that earlier. However, if i picked 2 channels using shift then the write function would write the same thing to both channels. Is there a way to treat them independently ?
02-14-2017 01:25 AM