ocmyface Posted April 28, 2017 Report Share Posted April 28, 2017 (edited) Hello All, First time posting here, but by no means new to LV. I'm working on a DAQ application, and am curious how people would implement the following. The only ways I can really think of seem brute force, and I am sure there is a more elegant way. I am writing an application for some Agilent benchtop DAQs. Each channel of the DAQ can be configured as various types, and each type has a different set of parameters (ie temp has thermocouple type, strain has bridge config, etc). I want the user to only see the parameters applicable to the channel type they select for that channel. So I'm picturing a configuration cluster for each channel type, then when the user selects the channel type from an enum of options, next to that will be the configuration cluster. Change the channel type, and the cluster changes with it (Similar to how Agilent's Datalogger already works if anyone here is familiar.) Normally I would use an enum to drive a tab control and display the appropriate information. But that doesn't really work for this application as I am going to have upwards of 70 channels to be configured. That's too much to handle on a per-channel basis. I have not messed with LVOOP, but I feel that is probably the best way to do it. A parent "Channel" class with child classes for each channel type. When a user selects a different channel type, it becomes a different child class with different data. However, I don't want to put the time into learn LVOOP and then it end up not giving me what I want as I am on a very short timeline here. How would you do this? Any ideas? Thanks for your help! Edited April 28, 2017 by ocmyface Quote Link to comment
gleichman Posted April 28, 2017 Report Share Posted April 28, 2017 I've done something like this with a MultiColumn Listbox to show the configuration as plain text and a Tab or SubPanel for editing the selected line of the MCL. Quote Link to comment
smithd Posted April 28, 2017 Report Share Posted April 28, 2017 You don't need to use classes but an advantage here is that you can pass around the different data sets as different objects, rather than having to convert everything back to one big cluster with all the options. That having been said I'm assuming that you're basically transmitting configuration as string commands to the daqs so it may be that you just use an array of strings for configuration and then you have a set of UIs which interpret that string configuration just like the daq does. An example of a configuration as you describe can be seen here, using classes:http://www.ni.com/example/51881/en/ For each device you can right click and select to add a current channel or a voltage channel or whatever and when the user clicks on that item in the tree it shows the UI associated with that class. If you have a finite number of classes and they all work using the same format of configuration strings, there is nothing to say you couldnt do something similar with plain VIs, and you just select the VI to add to the subpanel depending on the string that says "type=thermocouple" or whatever. Quote Link to comment
ShaunR Posted April 29, 2017 Report Share Posted April 29, 2017 I posted an example a little while back of using a SQLite DB for this sort of thing which was based around testing rather than pure DAQ so it is a superset of what you require (at the moment ). Code is here. Quote Link to comment
ocmyface Posted May 1, 2017 Author Report Share Posted May 1, 2017 Thanks for the input all! Shaun, I will check out your example. I've looked into the others as well. I think I am going to rethink my UI and make the operators deal with learning a new (and better) UI Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.