nightdweller Posted July 30, 2004 Report Share Posted July 30, 2004 Hi Everyone, I have a question. Well, I currently have a cluster containing 9 clusters with 3 of the same elements within each cluster. My question is without using loops, or extracting each cluster element individually. Is it possible to grab the first two elements of each cluster. I was trying to use some array manipulations but it did not work as planned. Any ideas out there? Thanks in advance.. Vince Quote Link to comment
jpdrolet Posted July 31, 2004 Report Share Posted July 31, 2004 Hi Everyone,I have a question. Well, I currently have a cluster containing 9 clusters with 3 of the same elements within each cluster. My question is without using loops, or extracting each cluster element individually. Is it possible to grab the first two elements of each cluster. I was trying to use some array manipulations but it did not work as planned. Any ideas out there? Thanks in advance.. Vince 1273[/snapback] You can't index a cluster in a loop. You have to transform it into an array. If the 9 subclusters are of the same type, use the function Cluster to Array. It will output an array of 9 clusters of 3 elements. Quote Link to comment
nightdweller Posted August 3, 2004 Author Report Share Posted August 3, 2004 You're right, I cannot index a cluster using a loop. I was assuming that we had to use the cluster to array function. I'm fairly new to labview, and just wanted to see if there are alternative methods to solving this. I was wondering if it is possible to convert the data to variant, and stick the data to an array, and then extract the data using array functions. Also, if it is possible to use the "to specific class" to get the data I wanted. Thanx. Vince Quote Link to comment
Michael Aivaliotis Posted August 4, 2004 Report Share Posted August 4, 2004 I have a question. Well, I currently have a cluster containing 9 clusters with 3 of the same elements within each cluster. My question is without using loops, or extracting each cluster element individually. Is it possible to grab the first two elements of each cluster. I was trying to use some array manipulations but it did not work as planned. Any ideas out there? Thanks in advance..Vince 1273[/snapback] Well, as you are discovering, manipulating your data is a real pain in the ######. Correct? That's good. It's good because this is a sure sign that you have chosen the wrong data structure to store your data. Instead of trying to jump through hoops to fit the data mold, why not change the data structure to the easiest form for you to handle... an array! This is why it is a good thing to sit down and think through the data structures you will be using to pass data around your application. if I were you, I would scrap the clusters and go for an array... Quote Link to comment
nightdweller Posted August 4, 2004 Author Report Share Posted August 4, 2004 Well, as you are discovering, manipulating your data is a real pain in the ######. Correct? That's good. It's good because this is a sure sign that you have chosen the wrong data structure to store your data. Instead of trying to jump through hoops to fit the data mold, why not change the data structure to the easiest form for you to handle... an array! This is why it is a good thing to sit down and think through the data structures you will be using to pass data around your application. if I were you, I would scrap the clusters and go for an array... 1288[/snapback] Actually I have my application working correctly with the use clusters and converting it to arrays. And you're right about manipulating data is a real pain, I've been experimenting with variants with no luck I just wanted a learn more about the advance topics Labview has to offer, so I can use it implement them in future applications. Well guys, thanx again for the prompt reply. Vince Quote Link to comment
nightdweller Posted August 16, 2004 Author Report Share Posted August 16, 2004 Hello LAVA forum, Hate to bring up this topic again. I am ready build my executable, and I want to generate an ini file. I currently have about 21 agilent power supplies that I would like to control. I currently have a set cluster size to 21. I know that you cannot change the cluster size at run time. However, I am not sure if the systems engineering people will change their requirements, and I don't want to go in and edit the cluster size everytime. I have an alternative solution, but I think it is kinda corny. Basically set the cluster size to be 50. And based on the address on the ini file, display the number of power supplies (hopefully less than 50). What do you think? Is there a better solution? One more thing. Is there a standard to building ini files that NI would recommend? I've been search for such a standard with no luck.. :headbang: Thanks again... Vince Quote Link to comment
nightdweller Posted August 16, 2004 Author Report Share Posted August 16, 2004 Here are some of the things I intend to put in the ini file. 1) Power Supply #. 2) Name of device power supply is connected to. 3) Grouping of Power Supplies. 4) Hardware settings ie Max Power, Max Voltage, and Max Current. 5) Over Voltage Protection 6) Current Limits. 7) GPIB address, bus, bus index, and sub. 8) Simulation Mode versus Visa Mode Selection: I think this should go with the ini file for the executable, or should this be included in the same ini file? Although, I don't have most of this code. I would just like to set up the basic structure because I know things will be changed later on. Any Suggestions are welcomed... Thanx Again.. Vince 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.