From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Blank Errors in Logfile

Hello:

 

I've got an interesting issue.  I'm working in a SUD where most of the scripting works correctly.  A button click programatically executes an Excel Export and then fills a table within the dialog box.  A few seconds after the export and table fill is complete (both of which work correctly), my computer plays an audible ding at me, as if there is an error.  I go over to the logfile and see the following:

 

Capture.PNG

 

 

There are upwards of two hundred empty errors, all occurring at the same exact time.  It doesn't affect the execution of the script at all and I haven't been able to find a cause for this.

 

Does anybody have thoughts about this?

 

 

 

Thanks,

Alex

0 Kudos
Message 1 of 6
(2,762 Views)

Hi Alex,

 

Would it be possible to attach a small reproducing case of your VBS and SUD? For the blank lines on the logfile, when are they showing up in the script? Can you call the SUD from another script and see the same “blank” error behavior?

 

It may be a good idea to set breakpoints in your script to see what line is throwing the “blank” errors.

 

Best,

Chris D. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 6
(2,712 Views)

Chris:

 

Thanks for the reply.  I don't know why I didn't try to step through line by line from the beginning; I guess I had assumed it was something to do with the Excel Export...

 

Anyways, I've tracked down the issue to one line of code.  At this point in the execution, the table has had all previous rows and columns removed, so as to start fresh.  Then one column is added and given a title.  The issue occurs when I am filling data into that column: I use a For loop to add rows to the table based on the number of channels in a group (typically between 20-30), give each row a title (channel name), and fill data (property of the specific channel).  

 

Another interesting thing is that after this step in the execution, when data is filled into subsequently added columns (up to four), it doesn't produce any errors.

 

The erroneous code is below with the commented out line being the problematic line that causes the hundreds of blank errors:

 

For i=1 to Data.Root.ChannelGroups("DIR1").Channels.Count
TableDIR1.Rows.Add
TableDIR1.Rows(i).Title=Data.Root.ChannelGroups("DIR1").Channels(i).Name
' TableDIR1.Cells(i,1).Value=Data.Root.ChannelGroups("DIR1").Channels(i).Properties("Mass").Value
Next

 

I'm still investigating but wanted to give an update.

 

 

Thanks,

Alex

0 Kudos
Message 3 of 6
(2,702 Views)

Hi Alex,

 

I’m glad to hear stepping through the script worked for you! That’s typically where I’ll start debugging.

 

Can you elaborate more on when the blank errors occur on the commented (‘) line? If you include a break in your For-Next loop, does the blank error occur once per loop iteration? How many rows are you adding with the For-Next loop and can we tie that to the number of blank errors from the logfile?

 

Let us know when you find anything new!

 

Best,

Chris D. | Applications Engineer | National Instruments

 

0 Kudos
Message 4 of 6
(2,692 Views)

Chris:

 

I've since abandoned using the table, in favor of an XTable; I'm able to do some additional formatting things with the XTable.

 

But, I was adding 38 rows with the first row being column titles, and three columns with the first column being the row titles.  That means, other than the titles, I am entering 74 cells (114 cells with the titles).  I was seeing approximately 220 blank errors; I wasn't able to draw a correlation between the numbers-- maybe three errors for each of the 74 entered cells or two errors for each of the 114 cells?

 

On a side note, I am having an issue with understanding the XTable's functionality.  I am new to using XTables and I'm not sure how to get a value to save into a cell once I've edited it:  I'm having difficulty understanding the EventValGet and EventValSet, specifically the EventValSet, methods. Any help with this?

 

 

 

Thanks,

Alex

0 Kudos
Message 5 of 6
(2,690 Views)

Actually, I've got my XTable issues figured out!!

 

 

Thanks,

Alex

0 Kudos
Message 6 of 6
(2,686 Views)