10-27-2023 07:38 PM
Hi everyone,
I am working on a LabView VI to run and display data coming from four uniaxial accelerometers, read their voltage in a waveform graph, and acquire and save the data in a TDMS file. I am using the voltage-continuous input example vi and expanding it to 4 accelerometers. I have attached the vi here. I am getting an error: -50103, The specified resource is reserved. The operation could not be completed as specified. Task Name: _unnamedTask<5F>
I am assuming it's because we can perform only one task at a time. I am creating this VI so it will save readings from each accelerometer at once. I am also trying to have a single stop button, but I am unsure of how to do it. I would really appreciate some help as soon as possible!
I am going to use NI 9215 on cDAQ 9189 along with Kistler 500g accelerometers connected via signal amplifier to the DAQs
10-28-2023 06:29 AM
am getting an error: -50103, The specified resource is reserved. The operation could not be completed as specified. Task Name: _unnamedTask<5F>
You are absolutely right. Those channels would need the same clocks and other hardware "resources" to run in separate Tasks. That will always cause that error.
However, you CAN create a single Task that reads from all of your channels, and you will have to do exactly that using "Dev0 ai0:3" as an example and then use the DAQmx Read.vi nCh nSample or 1d wfm instance.
10-28-2023 06:52 AM
Select More Than One NI-DAQmx Channel in LabVIEW
10-28-2023 03:58 PM
Thank you for letting me know. Another thing is that when we have one input that selects all 4 channels, how do we display waveforms for each of the input channels in a single task?
10-28-2023 05:12 PM
@pythonpotato wrote:
Thank you for letting me know. Another thing is that when we have one input that selects all 4 channels, how do we display waveforms for each of the input channels in a single task?
If you want to display all four channels in a single graph, wire the waveform data to the graph, which is exactly what your VI is doing.
If you want to display them in four separate graphs, use the index array to get individual waveform.
10-28-2023 05:23 PM
What changes will I have to make in TDMS file saving to ensure that it captures data in separate columns for each accelerometer?
10-29-2023 05:39 AM
If you have a 1d array of waveforms from DAQmx Read, simply wire that to the TDMS write. Or, you could even use DAQmx Logging and the TDMS File just gets written behind the scenes.
10-30-2023 03:53 PM
Thank you for letting me know about it. I made the changes, and it looks good. However, we wanted to have controls for sampling rate, number of samples, and voltage configuration for each of the channels too. As of now, all channels have the same sampling rate and number of samples. This is the new VI I came up with. Can you tell me how do I add controls for each of the channels in this VI? It seems kind of tricky for me to do so.
10-30-2023 05:58 PM
To have different voltage configurations for each channel, you can call multiple DAQmx Create Virtual Channels VI, as shown in Figure 2 of NI-DAQmx Multidevice Task Explained
To have different sampling rates and number of samples is more tricky. First of all, you can only have 3 AI tasks of different sample rates (Number of Concurrent Tasks on a CompactDAQ Chassis Gen II). Then you need to configure the separate tasks for different sample rates, see Signal-based Synchronization of Analog Input C Series Modules with NI-DAQmx in LabVIEW or Time-based Synchronization of Analog Input C Series Modules with NI-DAQmx in LabVIEW
10-31-2023 01:09 AM
It is quite tricky to understand this concept. However, I have also been trying to create different paths for saving TDMS files. I have bben using this article to something like that https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2TrCAI&l=en-US
But for some reason the tdms file is not showing in the saved folder. It is appearing in my recents but I keep getting this error:
I have also tried directly routing from index array but it does not work.