ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

Incorrect data being exported into Excel

已解决!
转到解答

I've got a Labview program that acquires some data from a DAQ, processes it then displays it on a table on a front panel while it continues to gather more data.  At the end there is then a .VI that puts the tabledata into Excel, however there are two issues.

 

1.  Only 10 out of the 26 rows get populated.

2.  The actual data only bears a passing resemblence to the data in the table.

 

An example of an exported spreadsheet is attached along with the vi that I am using to produce the report.  It is the print event case that produces the excel export.  The PDF is a view of the front panel that contains the data.

 

 

0 项奖励
1 条消息(共 4 条)
3,634 次查看
解答
已被主题作者 Chrispbrown2255 接受

Hello Cris,

 

In your code you are getting data to export to excel directly from the Table control. But the control is placed outside the main while loop, where the event structure is implemented. So every time you press Print Button, you will export data which was inserted to the table during the previous run of the VI.

 

The table is being updated during the press of Play button, as you are using invoke nodes to set cell values.

 

Could you please describe the procedure you are running the code? Are you aborting the VI after each run (as constant False is wired to the conditional terminal)? 

 

Thanks,

Arev

 

CTO | RAFA Solutions

 

Certified-LabVIEW-Embedded-Systems-Developer_rgb.jpgCertified-LabVIEW-Architect_rgb.jpg

2 条消息(共 4 条)
3,604 次查看

Cheers arevhamb putting the table inside the loop sorted it.

 

The constant false is there just to make sure that the loop doesn't stop for now.  I will be adding more to it which will then actually write True to the stop condition.  This VI isn't stopped from within the VI, there is just a home button which closes the VI and shows the 'Home Page'.  The home page then uses an exit labview VI when everything is finished.

0 项奖励
3 条消息(共 4 条)
3,578 次查看

Hi Chris,

 

Glad to know its working now.

 

Regarding the stopping the VI, I think it will be better to close it properly, stopping the loop with control. Home button only closes the Front panel of the VI. 

 

Thanks,

Arev

 

CTO | RAFA Solutions

 

Certified-LabVIEW-Embedded-Systems-Developer_rgb.jpgCertified-LabVIEW-Architect_rgb.jpg

0 项奖励
4 条消息(共 4 条)
3,572 次查看