The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Calculation with imported variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jdwatson

3 Posts

Posted - 06/24/2011 :  4:38:45 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR6
Operating System: Win7

Hi,
I'm working on an analysis template with the import wizard, and I'm not sure how to access a user defined variable to include it in a calculation. I have a header that looks like the following:

10:32:52 AM 06/24/2011
Setpoint = 5.000000 T
Current = 0.200000 (uA)
Ramp rate = 1.000000 T/min
Sample 6-13-11.2-c
Current from 1.000000 to 13.000000
Vxx: 16.000000 minus 14.000000
Vxy: 3.000000 minus 15.000000
Dark
Resistivity = 57.600000 (Ohms/sq)

I can successfully put the resistivity value into the user variable "Rho", and one thing (among others) that I want to do is a simple calculation 1/(1.6E-19 * Rho * another value I calculate). The problem is the syntax for accessing the variable. I can display the variable in the command window using the command

page.info.user.variables.rho$=

and I can even assign it to a variable (I chose 'aa' just for kicks) and it displays properly when I type aa$= <ENTER>. However, Origin doesn't want to let me do any math with this variable. If I say 10*aa$= <ENTER> I just get the message "#Command Error!' I'm not sure if the variable is the wrong data type (do all imported variables get set to be strings?), or if it has something to do with it being a global variable (that's what the $ indicates?). Any help would be appreciated as I haven't been able to find an answer in the Origin help. Thanks

John

Hideo Fujii

USA
1582 Posts

Posted - 06/24/2011 :  4:46:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

aa$, as indicated by $ mark, is a string variable. To use it as a numerical value, you can convert it like:

%(aa$)

Hope this helps.

--Hideo Fujii
OriginLab
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000