| T O P I C R E V I E W |
| masterd |
Posted - 04/13/2006 : 03:10:47 AM Origin Version (Select Help-->About Origin): 7.5 pro Operating System:2000 pro
I have data export to origin incopporated into my labview control software. origin part of the software is very similar to tutorial1.vi provided with origin.
i have figured out how to append replicate data for the same run to the same worksheet (rather than overwrite as with tutorial1) but i cant figure out how to append to active worksheet with name other than Data1.
the only way it works is if worksheet i want to import to is active AND called Data1. Each new workshhet i make i literally have to rename back to Data1 for thing to work. is there any way (script, modified vi, or whatever) to modify my situation so data gets imported into active worksheet regardless of its name?
Thanks
Darko
|
| 3 L A T E S T R E P L I E S (Newest First) |
| masterd |
Posted - 04/13/2006 : 10:48:51 PM It works perfect! Thanks Easwar!
Here is the screenshot of the vi if anyone has got similar situation.
-All the replicates get appended to the same worksheet. ie. you can have more than two columns per worksheet; unlike with tutorial1.vi where data gets overwritten.
-For different run/sample all you need to do is create new worksheet and make sure it is active and data gets imported, regardless of the worksheet name. Again, unlike tutorial1.vi where worksheet MUST be names Data1.
Obviously, you replace SampleDataNoise.vi with your data input.
Thanks again
Darko
 |
| masterd |
Posted - 04/13/2006 : 11:56:44 AM Thanks for such a prompt reply!
Unfortunately, I don't have access to labview at home so will have to wait till i get back to uni tomorrow or day after.
Your mod makes perfect sense so i cant wait to test it!
Cheers
Darko
|
| easwar |
Posted - 04/13/2006 : 09:48:16 AM Hi Darko,
Good question!
The name of the active page (in your case worksheet) is stored in the LabTalk variable %H. So for example in Origin you can go to script window and type %H= and it will print the name of the active page.
So for your case you need to basically get that name into your VI and pass that to the PutWorksheet subVI instead of passing a fixed name.
In the Origin SubVI palette, there is a SubVI called OAGetLTStr which can be used to get the content of %H.
Pasted below is image of tutorial1 that I modified to get %H and then push data into the active sheet. Note that I am not doing any checking to see if it is a worksheet - I am simply assuming that it is a worksheet - perhaps that will work in your case.
Easwar OriginLab

Edited by - easwar on 04/13/2006 09:49:15 AM |