cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
%3CLINGO-SUB%20id%3D%22lingo-sub-480402%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E6%9B%B4%E6%94%B9%E5%88%97%20USL%20%E5%92%8C%20LSL%20%E5%B1%9E%E6%80%A7%E7%9A%84%20JMP%20%E8%84%9A%E6%9C%AC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480402%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%20JMP%20%E8%84%9A%E6%9C%AC%E5%87%BD%E6%95%B0%EF%BC%8C%E5%AE%83%E4%BB%8E%E5%AD%98%E5%82%A8%E5%9C%A8%E2%80%9CNtwk%20Osnr%20Spec%20Table%20Filename%E2%80%9D%E5%8F%98%E9%87%8F%E4%B8%AD%E7%9A%84%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6%E4%B8%AD%E8%8E%B7%E5%8F%96%E4%B8%80%E7%BB%84%E8%A7%84%E8%8C%83%E9%99%90%E5%88%B6%E3%80%82%20%E6%88%91%E6%AD%A3%E5%9C%A8%E5%B0%9D%E8%AF%95%E6%9B%B4%E6%94%B9%E2%80%9CNtwk%20Osnr%20%E6%95%B0%E6%8D%AE%E8%A1%A8%E2%80%9D%E6%95%B0%E6%8D%AE%E8%A1%A8%E4%B8%AD%E2%80%9CPctDiff_ModBer_q_calcBer%E2%80%9D%E5%88%97%E7%9A%84%20USL%20%E5%92%8C%20LSL%20%E5%88%97%E5%B1%9E%E6%80%A7%E3%80%82%20%E4%BD%86%E6%98%AF%E5%BD%93%E6%88%91%E8%BF%90%E8%A1%8C%E4%BB%A5%E4%B8%8B%20JMP%20%E8%84%9A%E6%9C%AC%E5%91%BD%E4%BB%A4%E6%97%B6%EF%BC%8C%E6%88%91%E6%B2%A1%E6%9C%89%E6%94%B6%E5%88%B0%E8%84%9A%E6%9C%AC%E9%94%99%E8%AF%AF%EF%BC%8C%E4%BD%86%20USL%20%E5%92%8C%20LSL%20%E5%88%97%E5%B1%9E%E6%80%A7%E6%B2%A1%E6%9C%89%E6%9B%B4%E6%96%B0%E3%80%82%20%E4%BB%8E%E8%A7%84%E6%A0%BC%E9%99%90%E5%88%B6%E8%8E%B7%E5%BE%97%E7%9A%84%E8%A7%84%E6%A0%BC%E9%99%90%E5%88%B6%E6%98%AF%201.7%E3%80%82%20%E5%BD%93%E6%88%91%E9%80%9A%E8%BF%87%E4%BB%A5%E4%B8%8B%E5%87%A0%E8%A1%8C%E6%97%B6%EF%BC%8C1.7%20%E7%9A%84%E5%80%BC%E5%9C%A8%20Speclimit%20%E5%8F%98%E9%87%8F%E4%B8%AD%E6%9B%B4%E6%96%B0%EF%BC%8C%E4%BD%86%20USL%20%E5%92%8C%20LSL%20%E5%88%97%E5%B1%9E%E6%80%A7%E6%B2%A1%E6%9C%89%E6%9B%B4%E6%96%B0%E3%80%82%20%E5%A6%82%E6%9E%9C%E6%88%91%E5%B0%86%20Speclimit%20%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE%E4%B8%BA%E5%B8%B8%E6%95%B0%201.7%EF%BC%8C%E5%88%99%20USL%20%E5%92%8C%20LSL%20%E5%88%97%E5%B1%9E%E6%80%A7%E5%88%86%E5%88%AB%E8%AE%BE%E7%BD%AE%E4%B8%BA%201.7%20%E5%92%8C%20-1.7%E3%80%82%20%E6%89%80%E4%BB%A5%E9%97%AE%E9%A2%98%E4%B8%80%E5%AE%9A%E6%98%AF%E4%BB%8E%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6%E4%B8%AD%E8%8E%B7%E5%8F%96%E5%80%BC%EF%BC%8C%E4%BD%86%E6%88%91%E5%8F%AF%E4%BB%A5%E6%89%BE%E5%87%BA%E9%97%AE%E9%A2%98%E6%89%80%E5%9C%A8%E3%80%82%20%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E8%AE%A9%E6%88%91%E7%9F%A5%E9%81%93%E4%BB%8E%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6%E8%8E%B7%E5%8F%96%E8%A7%84%E6%A0%BC%E9%99%90%E5%88%B6%E5%B9%B6%E8%AE%A9%E5%AE%83%E6%9B%B4%E6%96%B0%E5%88%97%E5%B1%9E%E6%80%A7%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E6%98%AF%E4%BB%80%E4%B9%88%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EInclude(%20%22%24CommonScriptPath%2FFunction%20-%20Obtain%20Spec%20Limit%20Value.jsl%22%20)%3B%0ASpeclimit%20%3D%20ObtainSpecLimit(%0A%20Ntwk%20Osnr%20Spec%20Table%20Filename%2C%20DeviceType%2C%20%22*%22%2C%20%22*%22%2C%20%22ber_diffQcalc%22%0A)%3B%0A%0Adt%20%3D%20Open(%20Ntwk%20Osnr%20Data%20Table%20Filename%2C%20invisible%20)%3B%0AData%20Table(%20dt%20)%3APctDiff_ModBer_q_calcBer%20%26lt%3B%26lt%3B%20Set%20Property(%0A%20%22Spec%20Limits%22%2C%0A%20%7BLSL(%20(Speclimit%20*%20(-1))%20)%2C%20USL(%20Speclimit%20)%2C%20Target(%200%20)%2C%20Show%20Limits(%201%20)%7D%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-480402%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E8%84%9A%E6%9C%AC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-480421%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9B%B4%E6%94%B9%E5%88%97%20USL%20%E5%92%8C%20LSL%20%E5%B1%9E%E6%80%A7%E7%9A%84%20JMP%20%E8%84%9A%E6%9C%AC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480421%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E7%A1%AE%E4%BF%9D%E5%80%BC%E6%98%AF%E6%95%B0%E5%AD%97%E5%B9%B6%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%20Eval(EvalExpr())%20%E5%92%8C%20Expr()%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EInclude(%22%24CommonScriptPath%2FFunction%20-%20Obtain%20Spec%20Limit%20Value.jsl%22)%3B%0ASpeclimit%20%3D%20ObtainSpecLimit(Ntwk%20Osnr%20Spec%20Table%20Filename%2C%20DeviceType%2C%20%22*%22%2C%20%22*%22%2C%20%22ber_diffQcalc%22)%3B%0A%0Adt%20%3D%20Open(Ntwk%20Osnr%20Data%20Table%20Filename%2C%20invisible)%3B%0AEval(%0A%20Eval%20Expr(%0A%20%20Data%20Table(dt)%3APctDiff_ModBer_q_calcBer%20%26lt%3B%26lt%3B%20Set%20Property(%0A%20%20%20%22Spec%20Limits%22%2C%0A%20%20%20%7BLSL(Expr(Speclimit%20*%20(-1)))%2C%20USL(Expr(Speclimit))%2C%20Target(0)%2C%20Show%20Limits(1)%7D%0A%20%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJSL-Cookbook%2FInsert-one-expression-into-another-using-Eval-Insert-Eval-Expr%2Fm-p%2F48998%23U48998%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-tkb-thread%20lia-fa-icon%20lia-fa-tkb%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3E%E4%BD%BF%E7%94%A8%20Eval%20Insert%E3%80%81Eval%20Expr%E3%80%81Parse%20%E5%92%8C%20Substitute%20%E5%B0%86%E4%B8%80%E4%B8%AA%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%8F%92%E5%85%A5%E5%8F%A6%E4%B8%80%E4%B8%AA%E8%A1%A8%E8%BE%BE%E5%BC%8F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-480422%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9B%B4%E6%94%B9%E5%88%97%20USL%20%E5%92%8C%20LSL%20%E5%B1%9E%E6%80%A7%E7%9A%84%20JMP%20%E8%84%9A%E6%9C%AC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480422%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%82%A8%E5%9C%A8%20JMP%20%E5%88%97%E8%A1%A8%E4%B8%AD%E6%8C%87%E5%AE%9A%E7%9A%84%E8%AE%A1%E7%AE%97%E4%B8%8D%E4%BC%9A%E5%9C%A8%E6%89%A7%E8%A1%8C%E5%89%8D%E8%BF%9B%E8%A1%8C%E8%AF%84%E4%BC%B0%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E5%9C%A8%20Substitution%20%E5%87%BD%E6%95%B0%E5%AE%8C%E6%88%90%E4%B9%8B%E5%89%8D%EF%BC%8C%E5%BF%85%E9%A1%BB%E5%AF%B9%E8%AF%AD%E5%8F%A5%E8%BF%9B%E8%A1%8C%E5%AE%8C%E5%85%A8%E8%A7%A3%E6%9E%90%E5%92%8C%E8%AF%84%E4%BC%B0%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EInclude(%20%22%24CommonScriptPath%2FFunction%20-%20Obtain%20Spec%20Limit%20Value.jsl%22%20)%3B%0ASpeclimit%20%3D%20ObtainSpecLimit(%0A%20Ntwk%20Osnr%20Spec%20Table%20Filename%2C%20DeviceType%2C%20%22*%22%2C%20%22*%22%2C%20%22ber_diffQcalc%22%0A)%3B%0A%0Adt%20%3D%20Open(%20Ntwk%20Osnr%20Data%20Table%20Filename%2C%20invisible%20)%3B%0A%0AEval(%0A%20Substitute(%0A%20%20%20Expr(%0A%20%20%20%20Data%20Table(%20dt%20)%3APctDiff_ModBer_q_calcBer%20%26lt%3B%26lt%3B%0A%20%20%20%20Set%20Property(%0A%20%20%20%20%20%22Spec%20Limits%22%2C%0A%20%20%20%20%20%7BLSL(%20__LSL__%20)%2C%20USL(%20__USL__%20)%2C%20Target(%200%20)%2C%20Show%20Limits(%201%20)%7D%0A%20%20%20%20)%0A%20%20%20)%2C%0A%20%20Expr(%20__LSL__%20)%2C%20Speclimit%20*%20(-1)%2C%0A%20%20Expr(%20__USL__%20)%2C%20Speclimit%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
kprentiss
Level I

JMP Script that changes the column USL and LSL properties

I have a JMP Script Function that obtains a set of spec limits from a text file that is stored within the "Ntwk Osnr Spec Table Filename" variable. I am trying to change the USL and LSL column properties of the "PctDiff_ModBer_q_calcBer column within the "Ntwk Osnr Data Table" data table. But when I run the following JMP script commands I do not get a scripting error but the USL and LSL column properties are not updated. The Spec Limit that is obtained from the spec limit is 1.7. When I step thru the following lines the value of 1.7 is updated within the Speclimit variable but the USL  and LSL Column Properties are not updated. If I set the Speclimit variable to a constant 1.7 then the USL and LSL Column Properties are set to 1.7 and -1.7 respectively. So the issue must be obtaining the value from the text file, but I can figure out the issue. Can some one let me know what the solution is to obtain the spec limit from a text file and have it update the column properties.

 

Include( "$CommonScriptPath/Function - Obtain Spec Limit Value.jsl" );
Speclimit = ObtainSpecLimit(
	Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc"
);

dt = Open( Ntwk Osnr Data Table Filename, invisible );
Data Table( dt ):PctDiff_ModBer_q_calcBer << Set Property(
	"Spec Limits",
	{LSL( (Speclimit * (-1)) ), USL( Speclimit ), Target( 0 ), Show Limits( 1 )}
);
2 REPLIES 2
jthi
Super User

Re: JMP Script that changes the column USL and LSL properties

Make sure the values are numeric and try using Eval(EvalExpr()) and Expr()

Include("$CommonScriptPath/Function - Obtain Spec Limit Value.jsl");
Speclimit = ObtainSpecLimit(Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc");

dt = Open(Ntwk Osnr Data Table Filename, invisible);
Eval(
	Eval Expr(
		Data Table(dt):PctDiff_ModBer_q_calcBer << Set Property(
			"Spec Limits",
			{LSL(Expr(Speclimit * (-1))), USL(Expr(Speclimit)), Target(0), Show Limits(1)}
		)
	)
);

Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute 

-Jarmo
txnelson
Super User

Re: JMP Script that changes the column USL and LSL properties

The calculations you are specifying within a JMP List, will not be evaluated prior to execution.  Therefore, the statement must be fully parsed and evaluated before  The Substitution function will accomplish that

Include( "$CommonScriptPath/Function - Obtain Spec Limit Value.jsl" );
Speclimit = ObtainSpecLimit(
	Ntwk Osnr Spec Table Filename, DeviceType, "*", "*", "ber_diffQcalc"
);

dt = Open( Ntwk Osnr Data Table Filename, invisible );

Eval(
	Substitute(
			Expr(
				Data Table( dt ):PctDiff_ModBer_q_calcBer <<
				Set Property(
					"Spec Limits",
					{LSL( __LSL__ ), USL( __USL__ ), Target( 0 ), Show Limits( 1 )}
				)
			),
		Expr( __LSL__ ), Speclimit * (-1),
		Expr( __USL__ ), Speclimit
	)
);

 

Jim