sstading Posted June 27, 2006 Report Share Posted June 27, 2006 Hi, I've been using Labview for a grand total of 2 weeks and 1 day now at work. Generally, it has been very simple for me to get a program to do what I want. I'm struggling with a vi right now though, because I am bogged down in thinking in a textual manner. Essentially, I have a table control. This is used to hold all sorts of data and parameters for a test program I have. I need to eventually extract one row from the table (index array?), change one element in that row, put it back in the array, and then send that new array to an indicator. The problem comes from this sequence being in a for loop. After the first iteration, I need to use the indicator table as my control table. Feedback works until the last iteration, when my changed row does not appear at the indicator. I hope that makes some sense. I can try taking a screenshot of the block diagram if it does not, but there is a lot of other junk on there that really doesn't need to be seen for this issue. Does anyone have some suggestions on where to go from here? I need that last change to be visible when the program ends. Quote Link to comment
Gary Rubin Posted June 27, 2006 Report Share Posted June 27, 2006 A block diagram would help. I assume the problem has to do with shift registers and the placement of the indicator within the diagram, but nobody can say for certain without seeing the code. Gary Quote Link to comment
Karlos Posted June 27, 2006 Report Share Posted June 27, 2006 If you only need to change one element in only one row... why are you using a for loop?? I think you only need change that element for the new element.. or maybe you need explain better your problem and i agree for more help you need show your block diagram.... :headbang: Quote Link to comment
sstading Posted June 27, 2006 Author Report Share Posted June 27, 2006 If you only need to change one element in only one row... why are you using a for loop??I think you only need change that element for the new element.. or maybe you need explain better your problem and i agree for more help you need show your block diagram.... :headbang: I'm using a for loop for other things, and it just seemed convenient to do the replacing in the for loop. I have come up with an alternative, I think. Thank you for your help though. I can't get the block diagrams on from here, so it wil lhave to wait until later. I am now taking the results of my test, and pulling them out of the for loop. That makes an array from them. Then, I just replace the column of my original array with the results array that was just created, and I get the table I wanted. I was making it far too overcomplicated. Quote Link to comment
didierj Posted June 28, 2006 Report Share Posted June 28, 2006 Essentially, I have a table control. This is used to hold all sorts of data and parameters for a test program I have. I need to eventually extract one row from the table (index array?), change one element in that row, put it back in the array, and then send that new array to an indicator. The problem comes from this sequence being in a for loop. After the first iteration, I need to use the indicator table as my control table. Feedback works until the last iteration, when my changed row does not appear at the indicator. Would it help to write back the modified table into the original table? If so you can achieve it by right-clicking on your table-control and select Create/Local Variable. 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.