02-15-2008 02:12 PM - edited 02-15-2008 02:13 PM
02-15-2008 09:33 PM
02-16-2008 10:18 AM
How can I wire that to work within another case structure? When the "New" button is pressed, the "Grab" button is still in its "false" case. Is there a way to tunnel to that "build table" somehow?
I once tried making a second "Build Table" that fed to a local variable for the table so I could use the reset functionality, but that didn't reset the memory in the original "Build Table".
02-16-2008 11:15 AM - edited 02-16-2008 11:16 AM
You just need to think a bit more flexible. Here's one possibility. 🙂
Since the built table express VI has an "enable" input, it does not need to be in any case structure.
I would also strongly suggest to create the header diagram constant only once and not in multiple places. Else if you ever want to change it, you need to change it in multiple places and you create a mess if you forget one instance.
02-16-2008 02:58 PM - edited 02-16-2008 03:06 PM
altenbach wrote:
You just need to think a bit more flexible. Here's one possibility. 🙂
Since the built table express VI has an "enable" input, it does not need to be in any case structure.
I would also strongly suggest to create the header diagram constant only once and not in multiple places. Else if you ever want to change it, you need to change it in multiple places and you create a mess if you forget one instance.
Message Edited by altenbach on 02-16-2008 09:16 AM
02-16-2008 03:51 PM
Scallion wrote:
This will probably sound silly, but I can't find how to rate the messages. Nothing is jumping out at me, so I'll keep looking. I'm not trying to neglect you guys.
11-25-2011 11:18 PM
Hello,
I am having a similar issue with my code as well. Very similar data acquisition type as described above as well, except it is tweaked for in flight testing. I am using a state machine in order to execute my code. In one case, the user can execute an option to take a measurement of data and then a table is created (eventually I will write the code that will save the data). However, if the user has a bad run and wants to delete the data in the tables, I would like to have a clear button that the user can press. I understand why I can not clear the table as you have already described. I tried to place the build table outside of the case structure, but then I received an error that the other cases were not complete. I am unsure of where to proceed from here and I was hoping to make clearing the tables a separate case, but I do not know how to wire the clear button to the reset table from a separate case structure.
I am using LabVIEW 9, and I have attached my code as well
I would appreciate anyones help!
-Ellen
11-26-2011 09:30 PM
Ellen,
1. It is often better to start a new thread than to reply to an old one. Sometimes the people who answered the old thread may not be participating any longer or they may not pay attention to threads that they thought were finished. If you start a new thread and have a problem similar to an old one, refer to that old thread or, better, include a link to it.
2. Shift registers are your friend. Pass the data through all the cases via a shift register. In the Take Data case you can build the table. In the clear table case wire an empty array to the table. Put the indicator outside all the cases but inside the loop.
3. If you use an enum (enumerated type control) for the state and make it a type def you get two huge advantages in state machines. First the item text appears in the case selesctor label, making the states self-documenting. Second when you make changes such as adding a state the typedef will change all instances (like constants inside the cases) to reflect the changes.
The version I am attaching only changed one of the tables. I put a Diagram Disable structure around the MathScript node since I do not have that.
Lynn
11-28-2011 06:50 PM
Lynn,
Thank you for the advice, I will be sure to use it in future posts.
Also, you helped me figure out how to clear my tables. I did have to add an additional shift register so that I could not only clear the table, but reset the table. Thanks again for your help.
Ellen