LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to spreadsheet file common path dialog

Solved!
Go to solution

Hi poker,

 

general hint: THINKING DATAFLOW helps to prevent RACE CONDITIONS and DATA COPIES...

Best regards,
GerdW


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

Hi,

I have created a block diagram for serial communication. I am able to read the data. 

But no able to write the spread sheet. I am attaching m .VI file

Please help

0 Kudos
Message 12 of 24
(1,012 Views)

@usakshi wrote:

Hi,

I have created a block diagram for serial communication. I am able to read the data. 

But no able to write the spread sheet. I am attaching m .VI file

Please help


You can't write anything because you don't have any write function. Please attach a VI with typical data in the read buffer indicator and with whatever file write function you want to use. Include details on the problem you have.

 

p.s. It is not good practice to use the VISA Bytes at Serial Port when you are using the termination character.

Message 13 of 24
(1,007 Views)

Please find the attached block diagram. let me know the error in it

0 Kudos
Message 14 of 24
(989 Views)

You did not do any of the things Dennis suggested: Get rid of Bytes at Port. Attach a VI with typical data. Include details of the problem.

 

Most likely your Read gets zero or one byte on each iteration which resutls in an empty array to the Write to Spreadsheet File.vi.

 

Lynn

Message 15 of 24
(979 Views)

Also, having both a Spreadsheet String to Array and the Write to Spreadsheet File is silly. Having an empty path constant wired to Write to Spreadsheet File is silly as well.

 

A basic menu option in LabVIEW is Edit>Make Current Values Default. This is what we mean by posting a VI with actual values. After doing this, you must save the VI before posting.

Message 16 of 24
(975 Views)

Hi

I need to plo a graph pH Vs Time(real time) in the given .VI file. However, I am getting a sinlge point instead of line or wave graph. I am very new to labview. So, pls explain me elaborately.

 

Thanks

0 Kudos
Message 17 of 24
(949 Views)

A graph in LabVIEW does not retain previous values. Each time you pass an array to it, it deletes old values and just plots the new ones. In your case, each array has a single value. You can use a graph if you have a shift register with a build array function where each new value is appended to the array. This can cause memory problems. The simplest thing for you is to use a chart instead of a graph. A chart does retain previous values. The issue with the chart is that the history is limited. Once the history length is exceeded, older values are deleted. Depending on how long you want to run your program, this may not be an issue and the can play around with different history lengths (a right click option on a chart). To display actual time on the x axis, you need to set the offset and multiplier of the chart. This can be done with property nodes. You don't have any timing at all in your loop. Add that (i.e. Wait ms) and use that value for the multiplier.

 

And please get rid of the VISA Bytes at Serial Port. You've been told to do that a couple of times now.

Message 18 of 24
(939 Views)

okay. I will do that. can you send an example for amplitude vs time. Do I need to use XY graph or waveform graph. For Charts only wave chart option is there and it is mentioned that chart is for only data typically acquired at a constant rate.

0 Kudos
Message 19 of 24
(925 Views)

If you had a Wait (ms) function in the loop you would be acquiring at a pretty constant rate. A waveform graph also is used for data acquired at a constant rate. If your acquisition rate turns out to be highly variable, then an XY Graph would be more appropriate but you are back to keeping an array of Y values (and also X values) in shift registers.

 

Here's an example of a basic chart.

Message 20 of 24
(914 Views)