04-26-2007 01:35 AM
04-26-2007 01:58 AM
Hello SchreinerAdam,
first you wont be able to do so using a Chart. you have to switch to graph mode, where you have both x and y values. (in a chart there is no x value, a vertical bar would not be bound to anything).
in your vi you have no x values, but can be created using the index in the while loop. i would propose then to use a while loop, where "clear" would just empty x and y arrays. you create these arrays using a shift register, and update the graph every cycle (or 10 cycles if you whish so). you do not need a start button, as by default starting the vi should start the reading. if you still whish to use such one, it should be before the while loop.
once you have such a xy graph, then simply you can use a cursor to set position!
------------------------------------------------
dont forget to rate messages!
04-26-2007 02:17 AM
Hello again
i touched your vi a bit, to show you ideas. you will have to check if it works.
first i created an array, which is updated all the time. for that i used the single update option of the AI, and wait time is now only 1ms. each time you want to clear the arrays get emptied.
then i have a xy graph, which is updated every 20 cycles. this xy graph has a cursor that you can read his properties. ( right now i just put an indicator).
things you might want to do in futur: 1) use attributes to set in advance the scale of the graph. 2) define in which position in time you update your AO. i strongly suggest you use sequences in which you define the actual timing of your sequence, especially when AI and AO is involved.
Tell me if it worked for you.
-------------------------------------------
dont forget to rate!
04-26-2007 02:19 AM
04-26-2007 03:32 AM
04-27-2007 01:42 AM
Hei
sorry about labview 8.2, i just discovered i cant save for a previous version. will have to clarify this with NI.
in the mean time here is a pic of the changed diagram.
good luck