DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Object "Table1" unknown or not open" Problem

Hi,

I have the Object "ExceedTable1" unknown or not open Problem.
The code should create several tables with values and display them in the report. Right now I only get the last table, and all the previous tables are not created and Object "ExceedTable1" unknown or not open Problem occurs.
The code is as follows:

For i = 1 to NumOfTables If Use_Table(i) = True Then

If i <> 1 then
Call GraphSheetNew("Status Page" & i)
Call GRAPHSHEETMOVE("Status Page" & i, "Front Spectrum Overall")
GraphSheetRefSet("Status Page" & i)
End If

Call GraphObjNew("2D-Table","ExceedTable" & i) 'Creates a new 2D axis system
Call GraphObjOpen("ExceedTable" & i) 'Opens the axis object

D2TabChnName(1) = Data.Root.ChannelGroups("Exceedance").Channels("Date" & i).Name
D2TabChnName(2) = Data.Root.ChannelGroups("Exceedance").Channels("Parameter" & i).Name
D2TabChnName(3) = Data.Root.ChannelGroups("Exceedance").Channels("Feature" & i).Name
D2TabChnName(4) = Data.Root.ChannelGroups("Exceedance").Channels("Magnitude" & i).Name
D2TabChnName(5) = Data.Root.ChannelGroups("Exceedance").Channels("Time" & i).Name
D2TabChnName(6) = Data.Root.ChannelGroups("Exceedance").Channels("Number" & i).Name

D2TabNumFormat(1) = "#hh:nn:ss#"
D2TabGrid(1) = True
D2TabGrid(2) = True
D2TabAutoScalTyp = "AutoMax"
D2TabTop = 10
D2TabBottom = 10
D2TabLeft = 10
D2TabRight = 10

Call GraphObjClose("ExceedTable" & i) 'Closes the axis object

End If
Next
End If

The weird thing is that everything works fine when I use the debug mode. As soon as I exit it and try to just run the code, only the last table is created.

Thank you

Egor
0 Kudos
Message 1 of 3
(3,785 Views)

This issue was fixed by adding

Call Pause(5) between

Call GraphObjNew("2D-Table","ExceedTable" & i) and Call GraphObjOpen("ExceedTable" & i)
 

Brad,

 

Do you know why this problem happens?

 

Thank you

 

Egor

0 Kudos
Message 2 of 3
(3,769 Views)

Hi Egor,

 

No, I don't know why this is happening.  I edited your script to run on my computer, and it worked fine with no errors in regular run mode.

 

For i = 1 to NumOfTables
  If 1 = 1 THEN 'Use_Table(i) = True Then
    If i <> 1 then
      Call GraphSheetNew("Status Page" & i)
      'Call GRAPHSHEETMOVE("Status Page" & i, "Front Spectrum Overall")
      GraphSheetRefSet("Status Page" & i)
    End If
    Call GraphObjNew("2D-Table","ExceedTable" & i) 'Creates a new 2D axis system
    Call GraphObjOpen("ExceedTable" & i) 'Opens the axis object
    D2TabChnName(1) = "1" ' Data.Root.ChannelGroups("Exceedance").Channels("Date" & i).Name
    D2TabChnName(2) = "2" ' Data.Root.ChannelGroups("Exceedance").Channels("Parameter" & i).Name
    D2TabChnName(3) = "3" ' Data.Root.ChannelGroups("Exceedance").Channels("Feature" & i).Name
    D2TabChnName(4) = "4" ' Data.Root.ChannelGroups("Exceedance").Channels("Magnitude" & i).Name
    D2TabChnName(5) = "5" ' Data.Root.ChannelGroups("Exceedance").Channels("Time" & i).Name
    D2TabChnName(6) = "6" ' Data.Root.ChannelGroups("Exceedance").Channels("Number" & i).Name
    D2TabNumFormat(1) = "#hh:nn:ss#"
    D2TabGrid(1) = True
    D2TabGrid(2) = True
    D2TabAutoScalTyp = "AutoMax"
    D2TabTop = 10
    D2TabBottom = 10
    D2TabLeft = 10
    D2TabRight = 10
    Call GraphObjClose("ExceedTable" & i) 'Closes the axis object
  End If
Next

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 3
(3,766 Views)