07-18-2023 07:42 PM
Hello, I have two analog sensors. I need to acquire the analog input of these two sensors simultaneously and plot the live data on two separate graphs. I am fairly new to labview, so any help would be great. I tried creating charts of two separate channel constants within Daqmx, but only one channel is updated. I try creating a single task with the two separate channels, but I don't know how to plot the different channels on different charts. I can only get both channels plotted on the same chart. I have been getting the error message that the operation couldn't be carried out because the resource is reserved. Can someone please provide a short and simple example of a multi-channel analog input data acquisition using DaQmx driver and plotting the separate channels on separate charts? Thank you. I appreciate the help.
07-18-2023 08:37 PM
It would be very helpful to know:
The best way to show us your code is to attach the relevant VIs. If you are using LabVIEW 2022 or 2023, many of the more experienced LabVIEW developers are running older versions (like LabVIEW 2019 or 2021), so you should "Save for Previous Version" your VI (or VIs).
Please don't show us "pictures" of your code -- we cannot inspect the wiring, edit the code, or run the code.
Bob Schor
07-19-2023 11:28 AM
Hello, I am using the cDAQ-9174
2023 Q1 64 bit
cDAQ-9174 with Analog input NI-9205, and analog output NI-9263. My analog input for my +signal of LVDT sensor is connected to AI0 of the NI-9205 and the -signal is connected to channel AI8. For my load cell sensor, I have the +signal connected to channel AI1 of the NI-9205.I also have my analog output to my LVDT connected to the NI-9263 on channel AO0 and I have the -signal connected to COM. I have taken readings in DAQ-express and the sensors respond to respective changes. I want to take continuous samples. I have it setup for rate: 1000 samples/sec. I can attach my current code for the VI below. Thank you.
07-19-2023 01:04 PM
I guess you didn't read all of my suggestions.
Maybe some other first-time LabVIEW users who are using LabVIEW 2023 will help you. As you can see, I'm running (as I mentioned) LabVIEW 2019, which cannot open any VI saved with a more recent version of LabVIEW (this is a Feature, not a Bug).
Bob Schor
07-19-2023 08:33 PM
Hi Bob, sorry about that. I believe this attached folder should be saved as version 19.0. Thank you. I appreciate the help.
07-19-2023 09:18 PM
Thanks for the code. I have a number of suggestions.
Bob Schor
07-20-2023 11:26 AM
Hi Bob,
Thanks for the detailed response. I went ahead and did a simple test of plotting one channel on one chart. This works, but when I try and plot a 2nd graph in a 2nd while loop like you mention, I get the error "this resource is reserved". I am calling 2 global channels, so this could be my issue. Do you have any recommendations to create one task and then specify for the code to read one of the specific channels?
07-20-2023 06:21 PM
I figured the issue out. Thank you!
07-21-2023 10:15 AM
Please share the solution (by posting one or more VIs -- we'll struggle with being able to read it if we're still using LabVIEW 2019 ...). We've tried to help you (but might not have totally understood the problem), so why don't you "return the favor" and help others (and get to mark your "Solution" as the Solution)? You seem to have figured out something that we didn't quite "get" ...
Bob Schor