Author |
Topic  |
|
dean.pask
UK
Posts |
Posted - 10/10/2005 : 09:54:17 AM
|
Origin Version: 7.5 Pro Operating System: XP
Please can someone advise me on the following issues:
1. When I transfer two coloums of data from Labview into Origin I get two y y columns... How do I define one column as X from Labview?
2. I wish to plot, fft then peak pick the data.. can I do this from Labview?
Any advise would be most appreciated.
Thanks
Dean |
|
easwar
USA
1965 Posts |
Posted - 10/10/2005 : 10:13:02 AM
|
Hi Dean,
When you connect to Origin as an Automation Server from other client applications such as LabVIEW, there are a collection of methods and properties available for pushing in data, getting data back, creating a page, opening a project, saving project etc. These are all documented in the Programming help file.
In addition, there is the Execute() method, which can be used to send any LabTalk command string to Origin for execution.
So to answer your specific question about changing the type of the first column of the worksheet, you can use the Execute method and send the string: wks.col1.type=4; The above assumes that the worksheet is the active object in Origin. If it is not, and you know the name of the worksheet, you could instead use data1!wks.col.type=4; where the wks name is data1.
The above commands use the methods and properties of the worksheet LabTalk object. Documentation on these LabTalk objects and commands can be found in the Programming help file.
As for performing FFT, that too could be done by sending multiple script commands using the Execute() method, by using the LabTalk fft object.
Note that a script command could also call an Origin C function. Commands could thus be sent to first push the data into Origin, then compile and link a custom Origin C function and then that function is called. Also one could create custom Origin projects as templates where the Origin C (or LabTalk script code) is all attached to the project, and once data is pushed in, the computation is performed and the results can be then fetched back by the client application.
Look at some of the other client examples in the \Samples\Automation Server subfolder such as under the \Excel subfolder to see how template projects could be used.
Easwar OriginLab
|
 |
|
dean.pask
UK
Posts |
Posted - 10/11/2005 : 06:03:10 AM
|
Easwar,
Many thanks for your time and super email.
I have no programming experience at all.. but I will look into all your advise.
Is there any books etc.. on the market that would help me in my goal?
Thanks again
Dean |
 |
|
easwar
USA
1965 Posts |
Posted - 10/11/2005 : 12:08:21 PM
|
Hi Dean,
There are no books on LabTalk or Origin C programming. The following resources exist: 1> Help files in Origin - particularly the Language Reference files for LabTalk and Origin C and also the Programming Guide - all in Programming Help file 2> The forum - a lot of LabTalk and Origin C code examples exist on forum posts - can search form by searching title (faster) and also body text (slower) 3> Origin C examples in the following location: http://www.originlab.com/index.aspx?s=9&lm=71&pid=268 4> Knowldege Base items which contain scripting examples: http://www.originlab.com/www/support/techdataform.aspx
As you know Origin is shipped with many subVIs that can be directly used in LabVIEW to send data, commands etc. One could keep adding to this subVI collection to do custom operations.
Easwar OriginLab
|
 |
|
dean.pask
UK
Posts |
Posted - 10/12/2005 : 6:52:34 PM
|
Thanks all
Edited by - dean.pask on 10/13/2005 5:30:12 PM |
 |
|
|
Topic  |
|
|
|