LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export data to excel from mixed signal graph using invoke node method

Solved!
Go to solution

Hi,

I am writing a code in which selcted poertion of the waveform graphs gets added to mixed signal graph.

 

Now, I am trying to export the data to excel from mixed signal graph using the invoke node method. ( I have attached block diagram and Front panel)

 

But once I run the code, I get an error ( Exception: Access violation (0xC0000005) at EIP=0x04BF1C47) attached and my code gets closed. 

 

I request your help to solve this bug.

 

Thank you.

 

Few points observed,

-- I don't get any error while mixed signal graph has no data. I only get the error when graph gets populated with the data as attached in the image.

-- I am getting same error if I try to export the data manually instead of invoke node method.

Download All
0 Kudos
Message 1 of 8
(5,450 Views)
Solution
Accepted by topic author Shrinivas

Hi Shrinivas,

 

don't misuse the graph as variable (or buffer).

 

You have all the data displayed in the graph also in some wires. Use those wires and attach them do a file write function directly…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(5,439 Views)

Hi, 

 

thank you for your suggestions. I am learning the labview from past few months , so I have few questions.

 

- If I can't use it as I am doing now, why NI give export data to excel option ?

- When I use same code for waveform graph it works well. But why don't mixed signal graph ? ( I am suspecting that I made some mistakes in my code)

- If I have to take same data from wire as you mentioned, I need to save the data in some variable and I have to write the data to excel file using report generation tool kit or some other way. ( It again makes my code difficult) Please let me know if I can do it in some other easy methods. 

 

 

Thanks!!

0 Kudos
Message 3 of 8
(5,425 Views)
Solution
Accepted by topic author Shrinivas

Hi Shrinivas,

 

LabVIEW is getting bug fixes and new features with each version step.

But new features also can bring new bugs - and not all bugs from older versions are fixed by now…

 

The MixedSignalGraph is a beast of it's own and known to have bugs inside. The one you noticed now is probably one of those.

 

So it's not your fault your VI terminates rather "unhappy", but most probably NI's fault. You can have a workaround as described in the last post.

 

If I have to take same data from wire as you mentioned, I need to save the data in some variable

No, you don't need any "variable"! THINK DATAFLOW: the wire is the variable!

 

I have to write the data to excel file using report generation tool kit or some other way. … Please let me know if I can do it in some other easy methods. 

It all depends on the datatype of your data. There are functions to save to spreadsheet files. You can save in binary files. You can create TDMS files , which can be read by Excel too. All those functions are really easy to use - you just have to look at the example VIs coming with LabVIEW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 8
(5,416 Views)

If you really want to write the data to Excel (meaning a .xls or .xlsx file), the Report Generation Toolkit is (in my opinion) by far the easiest and best way to do this.  You need to think about what you want to write (of course), but it is very straight-forward.

 

Bob Schor

Message 5 of 8
(5,393 Views)

Hi GerdW,

 

Thank you. 

 

No, you don't need any "variable"! THINK DATAFLOW: the wire is the variable!

I understand that I can directly write the data in the wire to the file I need to write. 

Rightnow I am using producer consumer design pattern and I don't want to write the data to excel everytime. Hence I used a varible and the data stored in the variable will write the data only when I click the button generate report! However I can use case structure or event structure to get the same work done I guess.

 

 

It all depends on the datatype of your data. There are functions to save to spreadsheet files. You can save in binary files. You can create TDMS files , which can be read by Excel too. All those functions are really easy to use - you just have to look at the example VIs coming with LabVIEW!

 

I wrote code using TDMS write instead of excel as I can again view the graph on my labview and I also get data points values in Excel. Now it is working fine!!

0 Kudos
Message 6 of 8
(5,381 Views)

Hi Bob Schor,

 

I used report generation toolkit for some of my codes. But now I decided to go with TDMS write as I can read it in excel as well as Labview ! 

 

Thank you for your suggestion !!

0 Kudos
Message 7 of 8
(5,369 Views)

You should use the tools that do the job that you require!  Certainly TDMS (particularly for larger, more varied and complex data sets that need to be searchable) is an excellent choice, particularly when paired with DIADem.

 

BS

0 Kudos
Message 8 of 8
(5,344 Views)