LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Second graph

My issue is that I want to add these strings to my integer array, to view it on the excel sheet.

But I'm not sure how to do it.

Could it be possible with the 'Write and Read Spreadsheet' VIs?

0 Kudos
Message 11 of 21
(407 Views)

@Alexb91 wrote:

Could it be possible with the 'Write and Read Spreadsheet' VIs?


So are you using spreadsheet I/O or Excel I/O?

 

Here's what you could do then write the array of strings to a delimited spreadsheet.

 

altenbach_0-1723219410159.png

 

0 Kudos
Message 12 of 21
(403 Views)

That works well for the display, but it doesn't work when I try to write to Excel (using the method I know).

ss laview to excel not working.png

0 Kudos
Message 13 of 21
(397 Views)

You would make your life significantly easier if you would just write a simple tab delimited text file. Excel will have no problem opening it.

 

0 Kudos
Message 14 of 21
(394 Views)

I tried using another VI for the Excel acquisition, but I encountered a different issue. The string array I'm getting has values in each column, but I want each line to be in a single column instead. Is there a way to achieve this?

ss value column 2.png

ss values columns.png

  

0 Kudos
Message 15 of 21
(348 Views)

This is still a total mess!

 

I don't "do" excel, but what would happen if you would transposed the 2D string array before writing the file?

 

  • Why is the front panel maximized to the screen?
  • Why don't you combine all these property nodes into one?
  • Why do you have these local variables? Just to create a race condition? (There is no guarantee that they are read AFTER the terminal have been written!, but since you don't really do anything with the array, it does not really matter.)
  • Why is the default value for the wait zero?
  • Why don't you use an array indicator instead of all these sonde # scalars?
  • Your VI cannot be stopped, just aborted, potentially leaving things in and undefined state.
  • For a subset, one would typically include the points under the cursor, so there should be a +1 for the size.
  • Why is the diagram so disorganized?
  • Why is the front panel so disorganized?
  • If the cursor Y does not matter, why don't you use vertical cursors instead of crosshairs?
Message 16 of 21
(335 Views)

 

Thanks for all the input!

 

  • Why is the front panel maximized to the screen?

     

    Could you clarify what you mean? Are you referring to the graphics specifically or the entire front panel?

     

  • Why don't you combine all these property nodes into one?

    Could you elaborate on this? As far as I know, property nodes are linked to individual graphs. Is it possible to combine property nodes from multiple graphs into a single node?

  • Why do you have these local variables? Just to create a race condition? (There is no guarantee that they are read AFTER the terminal has been written! But since you don't really do anything with the array, it does not really matter.)

    I utilized local variables to access values in another part of the diagram without extending wires across the workspace, which could make it even more cluttered. I acknowledge that this might not be the most optimal approach.

  • Why is the default value for the wait zero?

    My intention was for the program to wait until I pressed the button, but I wasn't sure how to wire the false state to achieve this behavior.

  • Why don't you use an array indicator instead of all these sonde # scalars?

    I need to apply corrections to the values using linear regressions, with each probe requiring a different regression. I believed separating them was necessary for this purpose. However, I realize now that these operations could still be performed using an array of corrections.

  • Your VI cannot be stopped, just aborted, potentially leaving things in an undefined state.

    I've addressed this by adding a stop button.

  • For a subset, one would typically include the points under the cursor, so there should be a +1 for the size.

    I apologize, but I didn't quite understand. Should I add +1 to the size of what specifically?

  • Why is the diagram so disorganized?

    I'm currently uncertain about the best way to organize it.

  • Why is the front panel so disorganized?

    I was experimenting and planned to organize it upon completion. However, it might be better to start organizing it now.

  • If the cursor Y does not matter, why don't you use vertical cursors instead of crosshairs?

    I've made this change, and it's much better now!

Regarding the string array, the VI I used to write to Excel only accepts a 1D array, so since it’s not 1D, I can’t transpose it.

 

0 Kudos
Message 17 of 21
(322 Views)

Ways to do property nodes, a picture shows it best:

 

altenbach_1-1723565882446.png

 

 

I was talking about the "Intervalle de scrutation de la centrale (s)" control that defaults to zero.

 

 

Message 18 of 21
(317 Views)

I updated my diagram and tried to clean it up a bit (sorry if it's still a bit messy), and I have a question regarding the "Scanning interval of the control unit (s)".

 

My graphs update it's time axis by 1 second at each x seconds interval set in my loop. For example, if I want to acquire data every 30 minutes, over one hour, my graph only updates by 2 seconds, which makes the time axis incorrect. Do you have any idea how I could work around this issue?

 

0 Kudos
Message 19 of 21
(249 Views)

Hi Alex,

 


@Alexb91 wrote:

My graphs update it's time axis by 1 second at each x seconds interval set in my loop. For example, if I want to acquire data every 30 minutes, over one hour, my graph only updates by 2 seconds, which makes the time axis incorrect. Do you have any idea how I could work around this issue?


You already set the XScale.Offset property: what about setting the correct XScale.Multiplier property???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 21
(240 Views)