LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My program scans up to 16 input channels (as selected by the user) and then processes this data accordingly. How do I use property nodes to define each of these channels?

Currently, I bundle the Channel # and voltage reading together then access them through an auto indexed for loop and a case structure which tests for channel number. Is there a more efficient way to access the channels and to associate data with a particular channel?
0 Kudos
Message 1 of 14
(3,118 Views)
When you say access the channels, what are you doing with the data? You already have the channel number and voltage reading together--what else do you need?

Are you trying to combine points from the same channel number to make a waveform?

Mark
0 Kudos
Message 2 of 14
(3,118 Views)
First, my current program works but I feel like there might be a more efficient way using property nodes. My program scans 16 different channels. Each channel is connected to an optical volume detector, which outputs a voltage. If the voltage for each channel is above or below a certain value, I close or open a valve. Another function of my program, is to write each voltage reading per channel to a file for that channel. Currently, my program scans the array of active channels using AI 1 Scan. I then bundle together the array of voltage readings and the array of channels using Index and Bundle Cluster Array. To access each voltage reading per channel, I feed this cluster array into an auto indexed for loop, which picks out the channel and corresponding voltage
one by one. I then unbundle this cluster and test the channel number using a sequence of case structures. If the channel number test comes up true, I write that piece of data to the appropriate file for that channel.
My knowledge of LabVIEW is limited, since I am teaching myself as I go. I do not have a thorough understanding of property nodes, although I have done a few basic tutorials using them. I have noticed that for many of the more complicated VI's online, specific property nodes have been created for the VI. Instead of going through a long and complicated wiring process of case structures and for loops, could property nodes be used in some way to define my channels? Thus making it easier to access them? Thanks much, Emily
0 Kudos
Message 3 of 14
(3,118 Views)
I don't know if I'd use property nodes in this case, Emily. Property nodes are good in certain situations, like menu rings and such.

Arrays are wonderful things, and I'm just curious why you didn't do it that way. I'd sure love to take a look at your VI if that's at all possible. It's easier to make recommendations that way!

Mark
0 Kudos
Message 4 of 14
(3,118 Views)
Hi Mark,
Thanks for your reply. I've attached my VI so you can have a better look at it. As you can see from looking at it, I generated several 1D arrays which contained a type of information for each channel. ie an array of channel names and an array of channel status, created an array of clusters using the Index and Bundle Cluster Array function, then selected each row of information per channel out using a for loop. Of course all of this will make more sense when you view the VI. Thanks for your response.

Emily
0 Kudos
Message 5 of 14
(3,118 Views)
Emily,

I see several places for improvement. I've been modifying your VI to show you these improvements, but I'm a little confused as to how your lower loop works.

It seems to me that this loop displays 2 of the data points in a graph until a stop button is pressed; then it does the next two until a stop button is pressed; and so on. Is this how you would like it work, or would you like it to display all of them at once, and you just have to pick the tab on the front panel of the signals you'd like to view?

Mark
0 Kudos
Message 6 of 14
(3,118 Views)
Hi Mark,
I was confused about that part too. I would like each data piece that is collected per channel to be written to the buffer, which will update the chart and also write to a file. I would like all of the active channel charts and files to update continuously. Like you said, the user should be able to press the tab to select one of the signals to view, but the charts and files for each channel should update continuously, until the stop button is pressed for that channel. I was slightly confused about the placement of the while loops for that part of the VI. Originally, I had created the graphing and writing to file VI (the bottom loop) as its own VI. Using the random number generator instead of voltage readings from
a channel, this VI was able to stand on its own and work. When I was incorporating the graph and file VI into the main VI, I wasn't sure if I needed to keep the while loop and stop button. Since I have not been able to hook up my program to my system to test it, I wasn't sure if this loop was functioning as I intended it to. Thanks for catching this mistake for me! Is the VI able to work without sending you the subVI's that I made? If you need me to attach them, please let me know.
On another note, my VI is getting to be very large and difficult to work with. How would you advise to condense it? I know that subVI's are an option, but are there other options too?
THANKS!!
Look forward to hearing your suggestions.
Best, Emily
0 Kudos
Message 7 of 14
(3,118 Views)
Hrm...I posted on Friday, but it didn't seem to make it.

Try this VI out. I commented it somewhat so you can understand the changes that I made. I made the diagram a lot smaller, because for me, a smaller diagram is easier to see on the screen.

Let's hope this post makes it! Sorry for the delay.

Mark
0 Kudos
Message 8 of 14
(3,118 Views)
Hi Mark,
Thanks so much for your reply. I can't wait to look at the modifications. There is only one problem: I only have LabVIEW 6.1 and your changes were made in 7.0, so I cannot open it. Do you know how I might be able to open it? Thanks again, Emily
0 Kudos
Message 9 of 14
(3,118 Views)