LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to "skip" part of a signal

Hey everyone,
 
 
I'm still very new to LabVEIW
 
 
I'm writing a code to control a pair of mirrors which will scan across a designated area, one on x-axis and on the y-axis. The movement is defined by two triangle waves (for simplicity at the time being, I may change it later) and will move at different frequencies so that the result is a zig-zag pattern across the area as the two mirros combine.
 
The problem I'm having is that I don't really want the mirrors to scan back across the area when they're done. As things stand, the scan crosses the area and comes back, but I want it to scan in one direction and as the y-axis mirror returns to the starting position, the x-axis mirror stops and waits for it, so it's not scanning back across the same area. I've created the code I'm using with some sub vi's but I'm pretty stuck as to how I can stop this from happening and the help function hasn't made anything any clearer for me
 
 
The two phsyical channels in the vi I'm posting go to the outputs of a DAQPad 6015, which are in turn linked to an oscilloscope so I can see the physical results of what I'm doing. I won't be linking any of this to a real system till I have it worked out
 
 
Thanks in advance,
 
 
Ben
0 Kudos
Message 1 of 12
(3,925 Views)
Somehow forgot to post my vi there, sorry
0 Kudos
Message 2 of 12
(3,924 Views)
Hi,

What exactly do you want the XY graph plot to look like - If I can establish this, then I can work to solve your issue. I am having a little trouble visualising your setup from your description.

Regards,

Dan - NIUK
0 Kudos
Message 3 of 12
(3,889 Views)

Hi Dan,

 

What I'm trying to do is have the first wave run through one cycle and for the second wave to stop halfway through, at the point where the first one reaches 0.5 on the x - axis. The plot on the XY graph would appear the same, as whats happening is that when the scan is halfway through it has scanned the full length of the x - axis, and the second half of the scan is simply going back over the same points in the oposite direction.

 

Thanks,

 

Ben

0 Kudos
Message 4 of 12
(3,883 Views)
Hi,
 
Using an Array Subset function should work for you. See the modified VI attached.
 
Regards,
 
Dan
0 Kudos
Message 5 of 12
(3,880 Views)
Hi Dan,
 
Could you post that again as an older version of LabVEIW? I'm running 8.2 so I can't open it
 
 
Thanks,
 
Ben
0 Kudos
Message 6 of 12
(3,875 Views)

Hi,

Attached.

Regards,

Dan

0 Kudos
Message 7 of 12
(3,873 Views)
Hi Dan,
 
Sorry to keep coming back with questions, but how can I change the vi you sent me to stop the scan when Waveform graph One reaches and amplitude of -1 and a time of 0.5? When I run the current program it stops as waveform one (controling my y - axis) crosses the x - axis on graph one (i.e: at amplitude zero)
 
Thanks for helping, you've got me much closer to getting my program to work than I could have managed myself
 
Ben
0 Kudos
Message 8 of 12
(3,868 Views)
Hi Ben,
 
I think this is what you're shooting for, however the graph reaches -1 amplitude at 0.475 seconds.
 
Regards,
 
Dan
0 Kudos
Message 9 of 12
(3,865 Views)
Hi Dan,
 
Thanks, that's exactly what I needed. There are some known timing issues with the equipment I'll be using later so it doesn't matter if things here are a little bit out as I'll need to change things to compensate for other factors anyway
 
Thanks again,
 
Ben
0 Kudos
Message 10 of 12
(3,861 Views)