LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read signals (CAN NI 98609) and write them to Excel

Hello Community,

 

I want to read signals (CAN NI 98609) and write them to Excel. In another VI it works, but not in this setup where I use a CAN module. The VI itself runs and I can see the temperatures in the diagram. But as soon as I insert the write block to Excel and start the VI, the VI aborts and it doesn't even show me an error message. I would appreciate some help as I can't figure out what the problem can be.

 

With kind regards

 

 

 

i00000_3-1676367226686.pngi00000_4-1676367253764.png

 

i00000_2-1676367059719.png

 

 

0 Kudos
Message 1 of 9
(1,283 Views)

Hi i0,

 


@i00000 wrote:

But as soon as I insert the write block to Excel and start the VI, the VI aborts and it doesn't even show me an error message. I would appreciate some help as I can't figure out what the problem can be.


So it is very easy to find the problem: using ExpressVIs in general and using the WriteMeasurementData ExpressVI in specifically in this VI…

 

The problem with images is: we cannot edit/debug/run them with LabVIEW.

The problem with images from ExpressVIs is: we cannot inspect their/your settings!

 

Why do you think the ExpressVI creates XLSX files on your cRIO? How did you define the filepath?

Why don't you start with plain CSV files?

Why do you need that large ToDDT ExpressVI when you already have a nice 1D array of samples?

 

Btw. you most probably use a NI9860 module…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,278 Views)

Hey,

 

These are the inner details. What confuses me overall is that it runs the same way I set it up in another VI and here it always breaks and doesn't even give an error message. I'm not that experienced in labview as I only use it for one project.

 

Best regards

 

i00000_0-1676377729516.png

This is my other VI where it works, the inner settings are identical:

i00000_1-1676377985107.png

 

 

0 Kudos
Message 3 of 9
(1,246 Views)

Hi i0,

 


@i00000 wrote:

What confuses me overall is that it runs the same way I set it up in another VI and here it always breaks and doesn't even give an error message. I'm not that experienced in labview as I only use it for one project.


How do you know it "breaks"- when you don't get an error message?

Is there no other LabVIEW programmer capable to help you at Volkswagen?

 

  • Does your cRIO run on Windows?
  • Does the cRIO support OneDrive?
  • Which drive "C:" do you want to access? Is this drive located within the cRIO? (You know this is a computer on its own without access to your computer harddrive!?)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(1,234 Views)

Excel is not supported on RT target. LabVIEW uses ActiveX to communicate with Excel but ActiveX is only supported on Windows.

You can write the data to a TDMS file. A TDMS file can be browsed using Excel.

0 Kudos
Message 5 of 9
(1,227 Views)

@ZYOng wrote:

Excel is not supported on RT target. LabVIEW uses ActiveX to communicate with Excel but ActiveX is only supported on Windows.


This is not entirely true.  The Report Generation Toolkit uses ActiveX to communicate to Excel, which isn't supported on RT.  But an Excel file itself can be made on RT.  In the Write to Measurement File, there is an option for the file format to be .XLSX.  This makes an Excel file without needing Excel installed but is quite limiting.  I do recommend making a CSV, or TDMS, but creating an Excel file on an RT is possible.  Oh there is also an older toolkit XLR8 which can read and write Excel files without Excel.

0 Kudos
Message 6 of 9
(1,215 Views)

@Hooovahh wrote:

@ZYOng wrote:

Excel is not supported on RT target. LabVIEW uses ActiveX to communicate with Excel but ActiveX is only supported on Windows.


This is not entirely true.  The Report Generation Toolkit uses ActiveX to communicate to Excel, which isn't supported on RT.  But an Excel file itself can be made on RT.  I the Write to Measurement File, has an option for the file format to be .XLSX.  This makes an Excel file without needing Excel installed but is quite limiting.  I do recommend making a CSV, or TDMS, but creating an Excel file on an RT is possible.  Oh there is also an older toolkit XLR8 which can read and write Excel files without Excel.


Darren made a utility vi to read the contents of an Excel file without the need for excel. See this post.

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 7 of 9
(1,204 Views)

Hey,

 

unfortunately i am the only one in the department that uses laview and there is no one internally that can help me. I am the first to use it for a new setup. I just need it to finish my measurements for my bachelor thesis.

 

Here are the data to the cRIO I hope with it one comes further. In any case, it works that I write the measured values in Excel in the one larger VI. Therefore, it should work with the smaller VI, which I have built, but exactly the same or not?

 

So at least, when I start the VI, it breaks the connection to the cRIO and gives me no reason. When I set it to TDMS, it doesn't create a file and doesn't save anything with this VI, but then at least it runs and I see the data in the chart.

 

Thanks to for all the help.

i00000_0-1676445347055.png

this works and creates me excel files with the data:

i00000_1-1676445757731.png

 

Best regards

 

 

0 Kudos
Message 8 of 9
(1,169 Views)

Hi i0,

 


@i00000 wrote:

Here are the data to the cRIO I hope with it one comes further. In any case, it works that I write the measured values in Excel in the one larger VI. Therefore, it should work with the smaller VI, which I have built, but exactly the same or not?

 

So at least, when I start the VI, it breaks the connection to the cRIO and gives me no reason. When I set it to TDMS, it doesn't create a file and doesn't save anything with this VI, but then at least it runs and I see the data in the chart.


I repeat:

  • Which drive "C:" do you want to access? Is this drive located within the cRIO? (You know this is a computer on its own without access to your computer harddrive!?)

The path shown in your message #3 is definitely not possible on your cRIO!

The cRIO CANNOT ACCESS the C: drive of your Windows computer!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(1,153 Views)