LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphs plotted incorrectly

Hi all,

 

in my software i use two separate instruments- a mirror than moves back and forth and a lock-in amplifier, which reads the voltage of light at a specific positions of the mirror. At the moment it has option to choose movement ranges of the mirror and number of steps it's supposed to make. The full mirror movement range is 250mm - but it usually has it save as positions from -125 to +125. I've added an option to randomize the position, so it stop not only on position -125, -124, -123 and so on, but also -123, -125, -124 etc. For some reason however, it always plots it as number of the step, so simply 1,2,3 etc. I've tried changing it in every way and i still doesn't do it properly. Can anyone see any problems in my program that i don't? I'm new to LabVIEW and I'm still struggling, therefore, I'd really appreciate your help! 

0 Kudos
Message 1 of 5
(3,078 Views)

can you share your vi in 2013 version.

0 Kudos
Message 2 of 5
(3,074 Views)

Hi,

 

I'm really sorry, but I only have 2014 version. I've attached print screen of the parts that might be causing the trouble, if this helps. 

Download All
0 Kudos
Message 3 of 5
(3,064 Views)

Hello,

 

Go to file>>save for previous version or select the code you want to distribute and go to edit>>create VI snippet of selection which will create an image you can post here which others can then import to there own LabVIEW and run the code.

 

And then sorry but I don't think I understand the issue, could you perhaps elaborate and maybe create a small example that shows the same behavior?

 

Also you might want to check the different plotting methods such as graph, chart or XY graph. Even though I don't really understand I'm just going to take a guess and say that you might be particularly interested in a XY graph?

 

Kind regards

0 Kudos
Message 4 of 5
(3,011 Views)

Btw. this "Ramp randomizer" could be simplified a lot by using the Riffle function!

(LabVIEW2017 comes with a malleable VI named Shuffle…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(3,004 Views)