需要將一張表的結果與另一張表中的規格限制進行比較。 如果結果 < 限制然後通過我有一個帶有限制的表(限制)。表列是產品、組件 A、組件 B。每個組件下是限制。示例產品,鋁,鋅
福德 .24 .50
我有另一個表 FG Metals 有一個 PASS/FAIL 列和一個鋁列和一個鋅列,每行都有結果。示例 PASS/FAIL、鋁、鋅
.09 .1
我需要將 dt(FG 金屬)鋁 .09 結果與 dt(限制)鋁 .24 進行比較。如果結果小於限制,則將 Pass 放入 PASS/FAIL 列,否則放入 FAIL。
希望我解釋得足夠好。請讓我知道,如果你有任何問題。
韋恩
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制有效。
非常感謝。
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制嘗試將代碼行更改為
<FONT style="background-color: #ffffff;">Column( colNamesList[theColumn] || " PASS/Fail" ) << delete</FONT> property("formula");
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制嗨,TxNelson,
在腳本中,如果我註釋掉—— Column( colNamesList[theColumn] || "PASS/Fail" ) << 刪除公式;它運行良好。
</CODE></P><P><CODE class=" language-jsl">只是一個查詢——我們是否沒有刪除列公式,甚至在我們得到我們的列之前? 因為我們的專欄將完成
一旦我們將替換 LSL 和 USL 的值,我們將在 For 循環的下一行進行?
</CODE></P><PRE><CODE class=" language-jsl">colNamesList = dt << get column names(string,continuous);
For( theColumn = 1, theColumn <= N Items( colNamesList ), theColumn++,
Clear Symbols( specs );
specs = Column( dt, colNamesList[theColumn] ) << get property( "Spec Limits" );
If( Is Empty( specs ) == 0, /*show(colNamesList[theColumn] || " PASS/Fail"), Wait (1); */
Eval(
Substitute(
Expr(
dt << New Column( colNamesList[theColumn] || " PASS/Fail",
numeric,
CONTINUOUS,
FORMULA( If( __LSL__ <= __col__ <= __USL__, 1, 0 ) )
);
/* Column( colNamesList[theColumn] || " PASS/Fail" ) << delete formula;*/
),
Expr( __LSL__ ), specs["LSL"],
Expr( __col__ ), Parse(":" || colNamesLIst[theColumn] ),
Expr( __USL__ ), specs["USL"]
)
)
);
);
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制無論我放置多少等待時間,它只會評估第一列並通過相同的錯誤。 但是,如果我將它分成兩部分並運行它 - 很好! 不知道為什麼?
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制dt << 重新運行公式;並等待 (0) - 它們都不適合我。 但是,是的,如果我將我的代碼分成兩次運行——它工作正常。
還有什麼建議嗎?
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制您可以添加一個
wait(0);
或者
dt << rerun formulas;
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制嗨,是的,如果我運行代碼直到先管理規範限制,然後再運行其餘部分,它就可以工作,並添加
顯示(colNamesList[theColumn] ||“通過/失敗”);沒有任何區別。 即使添加了這一行,代碼仍然沒有一口氣運行。
有什麼方法可以強制我先評估管理規格限制部分,然後再進一步移動,或者我可以在進入 for 循環之前等待(比如說 - 2 秒)推薦嗎?
謝謝。
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制在處理下面的代碼之前,管理規格限制可能不會完成。嘗試僅通過 Manage Spec Limits 運行。然後一旦完成,運行剩餘的代碼。
另外,添加
show(colNamesList[theColumn] || " PASS/Fail");
就在第 19 行之前
Eval(
然後看看代碼在抱怨什麼名字
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制你好,
我進行了檢查並確保 LSL 和 USL 都應該在規格表中。 事實上,我還啟動了 For 循環—— Column = 10 ,我知道從第 10 列開始,我在表中有規格限制,儘管它應該由 Is Empty 語句處理。
沒有任何效果。
謝謝。
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制有問題的代碼行是
Column( colNamesList[theColumn] || " PASS/Fail" ) << delete formula;
錯誤語句是說它找不到被引用的列。被引用的列應該已經在之前的語句中創建。
dt << New Column( colNamesList[theColumn] || " PASS/Fail",
numeric,
CONTINUOUS,
FORMULA( If( __LSL__ <= __col__ <= __USL__, 1, 0 ) )
);
要使此語句起作用,需要為公式中引用的列同時存在 LSL 和 USL。我懷疑這是問題所在。我會檢查以確保 LSL 和 USL 都存在。
關於你的問題
"還有為什麼我們在 LSL 等規格限制中使用“__” "
這不是 JMP 要求。在 Substitute() 函數中,需要具有 JMP 將用於替換的匹配值對。我在匹配值之前和之後使用“__”,只是為了使代碼清晰。我還給匹配對的名稱賦予了一些有意義的東西。在這種情況下,Substitution() 函數將替換 LSL、引用 Col 和 USL,因此按照我的慣例,我使用 __LSL__、__col__ 和 __USL__。
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制嗨尼爾森,
我在您週五發送給我的腳本中出現以下錯誤。 任何幫助
還有為什麼我們在 LSL 等規格限制中使用“__”。 我試圖在 jmp 腳本指南中找到答案,但不能理解太多。
謝謝。

回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制嗨,非常感謝,
是的,就是這樣(閱讀腳本指南) 我現在正在做一天。 
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制我已將您的要求的解決方案放在下面。但是,您需要花時間閱讀腳本指南,以確保您理解我提供的內容,並幫助您理解其他討論中提供的 JSL
names default to here(1);
dtspecs = Data Table ("Specs_Limits");
dt = Data Table ("Table_A");
Loadlimit = dt << Manage Spec Limits( Y( :BVIA_RES, :COILVIA_RES, :RDR_RES, :TAD_RES,
:WELGL_RES), Load from Limits Table("Specs_Limits.jmp"), Save to Column Properties (1) );
Loadlimit << close window;
colNamesList = dt << get column names(string,continuous);
For( theColumn = 1, theColumn <= N Items( colNamesList ), theColumn++,
Clear Symbols( specs );
specs = Column( dt, colNamesList[theColumn] ) << get property( "Spec Limits" );
If( Is Empty( specs ) == 0,
Eval(
Substitute(
Expr(
dt << New Column( colNamesList[theColumn] || " PASS/Fail",
numeric,
CONTINUOUS,
FORMULA( If( __LSL__ <= __col__ <= __USL__, 1, 0 ) )
);
Column( colNamesList[theColumn] || " PASS/Fail" ) << delete formula;
),
Expr( __LSL__ ), specs["LSL"],
Expr( __col__ ), Parse(":" || colNamesLIst[theColumn] ),
Expr( __USL__ ), specs["USL"]
)
)
);
);回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制你好TxNelson,
我需要類似的解決方案,我試圖遵循您提供的解決方案,但無法獲得我的結果。 請你幫助我好嗎 -
我有兩張表——一張是數據表,另一張是規格表。 我需要將主表中的數據與規格表中的規格進行比較,並將其放入一個新列中,分別為 1(通過)和 0(失敗)。
有什麼幫助嗎?
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制吉姆,
效果很好。再次感謝你的幫助。
韋恩
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制
- 限製文件中的各種金屬列需要是數字列。
- Metals 數據表中的 Pass/Fail 列需要定義為字符。
這是一個基於您提供的示例數據的腳本......以及上述更改。該代碼使用限制數據表來確定要測試的金屬。
Names Default To Here( 1 );
dtLimits = Data Table( "Limits sample (1)" );
dtMetals = Data Table( "FG Sample (1)" );
// Get the names of the columns with the metals data in them
metalsColNames = dtLimits << get column names( string, numeric );
For( theRow = 1, theRow <= N Rows( dtMetals ), theRow++,
If( N Rows( dtLimits << get rows where( dtLimits:product == dtMetals:Product[theRow] ) ) > 0,
theProductRow = (dtLimits << get rows where( dtLimits:product == dtMetals:Product[theRow] ))[1];
result = "Pass";
For( theColumn = 1, theColumn <= N Items( metalsColNames ), theColumn++,
target = Column( dtLimits, metalsColNames[theColumn] )[theProductRow];
col = Column( dtMetals, metalsColNames[theColumn] );
If( col[theRow] < target,
result = "Fail"
);
);
dtMetals:Name( "Pass/Fail" )[theRow] = result;
)
);回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制如果任何金屬失效,則樣品失效。 如果所有金屬都通過,則樣品通過。回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制所要做的就是在限製表中找到正確的行,在金屬數據表的行中找到產品。 我會讓你修改我的腳本來做到這一點......但是你不需要在你的金屬數據表中有一個以上的通過/失敗列,因為每種金屬都可以通過或失敗.. ...或者你是說如果任何金屬失敗,那麼它就是失敗,但如果它們都通過了,那麼行就通過了????回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制吉姆,
在我的限製文件中,我有多個產品。 Fudd 與鋁和極限 0.05 然後奇蹟與鋁和極限 0.02。 限製文件中的每個產品都位於產品列下。 示例產品,鋁,鋅
福德 .5 .1
奇蹟 .2 .5
請讓我知道如何處理產品。
問候,
韋恩
回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制這是我認為可以滿足您要求的腳本

Names Default To Here( 1 );
// Create example data tables
dtLimits = New Table( "Limits",
New Column( "Product", character, values( {"Fudd"} ) ),
New Column( "Aluminum", values( {.24} ) ),
New Column( "Zinc", values( {.50} ) )
);
dtMetals = New Table( "FG Metals",
add rows( 10 ),
New Column( "Pass/Fail Aluminum", character ),
New Column( "Pass/Fail Zinc", character ),
New Column( "Aluminum", formula( Random Uniform( 0, 1 ) ) ),
New Column( "Zinc", formula( Random Uniform( 0, 1 ) ) )
);
// Get the names of the columns with the metals data in them
metalsColNames = dtMetals << get column names( striing, numeric );
// Loop across the columns and down the rows and calculate the pass/fail
For( theColumn = 1, theColumn <= N Items( metalsColNames ), theColumn++,
target = Column( dtLimits, metalsColNames[theColumn] )[1];
col = Column( dtMetals, metalsColNames[theColumn] );
passFail = Column( dtMetals, " Pass/Fail " || metalsColNames[theColumn] );
For( theRow = 1, theRow <= N Rows( dtMetals ), theRow++,
If( col[theRow] < target,
passFail[theRow] = "Fail",
passFail[theRow] = "Pass"
)
);
);回复:需要將一張表的結果與另一張表的規格限制進行比較。 如果結果 < 限制我附上了示例文件。