FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph doesn't trace

I'm actually having several problems here, but let me start with the most important: the xy graph isn't tracing. I made a test for it (xy graph test.vi), and as you can see below, while it seemed to trace, it only displayed a single point, not a graph.

I figured that was good enough for now, and went on to make an interesting way of targeting a value with overshooting, after a fasion (I called it absolute.vi because it didn't matter what you set the initial value to; all that mattered was the value you add to the reciprocal). Unfortunately, in this VI, the graph didn't trace at all. In addition to this, the numeric display didn't display the 15 decimals it should have, and merely rounded at 5. Another frustrating thing is that I had to keep pressing | | (pause, which was oddly labeled "continue") for every loop, because the graph generator kept flashing when it got its data.

Any help would be appreciated!

Marshal Horn
0 Kudos
Message 1 of 9
(23,534 Views)

Hi Kamocat,

A few suggestions and possible reasons for the problems you mentioned:

How many elements are in the X and Y arrays containing the data for the XY graph? If they are 1D arrays of only one value, you will only see one point on the graph. To display more points, additional elements need to be added to the arrays. The code below uses an initialized shift register and adds new X and Y elements each time the loop iterates.

You can change the number of digits displayed after the decimal point of a number by right-clicking the indicator on the front panel, selecting Display Format, changing the number of digits, and selecting "Digits of Precision" for the precision type.

Finally, it sounds like your code is either stopping because a breakpoint is set or there is an error. To find any breakpoints select Operate » Breakpoints » Find. If you right-click an existing breakpoint, you should see "Clear Breakpoint" as an option. Are you getting an error dialog box at all? You may want to wire the error terminals between your VIs and add an Error Out cluster or Simple Error Handler at the end of your code.

Hope that helps. Feel free to post your code if you have more specific questions.

Jennifer Rutledge

Applications Engineer

National Instruments

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(3,926 Views)

Thank you!

I had more questions here, but after almost a day of experimenting, I finally figured them out. Now I just have to think a little as to how to make a circle out of the pretty diamond below (it was made using the tangent function).

However, I've just realized that I could represent this as a tangent function on a radial graph. r = tan(θ)

That would be r = tan( theta ) if the character doesn't appear.

Message was edited by: Kamocat (using Flock)

Marshal Horn
0 Kudos
Message 3 of 9
(3,926 Views)

Hi Kamocat,

Thanks for wanting to offer feedback, but there isn't a way to rate messages in the FIRST Community. Once your question has been answered you can change the status at the top of the thread.

If you have questions about plotting the circle you mentioned, please ask. Hopefully you've enjoyed using LabVIEW so far!

Jennifer

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 9
(3,926 Views)

Hi Kamocat,

I do have one more question for you. Have you been able to upload files and post images to the forums? In your first message it sounded like you may have tried to attach a VI or screenshot. However, I didn't see any attachments, and the image in your last post was not visible. If you have been getting any errors, please let me know and I would be happy to look into the issue. If it hasn't been working for you, chances are there are others is in the same situation. Thanks!

Jennifer

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 5 of 9
(3,926 Views)

Yes, I have been having some comaptibility issues. When I take a screenshot, it stores it as a .tiff file. I had forgotten that Safari is just about the only browser that will actually display .tiff files online, so I'll go and convert it to a .png file. Also, Safari supports many less features in for replying than other browsers (namely, firefox), and it doesn't seem to attach files correctly. I'll take a shot of it to show you. (Wait a minute, doesn't that mean I can just delete the text and use the picture?)

And here's what it looks like on a firefox-based browser (in this case, Flock)

As you can see, Safari is short quite a few features (and I beleive many of the programmers use a mac, so this would be an issue). However, I'd be more than happy to test for the webmaster, if it would help.

What is quite unusual, though, is that the files don't seem to be uploaded with Flock, either, even though I'm sure they were uploaded. I'll try zipping them first.

Well, it crashed the first time. Lets try again.

Marshal Horn
0 Kudos
Message 6 of 9
(3,926 Views)

When you view the properties of the "build graph" block, there's an option to clear data each call. By default, this on, but by turning it off it will show all points that have been traced this run. Note that, as more points are stored, the program starts to lag.

Marshal Horn
0 Kudos
Message 7 of 9
(3,926 Views)

I suppose this is more your question than mine at this point, so I marked it as answered.

(But I just realized: Safari simply doesn't support rich text. If I go to the plain text setting on Flock, it looks the same as on Safari.)

I have been enjoying Labview so far, though it is made more difficult by the lack of a textbook for reference. (I don't suppose there's a way to convince Pearson to give up $8,000 and give every active team Learning with Labview or a similar textbook). I would like to know the compilers for systems other than the cRIO are free and widely avaliable. I have a DS that I'd love to practice on, and integrate into an autonomous setup for the half-size robot chassis we're building. (Say you have an image of a track. You can either draw a point as location for the robot to go to, or draw a line as the path the robot should follow. The Nintendo DS has wifi, so this would be fairly reasonable. The processors are an ARM7 and an ARM9. )

And the .zip file I uploaded above is the VI that graphs a tangent function on a radial graph, if you turn hard right and don't change any values while it's graphing.

Marshal Horn
0 Kudos
Message 8 of 9
(3,926 Views)

Hi Kamocat,

Thanks for explaining the browser compatibility issues. I will pass that information on to the Community web team.

Although you may not have access to a textbook, hopefully you will find the online resources helpful. There are already quite a few tutorials posted in the Documents section of the community. I would especially recommend the modules in the Getting Started with NI LabVIEW Training tutorial, which are great for learning LabVIEW.

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 9
(3,926 Views)