09-01-2009 10:49 AM
A lot of my Labview programming was with earlier verisons of labview (pre Labview 7), and there are a ton of new features that I'm trying to digest (currently using Labview 8.2).
My question is (in general terms), how are people programming their UI for selecting channels and such when using DAQmx hardware? What I have in mind is a compacDAQ system with a number of modules. The user would be able to pick and choose which channels to monitor. Using MAX as part of that process seems counter intuative, and somewhat static (yeah I know you can change it there, but it feels more like something you would use for something that really doesn't change much). I'd like all the UI to be within the VI.
Are programmers using the create task VIs for that or something else?
Thanks in advance.
Solved! Go to Solution.
09-01-2009 11:00 AM
ChuckNRC,
I tend to avoid using MAX and create all my channels/tasks using the DAQmx functions. There are also be some advanced DAQmx functions that allow you to save/delete channels, tasks and scales to/from MAX.
09-01-2009 12:59 PM
Thanks Wayne. Yeah that was my thought too. But I wanted to double check with more experienced Labview people in case I was going out into left field or something.
09-01-2009 01:37 PM
I wholeheartedly second the motion to keep MAX out of the picture as far as users are concerned.
Setting up UI's for channel selection is a breeze in DAQmx when you create channels on the block diagram. The control you create off the Channels input will populate itself with the inputs that it knows are capable of performing the desired task...
<<< My configuration knows that my Module 5 is capable of doing Analog Input.
So... Just create a panel that waits for the user to select the proper channel. I also run a quick check of the user's selection before creating / starting the task. For example, if they choose ai30 or higher, and I know that the system isn't wired for those inputs, I'll not allow that selection. Also check for using two of the same input, etc.
09-01-2009 02:32 PM
09-02-2009 07:40 AM
ChuckNRC wrote:
.... I don't really like the way it populates the dropdown list as the text is rather cryptic and generic...
Then it's a matter of mapping the channels to human-acceptable labels via an enum, combo box, etc. You can even use a text file to store (and bring in) the channel mapping, since the channels inputs can be string type.
Consider sharing your solution here. Billion ways to skin this cat.
09-02-2009 07:49 AM
Broken Arrow wrote:
Then it's a matter of mapping the channels to human-acceptable labels via an enum, combo box, etc. You can even use a text file to store (and bring in) the channel mapping, since the channels inputs can be string type.
Consider sharing your solution here. Billion ways to skin this cat.
Yeah, that is pretty much what I had in mind to do.
And if I have some thing nice I'll upload it in whatever fashion I can.