LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart History Length in Loop

Solved!
Go to solution

There are two things, that I don't understand about the solution yet and which I would like to learn for the future:

 

1. Does it make a difference, whether the graph is inside or outside the loop for on-demand sample acquisition?

 

2. When I connected the graph directly to the DAQ assistant, there was an error message about incompatible data types. If I first connect the DAQ assistant to a field for numeric output and in parallel to the graph, everything works, suggesting some casting going on. Is this indeed the case? How would I realize as a beginner when it is happening?

0 Kudos
Message 21 of 25
(845 Views)

For 2.  Any time there is a DDT (Ugly blue wire) there is likely to be a data type mismatch.  They hide too much code behind them. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 22 of 25
(843 Views)

Ah, that is interesting. For me as a beginner the solid blue lines looked quite nice so far.

0 Kudos
Message 23 of 25
(841 Views)

@Wuffi wrote:

1. Does it make a difference, whether the graph is inside or outside the loop for on-demand sample acquisition?


Are you using a Graph or a Chart?  A graph will only display the last waveform you wrote to it.  A Chart has a history associated with it.  Generally, charts are best inside of your FOR loop while graphs are best to build up all of your data (autoindexing tunnels, etc) and then write to it when you want to show all of the data.

 


@Wuffi wrote:

2. When I connected the graph directly to the DAQ assistant, there was an error message about incompatible data types. If I first connect the DAQ assistant to a field for numeric output and in parallel to the graph, everything works, suggesting some casting going on. Is this indeed the case? How would I realize as a beginner when it is happening?


As already stated, the Dynamic Data Type is an abomination as it hides too many important details (ie what the data actually is).  A graph or chart should accept the DDT coming from the DAQ Assistant I last saw you post.  So I would suspect something changed there.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 24 of 25
(838 Views)

@Wuffi wrote:

 

1. Does it make a difference, whether the graph is inside or outside the loop for on-demand sample acquisition?

 


  • A chart is an indicator and has nothing to do with sample acquisition. Please define ambiguous terms such as "on-demand sample acquisition". Who is demanding what and how? Show us code!
  • An indicator only updates once it receives data. If it is after the loop, it will not update until the loop has completed. If it is inside the loop, it will update with each iteration. Dataflow!

 

0 Kudos
Message 25 of 25
(833 Views)