LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetTableCellVal:“the index passed is out of range”

I creat a Table Control,some code in the callbacks of Timer Control like this:

 

==============================================

 

 

int a,b,i=1; 

 

GetNumTableRows (panelHandle, PANEL_TABLE, &a);

 

if (i<=a)

{

  GetTableCellVal (panelHandle, PANEL_TABLE, MakePoint(1,i), &b);

}

 

else i=1;

 

ComWrt (1, b, 1)

 

==============================================

 


When I debug the program, there was a mistake:

NON-FATAL RUN-TIME ERROR:   "7.c", line 346, col 21, thread id 0x000007F8:   Library function error (return value == -55 [0xffffffc9]). The index passed is out of range

 

How to solve this problem?

0 Kudos
Message 1 of 3
(3,469 Views)

Additional information:

 

befoe this Table Control,I have a Button.Its function is as follows:

InsertTableRows (panelHandle, PANEL_TABLE, -1, 1, VAL_CELL_NUMERIC);

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

1) which function call reports this error?

 

2) the function ComWrt is defined as follows: int ComWrt (int portNumber, char buffer[], size_t count); so your second parameter should be a string, not an integer

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