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.
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.
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.
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?
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.
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.
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.
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.