02-27-2021 05:07 PM - edited 02-27-2021 05:08 PM
Hi, I've been working on a graphing project, mostly to expand my knowledge of Labview. Ultimate goal is to accept up to 12 thermocouple channels, with user defined names, that is then sent to graph to show the user selected channel data displayed on y axis with time on x axis. Duplicate channels get error message.
What I've done is a mess and completely over complicated. I'll attach it though so you can see where I'm coming from. My knowledge of data flow is OK and I'm learning about property nodes and event structures. I am lacking in arrays and how to manipulate them. I've gone through lots of tutorials but just need to try to figure it out and learn from mistakes. It's the only way things stick for me.
So, check out the train wreck of a VI and please offer suggestions. I haven't even gotten channel names to transfer and I put some x boxes in in hopes that that would delete the channel details. Thanks!
Solved! Go to Solution.
02-27-2021 06:57 PM
02-27-2021 07:50 PM
Thanks for the comment. Do you have a VI to demonstrate as an example (or two... or twenty) ?
02-27-2021 09:27 PM - edited 02-27-2021 09:54 PM
Unfortunately, LabVIEW for Android doesn't exist. So, I have to use the 1000 words.
Unfortunately, there really aren't any really good shipping examples so let's play follow along . Note: there are other ways to do this but I want you to get familiar with a few tools.
FROM MAX
FROM LabVIEW
The plot names populate with the channel names from MAX and each channel has a simulated sine wave output.
You can even retarget the Task to Actual Hardware later. And even enable Data logging in DAQm xxv to write the signals to a TDMS file on the fly.
DAQmx and LabVIEW really play very nicely together. It's like someone thought about how to make common use cases simple enough for a caveman.
02-28-2021 08:34 PM
Ok, So I integrated DAQmx into the process and it works.
But, the original question still stands. What is best method to have user-enabled channels with duplicate checking before it gets to error handling? This code only has three channels, but represents the issue (I hope to scale to max 12 channels): If the user only enters two channels - fine, it graphs only two channels. If they duplicate the name of the two, it should alert them before going on. Suggestions?
02-28-2021 10:55 PM - edited 02-28-2021 11:11 PM
DAQmx won't let you duplicate channel names.
Of course, you COULD just steal the channel list editor that the DAQmx Wizard uses. It should be written in LabVIEW and located in the LabVIEW installation\wizards folder. I would hope it is not password protected.
03-01-2021 08:50 AM
I'm not using the DAQmx wizard as the program needs to be flexible enough to be used in different locations with anywhere from 1 to 12 thermocouples and allow the user to select which channels to make active and give it unique channel names. See VI.
03-01-2021 08:58 AM
03-01-2021 02:19 PM
Let's give this a try. Area that needs work is yellow highlighted. Currently uses controls, trying to figure out how to create a selection of empty fields; user selects which and how many channels to create and gives channels name. Program alerts for duplicates before error handling catches it.
03-01-2021 02:56 PM
Make a table/listbox, populate with all the available channels. Have a column to enable/disable channel, and a name column. When user enters a name, check for duplicate names. Something like below:
The user can change the name from the standard to whatever they want.
You seem new to LabVIEW, so that may be a little advanced for a beginner. Instead of a table, you can make a cluster and modify it to look like a table.
mcduff