10-10-2021 03:09 AM
I have an instrument that gives me position data in three dimensions which can all be displayed on a wavechart. However, when I try to calculate velocity by subtracting the previous position from a feedback node and dividing by the estimated clock time I get a weird static effect and only one input shows in the wavechart. If I separate the velocity array into one data point the wavechart is able to display the velocity correctly.
Does anyone know why the wavechart is doing this?
Setup and Result if I output all Velocities:
Setup and result if I output only one velocity:
Solved! Go to Solution.
10-10-2021 03:43 AM
Hi Don,
@Dailydon wrote:
Does anyone know why the wavechart is doing this?
It's not the chart, it's your calculation…
What is shown in your "Position difference" indicator?
Why don't you attach real code? We cannot debug/edit images in LabVIEW!
Suggestion: You should initialize all shift registers/feedback nodes!
10-10-2021 05:27 AM
Yes, please attach a simplified VI, not useless pictures..
Be aware that charting a 1D array with three points will create one plot with three new points per iteration. To update as three plots instead, you can either convert the 1D array to a cluster with three elements (you are already doing that with the "position chart", so duplicate that!) or built it into a 2D array transposed into an array with three rows and one column.
10-10-2021 01:59 PM
Didn't catch that. Thanks for the help. Sorry about the image. I thought dragging and dropping the diagram over to web browser would let me upload that specific code like how LAVA allows you to drag the block diagram off the forum.
10-11-2021 01:55 AM
You need to create a snippet for that to work.
Select part of code you wish to send, then click Edit-->Create VI Snippet from Selection.
This will create a PNG image that can be dropped on block diagram to recreate your code and is what's often used to share code on this forum.