04-12-2011 06:37 PM
안녕하세요
다음의 데이터, 채널 A,B 가 있는 그룹#1 에서
A B
1 12.2
3 13.1
5 13.2
2 13.8
B열의 데이터를 검색 후, 그 검색 조건을 만족하는 A열의 값을 반환하고 싶습니다
현재는 view > 마우스우클릭 > go to > channel value 이런 식으로 하나씩 하고 있는데
쉽게 할 수 있는 방법이 분명히 있을 것 같습니다
예를 들어 B 열 데이터 중, 13.0 이상이면서, 13.0 에 가장 가까운 값을 검색하면, 13.1 이 이에 해당합니다
이 때의 A열 데이터인 "3" 값을 새로운 그룹 생성 후, 새 그룹의 A 열 1행에 넣고 싶습니다
또한 그룹#2 도 마찬가지로 검색해서, 위에서 만든 새 그룹 A열 2행
또한 그룹#3 도 마찬가지로 검색해서, 위에서 만든 새 그룹 A열 3행
이런 식으로 만들고 싶습니다
그룹이 너무 많아서 우클릭 go to 기능으로는 너무 힘이 들어요~
안녕히계세요
Solved! Go to Solution.
04-13-2011 03:21 AM
Hello 상엽애비
This is Koby from NI Japan.
It was very hard to read Korean but I used traslation engine from web and I kind of understand your question.
If my understanding is wrong, then please tell me.
You are saying that to find the specific number in the table takes time because you need to right click and select jump. Also, after you found the specific number and you want to add the number to the new channel with new channel group.
The suggestion is to write a script to do all this at the same time and prevent you from right clicking and other actions.
There is a function called PNo and it determines the row in a numeric channel of which the contents are closest to a specified value(quoted from the help file).
I created a sample TDM file and a Script that look for certain values in every group and channel, and add those values to a new channel.
I attached the sample files so try opening up the TDM file and script, run the script.
Best Regards,
Atsuo "Koby" Kobayashi
System Engineer - Team Leader
National Instruments Japan
04-13-2011 09:24 PM
Hello Koby
Thanks for your answer.
I deeply appreciate your kindness.
I have run the script, but there is an error.
(message : Error in <SearchAndPlace.VBS>(Line:23, Column:3), PNO(???,13)(???,13) channel is outside the current data matrix.)
Pleas let me know about the error,
Best regards.
04-13-2011 09:31 PM
Hello
Thank you for your reply.
Did you open the TDM file from NAVIGATOR window that I attached before running the script?
Regards,
Atsuo "Koby" Kobayashi
Systems Engineer - Team Leader
National Instruments Japan
04-14-2011 02:19 AM
Hello Koby
Thank you for your reply.
I have read the TDM file from NAVIGATOR window,
and after then, I have opened the script from SCRIPT window (by pushing "run script from file" BUTTON).
But I met the error message
Best regards
KimYoungJin
Research Engineer
PowerTrain CAE Team, Hyundai Motor Company, Korea
04-14-2011 02:22 AM
Hi Kim,
Sorry for convenience but what is the version of your DIAdem?
Best Regards,
Atsuo "Koby" Kobayashi
Systems Engineer - Team Leader
National Instruments Japan
04-14-2011 02:31 AM
Hi Koby,
According to the "HELP menu >> about..." menu, the version of the software is
DIAdem : 11.0.0f3436
USI : 1.6.0f3435
DataFinder : 2.0.0f3435
Best Regards.
04-14-2011 03:13 AM
Hello Kim,
I have changed the script and so please download to try.
Best Regards,
Atsuo "Koby" Kobayashi
Systems Engineer - Team Leader
National Instruments Japan
04-14-2011 06:49 PM
Hello Koby.
WOW~ It works well.
You are very nice.
I really appreciate your help.
This script you've done will save me time and effort.
Thanks very much.
Best Regards, KimYoungJin