06-07-2010 10:03 AM
Hello!
I am having trouble writing the time difference between my set of six swiches to a spreadsheet. I would like only six values to appear on the spreadsheet, the differences between the start and stop of each respective set of switches. I have tried what I normally do when I write to a spreadsheet but was running into issues...
Thanks for your help!
Solved! Go to Solution.
06-07-2010 10:08 AM
06-07-2010 10:15 AM
blizabeth,
Where is the spreadsheet write that you are trying to perform? It is not entirely clear from your post what exactly you are trying to do. Are you just trying to figure out when the tasks start and stop? Is it when they are all on or all off? Should be straight forward if you can provide a little more info.
m
06-07-2010 10:29 AM
Thanks for your quick response!
I am very new to LabVIEW so I am confused on where to even begin. I would like the resulting six times to write to a spreadsheet (stop 1 minus start 1, stop 2 minus start 2 etc...) I believe there is some way to subtract the two values in LabVIEW and then write that result to a spreadsheet but I'm not sure how to execute it...
Thanks so much for your help!
06-07-2010 10:51 AM - edited 06-07-2010 10:51 AM
06-07-2010 10:54 AM
OK, so I think I have a better feel for this. Essentially, you have 6 switches; the switches will be toggled once to true (apparently with no clear pattern); when the switch is toggled, no further action can be performed on it; finally, when all switches are toggled to true, the VI completes and the task clears. This is the expected operation no? Try this below. (for the sake of simplicity, I use only one set of channels) Cheers, m
06-07-2010 11:18 AM
Thanks so much for all your help!
However, I am still confused how to execute these suggestions into my current VI. How do I hook things up with what I already have written?
I apolgize! Thank you for your patience!
06-07-2010 11:30 AM
blizabeth37 wrote:Thanks so much for all your help!
However, I am still confused how to execute these suggestions into my current VI. How do I hook things up with what I already have written?
I apolgize! Thank you for your patience!
mtat's example does exactly that...? If you are still confused you will need to be more specific because he essentially did it all for you.
06-07-2010 01:01 PM
I guess I'm having trouble seeing how this incorporates the two arrays I already have from the start and stop sets of switches...? I mean, I see the minus sign and everything but how is that taking the six start and stop values into consideration...?
I'm sorry to be so frustrating but do I somehow hook this up to the current arrays I have? Or do I make this it's own entire entity within the while loop?
Thanks again for your patience! I really appreciate your help!
06-07-2010 01:21 PM
Blizabeth,
I believe that we can assume that all switches start in the same configuration and therefore have the same start time, no? That is the call to the Get Date/Time in Seconds.vi at the beginning (only one needed). Then, we are simply looking for when the value changes for each individual switch. The time difference is recorded in the array of 6 doubles. If you need to, you can basically duplicate this for the second set of channels as none of the code changes.
I suggest strongly that you consider reading up on Labview and reviewing the examples that are provided in the LV shipment. Johnson and Jenning's book Labview: Graphical Programming is an excellent start. However, I believe that you may be having issues that might be best resolved by going over books on some of the fundamental aspects of programming. I am not trying to be difficult, but as for(imstuck) pointed out, I believe that I probably gave you the solution. Try going through it over the next day or so and see if you are still having trouble understanding how to apply this. If you still are, then we most likely have an issue with 1) the communication of the requirements of you project or 2) a simple misunderstanding about how exactly to use Labview.
I am sorry, I know this doesn't help in the near term, but I think that spending a little time understanding the problem and the solution both for(imstuck) and I proposed (which are essentially the same) will help you immensely .
Peace, Matt