04-02-2019 06:47 AM
Hello,
I am having trouble displaying my data in XY graph, I suspect there is some issue I don't see, I might need a second glance from somebody else. The VI I am attaching is a bigger program, everything but the XY graph works. The issue is probably in "extend" case. The way it is supposed to work is to convert dynamic data from ALM express into 1D array, which convert functions should do, but they don't so I converted into scalar and build arrays myself, those do have values, I checked it, but when I feed it into XY graph it shows nothing. It will be some small issue I am overlooking I am sure.
What did i try:
try building 1D array through convert from dynamic function
trying connect dynamic data to build XY graph express
in my testing VI XY graph works like a charm
The program was made as I was learning, so it is a bit messy sometimes. If someone is kind enough to check my VI, here it is (LW 2009):
04-02-2019 06:58 AM
Use block diagram cleanup. You have a lot of backwards running wires.
Your DAQmx Create Task and Clear task belong outside of the while loop. There is no reason for them to occur every iteration of the while loop. Create once before the program starts. Clear once the program ends.
Your Graph is outside of the while loop, so it will only display data once the VI ends. I imagine you want it inside the while loop so that you can see it as the program runs. This is a basic dataflow principle.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW
04-02-2019 07:00 AM - edited 04-02-2019 07:00 AM
Hi Adalbertus,
two notes:
1. The graph is outside your loop, so it will be updated only after the loop has finished.
2. The ExpressionNode inside the "Extend" case is used with numeric values using a comma as decimal separator. I think the ExpressionNode does not like that… (Read the help for the ExpressionNode!)
Which data is created in the "Extend" case and wired to that Bundle function? Did you debug your VI?
04-02-2019 07:27 AM - edited 04-02-2019 07:30 AM
And there is a lot of temporary block and such, thanks but that is not and issue, I will clean up the VI when I am done. Good point on DAQmx blocks, I forgot that.
04-02-2019 07:30 AM - edited 04-02-2019 07:58 AM
GerdW: yeah that block is new, I just added that, it didn't work before and it doesn't work with periods either. And the update after finishing measurement is intended, other charts are temporary.
edit: In "Extend" there are three voltages, one corresponding to Force (therefore the expression to calculate force) and two other determining proportional position of linear displacement sensor.
04-03-2019 05:47 AM
Ok I solved it, but not sure how as I wasn't exacly sure what was wrong.