04-13-2009 04:54 PM
I've tried several varibles in my implementation but have had no luck with suppressing the errors that my code generates via .VBS but actually occurs during execution in the "2DTable". I'm trying to use one table fits all because all tests have certain values (description, mval, upper limit, pass/fail), however a few have no lower limit or lover measured value.... See insert:
"CmdNoMsgDisp = TRUE
D2TabVariable(1) ="@@Left(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_1""), ""registertxt1""),Len(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_1""), ""registertxt1""))-24)@@ "
D2TabVariable(2) ="@@Str(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_2""), ""LimitMinDevDown""),""dd.dd"")@@ "
D2TabVariable(3) ="@@Str(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_2""), ""Maximum""),""dd.dd"")@@ "
D2TabVariable(4) ="@@Str(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_1""), ""Maximum""),""dd.dd"")@@ "
D2TabVariable(5) ="@@Str(ChnPropValGet((""[""+str(L10+D2TabRow)+""]/TestItemData_1""), ""LimitMaxDevUp""),""dd.dd"")@@ "
D2TabVariable(6) ="@@TV(GroupPropValGet((L10+D2TabRow), ""Status_Binary"") + 1)@@ "
Call LogfileDel
LogfileExtent(1) = 1
LogfileExtent(2) = 0
CmdNoMsgDisp = FALSE"
Any help would be greatly appreciated.
Thanks - Jeff
04-14-2009 09:43 AM
Hi Jeff,
Do you have DIAdem 11.0 or later? If so, you an use the IIF() function to introduce conditional branching in your @@DIAdem expression@@. Here's an example:
StepID: @@IIF(GroupPropExist(4, "StepID"), GroupPropValGet(4, "StepID"), "")@@
If you don't have DIAdem 11.0 or later, let me know and I'll see if I can think of something else.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-14-2009 09:50 AM
04-15-2009 12:37 AM
Hi Jeff,
have you already tried to write and add a custom "User-Command"?
regards
romi_wo
04-15-2009 07:34 AM
04-15-2009 09:46 AM
Alright Jeff,
In that case, try the following calls instead of a simple "PicUpdate" every time that occurs in your code-- the "CmdNoDialogDisp" setting suppresses/allows error dialogs:
CmdNoDialogDisp = TRUE
Call PicUpdate
CmdNoDialogDisp = FALSE
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-15-2009 02:16 PM
Still no luck suppressing the dialog for the errors. I have tried several variations to no luck. I'm not sure I can even stop my own message popup with these commands. However, even though the error log indicates the error occurs during code execution (attached the other day), I've proven that the error does not occurr until after the PDF Export command ( see code below):
'MsgBox MyFolders(2) ' This is sometimes easier that setting a watch variable
IF Not(FilEx(MyFolders(2))) THEN ' Check to see if the file exists already
CmdNoDialogDisp = TRUE
CmdNoErrorDisp = TRUE
CmdNoInfoDisp = TRUE
CmdNoMsgDisp = TRUE
CmdNoWarningDisp = TRUE
Call PicUpdate
Call PicPDFExport(MyFolders(2)) 'The PDF function doesn't allow overwriting
'MsgBox "After Suppress#1" ' This is sometimes easier that setting a watch variable
CmdNoDialogDisp = FALSE
CmdNoErrorDisp = FALSE
CmdNoInfoDisp = FALSE
CmdNoMsgDisp = FALSE
CmdNoWarningDisp = FALSE
'MsgBox "After Suppress#2" ' This is sometimes easier that setting a watch variable
END IF
'MsgBox "After Suppress#3" ' This is sometimes easier that setting a watch variable
NOTE: I've added logic to test how to suppress????
04-16-2009 03:36 AM
Hi Jeff,
I've attached a script which you can use as usercommand.
The following code-snippet shows how to use it.
call ScriptCmdAdd(AutoActPath & "assignChnValue.vbs" )
assignValue("[1]/Channel1","name","" )
D2TabVariable(1) ="@@Left(assignValue((""[""&(L10+D2TabRow)&""]/TestItemData_1"", ""registertxt1"","""" ),Len(assignValue((""[""+str(L10+D2TabRow)+""]/TestItemData_1"", ""registertxt1"","""" )-24)@@"
D2TabVariable(2) ="@@assignValue((""[""&(L10+D2TabRow)&""]/TestItemData_2"", ""LimitMinDevDown"",""dd.dd"" )@@ "
May that is what you expected?
Kind Regards
romi_wo
04-16-2009 08:43 AM
Hi Jeff,
I constructed a TDR with a reference to a property that does not exist. Whenever I refresh the REPORT panel I get the corresponding error/warning dialog. But when I execute the one line of code to export this REPORT sheet to a PDF file, it works without any errors. Are you passing a full and valid PDF file path in the PicPDFExport command?
Call PicPDFExport("C:\NoName.PDF")
What is the error message you're getting?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-16-2009 09:08 AM
I've attached the error in a bitmap. The script file is executed via a LabVIEW .vi which is called from TestStand. The .pdf file does generate successfully its just that I get the error message popup (attached file).
My other question is that I looked at the prior response from "romi_" with the attached snippet of .vbs code. Since I have DIAdem ver 10.2, can I call a function within the 2DTable or do I need to upgrade to version 11?