12-22-2010 06:26 PM
Hi All
I know this question has been asked before. I've done the searches and still can't get the attached vi to operate correctly
Would one of the LV knights look at the vi and tell me why the two constants on the BD (values 104 and 360) are not showing on the graph as reference lines. These two values are always fixed, and I want to see them as a reference line on the graph.
When you run the vi using the attached text file, look at the blue line beneath the second bar....what is this artifact?
I think that the last three bars are actually stacked atop each other with the largest masking the other two.
Thanks for any assistance
ray
Solved! Go to Solution.
12-22-2010 09:07 PM
You code make little sense. Can you explain how it should look like?
rayclout wrote:Would one of the LV knights look at the vi and tell me why the two constants on the BD (values 104 and 360) are not showing on the graph as reference lines. These two values are always fixed, and I want to see them
I don't see where you are drawing any "lines". Plot 2 only has two point [0;104] and [1;360] and the first point you change to [0;0] in your weird FOR loops. Two point define a single line, not "lines".
You only graph 2 plots:
12-22-2010 09:54 PM - edited 12-22-2010 09:56 PM
Hi Ray,
I can see what you want but rather then modifying your code i have just written a small example of how it can be done. I have used and XY graph rather then a waveform chart like you where doing.
Hope this helps.
Rgs
Lucither
12-22-2010 11:41 PM
Thanks Lucither. You nailed it in one.
Great tip too about the order of the plot list.
I'm accepting that as the solution.
Best regards
Ray
12-22-2010 11:45 PM - edited 12-22-2010 11:54 PM
12-23-2010 12:14 AM
Hi Ray,
Alt is right (Of course). You can just use cursors. I chose to use an xy graph as i was not sure whether you would actually need to enter specific values along the x axis (ie dates), which is easy to do on an xy graph. I have modified your original example to use cursors on your chart. Im assuming that the lines will be read from a file and as such you will not want the user to be able to move the cursors on the screen. If this is the case then what is a good example, i have disabled dragging for the cursor. If you will want to move the cursor on the screen then you will have to enable dragging. Enabling dragging on this example will give wierd results as on each iteration i am writing to the cursor value just to show you how its done.
Maybe this is closer to what you are after.
Regards,
Lucither
12-23-2010 12:18 AM
The only problem i can see with using cursor for your limits rather then lines drawn on the graph is that if you want these lines to be permanent and not accessible to the user but at the same time have cursors that are used by the user then these lines will still come up on the cursor list, allowing the user to move them. If this is the case it may be better to just plot them on.
Rgs,
Lucither.
12-23-2010 01:25 AM
@Lucither wrote:
The only problem i can see with using cursor for your limits rather then lines drawn on the graph is that if you want these lines to be permanent and not accessible to the user but at the same time have cursors that are used by the user then these lines will still come up on the cursor list, allowing the user to move them. If this is the case it may be better to just plot them on.
For each cursor you can define if it can be moved manually or not. You could use muted colors for the fixed cursors and bright colors and different style for the moveable cursors, for example.
12-23-2010 01:41 AM
The problem i was highlighting was that if you wanted to use the 'Cursor Legend' so that a user can add cursors, the cursors that we have drawn on also appear on this list. Even if you have disabled dragging for these you can still move them by selecting them on the list and using the Cursor Legend up/down/left/right button. I was just pointing out that if this is undesirable then using cursors for these attributes may not be ideal. If the limits are a fixed value that are a constant on the graph it may be better to draw them on when loading the graph, this way it is guaranteed that the user cannot modify them.
Rgs,
Lucither