05-30-2008 12:35 PM
05-30-2008 02:44 PM
05-30-2008 03:02 PM
05-30-2008 04:02 PM
The first error simply means that no data arrived from the instrument before the stated timeout period expired: you should revise you instrument documentation and the timeout settings for your communication to allow enough time for viRead instruction to receive all expected characters from the instrument.
Additionally, you should pass the last parameter of viRead as a pointer, to receive in it actual number of bytes read, that is
viRead (gateway, viDataArray, viReadSize, &viDataSize);
The second error is usually related to an incorrect panel handle: as far as I understand, your table is located on a tab control which is on a panel whose handle is stored in panelHandle variable. To correctly address your table you must use the panel handle associated to the tab page (each tab page acts like a panel with its proper handle), which can be obtained with something like
GetPanelHandleFromTabPage (panelHandle, PANEL_TABCONTROL, index, &tabHandle);
Obtained panel handle must be used when addressing the table:
SetTableCellVal (tabHandle, TABPANEL_TABLE_VALUES, MakePoint (1,1), dataArray);
06-02-2008 12:39 PM - edited 06-02-2008 12:41 PM
06-02-2008 03:10 PM
06-02-2008 04:30 PM
Here we are cominto into the second part of the problem...
AFAIK there is no direct way to read and format data to a table, you will need to read your data from the instrument and then pass them to the table, possibly after some formatting. You said that your data are packed someway, so you will need to understand this packing and unpack them to a numeric format before passing them to the table. In your instrument documentation the packing of data should be described and maybe there are examples of reading them back in some programming language...