01-16-2013 10:19 AM
I am relatively new to LabView and need to create a generic labview program that will identify how many instruments/channels are connected (only 4-20mA or 0-10V sensors for now) and generate a user interface that displays charts and indicators for only the connected channels.
My main questions:
1.) Is there a way to read whether or not an instrument is connected (using a USB-6218)?
If I can figure out how identify which channels are in use, I can write the code to aquire the data for X channels.
2.) What is the best way to go about automatically populating the user interface? Property nodes?
What do I mean by "populating": placing indicators and charts in an organized fashion regardless of number of channels in use.
Any help would be much appreciated! Thanks.
01-16-2013 11:08 AM
Question 1: Depending upon the type of sensor you sometimes can. The current loops should be fine, but a problem that can arise with general purpose IO is when the output of a channel when it is disconnected is actually a valid reading. For example, say an input floats up to 5V when it is disconnected. How do you distinguish between that input and a connected sensor that is outputing 5V?
Question 2: Property nodes will be involved, but the real solution is to use indicator types that are inherently "scaleable". For example an array can always have one more element. Create a cluster to display the data from one channel and create an array of those clusters. Be sure to add a scroll bar so the user can move around in the dataset when it doesn't all fit on the screen.
Mike...